Can the NANO IOT 33 run Full Bluetooth (NOT BLE)?

I am hooking up a GPS receiver to my Nano 33 IOT and I need it to broadcast the data on Bluetooth so I can pick it up on an Android device that does not have GPS. The Android device can run software that will make the BT data look like it's an installed GPS device.

From what I am seeing, the ESP32 chip is fully capable of Standard Bluetooth but the Nano IOT doesn't configure this out of the box and the ArduinoBLE library only supports BLE.

Is there, is someone working on, or is there a reasonable approach to getting the Nano 33 IOT to get its ESP32 chip to communicate standard BT?

I am interested in the same thing. From what I can tell the Nano IoT is based on the U-Blox NINA-W102 and according to the data sheet it supports Bluetooth v4.2 (Bluetooth BR/EDR and Bluetooth low energy) communications.

Data sheet here:

So as I understand it the hardware is capable of both, but the current 'released' libraries only support BLE. I don't have a lot of time but I'd be interested in helping/testing/contributing to the development of the library if anyone else is working on it.

Hi guys,

is possible to make BT Classic with IoT33, but the programmingo of NINA W102 module is neded. Tests pad on the bottom side of IoT33 are usefull for programming what you want.
Nina W102 is compatible with ESP32 DEV module. If you want I can made some tutorialhow to do.

I'd love to see a tutorial if you have one (or can make one).

I don't have it, yet. Today I finished making experiments and successfully programming NINA W102 and Iot 33 as a standard Bluetooth. In the next post I will send a step by step instructions how to do.

I'm looking forward to seeing it. :slight_smile:

The Arduino IoT33 is very intresting module. On one small PCB are integrated Cortex M0 SAMD21 microcontroller and communication module NINA W102. In originnal version of ARDUINO NANO IoT33 standard serial Blueotooth is not supported but only BLE (Low Enegy). This is no limited by hardware but only by the software implemented in NINA module.
When I carefully read the datasheet of NINA 102, I've realized that the module is based on ESP32 processor and when I've diged on the web I found the information that it is compatible with ESP32 Dev Module in Arduino IDE.

From datasheet: „It is possible to use Arduino electronics platform on the NINA-W10. The Arduino platform and open source community provides the possibility to accessa lot of third party hardware such as displays and sensors.” – good news :slight_smile:

Let's start:

1. First, the ESP32 module should be added to Arduino IDE, please do it according to instructions publicated here:

If you do not have installed Arduino Nano IoT33 in your Arduino IDE please find it in board manager and install.

2. The Arduino NANO IoT33 board is very good designed, tests point of serial Communications with NINA 102 module are led out on the bottom side.

The Eagle Project of it is possible to download from the link below:

https://download.kamami.pl/p576016-Nano33IoT.zip

When you localized all test points, you should connect it for any serial converter to TX and RX line. In my case I used standard CH340 chip, USB to serial converter. The GPIO 0 line should be connected to GND but only for programming (using a switch is good idea).

a) Programming the ESP32 (NINA W102) with Arduino:
From Tools select board: ESP32 DEV MODULE
Rest of settings are here:

2.jpg

As a Communications port you should select the external serial port connected to test points, is not a serial port of Arduino IoT

b) Software for NINA W102
For making a test I suggest using a code from the side listed below:

c) Programming
From Arduino IDE please select „load program” and when you see in the window … connecting:

3.jpg

• PUSH and HOLD RESET on the Arduino NANO IoT33 board
• Connect GPIO 0 to GND all the time

After about 90 seconds the programming is done …. and you can release the RESET and GPIO 0

d) Checking the results of programming

• run from ARDUINO IDE ->TOOLS -> Serial Port Monitor
• PUSH and HOLD RESET on the Arduino NANO IoT33 board

To start NINA module is nedded to push and hold RESET button of IoT33 board becasue the RESET pin of NINA 102 module is controlled directly by CORTEX M0 chip. But in the next part of this tutorial I show you how to program Cortex for cooperation with NINA. On the Serial Port Monitor you should see several messages from ESP32 (NINA) bootloader and from program:
The device started, now you can pair it with bluetooth!
And now is possible to pair BT device „ESP32test” with phone or computer and test it.

3. IoT33 programming to communicate with NINA W102

On this site:

I found some information about pin maps and internal connection between CORTEX M0 and NINA W102.
The next step is a programming CORTEX M0 chip and send data to NINA W102 module.
From Arduino IDE please select Arduino NANO IoT33 compile and load program as below.

void setup() {

     pinMode(NINA_RESETN, OUTPUT);          
     digitalWrite(NINA_RESETN, HIGH);
     Serial.begin(115200);
     SerialNina.begin(115200);
}

void loop() {

  if (Serial.available()) {
  SerialNina.write(Serial.read());}

  if (SerialNina.available()) {
  Serial.write(SerialNina.read());}
}

After successfully programming you can pair with BT device as a serial communication device and read the data sending from CORTEX M0 to NINA W102.

Guys, I know that the tutorial is not a perfect but together we can improve it.
Good luck :slight_smile:

3.jpg

2.jpg

This is awesome! Well done! I'll go thru it step by step and note anything I find.

Thank again!

I went through this process a couple of times and it worked well, I didn’t have any significant problems!

I did discover that when updating the NINA W102 you only need to hold the reset button down for a few seconds (until it starts updating), it will still finish correctly after a minute or so. Then I disconnect the GPIO 0 pin (from GND) and I cycled power to the whole board to make sure the changes took.

I updated one of my Nano IoT’s to run BT4 classic and it seems to be working well (so far). I also increased the baud rates to 1Mbps (SerialNina.begin(1000000)). Next, I will test streaming large amounts of data at high rates.

Thanks for your help and creating this tutorial, I’m sure this will help others in the future as well!

you can flash NINA over the SAMD with SerialNINAPassthrough.ino sketch of WifiNINA library

Thanks Juraj it is very good information.

Can someone post a step by step guide to do this and maybe an example sketch to prove that it works?

drhalftone:
Can someone post a step by step guide to do this and maybe an example sketch to prove that it works?

Step by step instructions (and working code) is posted above...

Read and follow the post by danielkopiec.

So here is where I am at. I set up the Arduino IDE for the ESP32 following the directions above. I then loaded the SerialtoSerialBT example and compiled it to a bin file. I placed this bin file in the same directory as my esptool.exe (on Windows). I then opened the SerialNINAPassthrough sketch and compiled and loaded the sketch onto my NANO 33 IOT. While it was running, I ran the following command line:

esptool --port com3 write_flash -fm dout 0x00000 SerialToSerialBT.ino.esp32.bin

Now notice that the instructions for setting up the Arduino IDE for the ESP32 was not written in English. So I didn't know what the setting is for "Core Debug Level", so I left it as "NONE." So then I unplugged the board and replugged it in. And then I ran the SerialPassthrough sketch compiled for and run on the NANO 33 IOT as:

void setup() {
pinMode(NINA_RESETN, OUTPUT);
digitalWrite(NINA_RESETN, HIGH);
Serial.begin(115200);
SerialNina.begin(115200);
}

void loop() {
if (Serial.available()) { // If anything comes in Serial (USB),
SerialNina.write(Serial.read()); // read it and send it out Serial1 (pins 0 & 1)
}

if (SerialNina.available()) { // If anything comes in Serial1 (pins 0 & 1)
Serial.write(SerialNina.read()); // read it and send it out Serial (USB)
}
}

And then when it starts up, I immediately see a never ending stream of the following message:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

Any help would be greatly appreciated.

More info to help diagnose my issue. I did download a version of the NINAWIFI firmware in bin format. And I successfully used the Serialpassthrough sketch along with the esptool, and it worked. I ran the firmware check sketch and saw the correct firmware version. So I have total faith in the process for reprogramming the ESP32. The issue really seems to come down to how the SerialToSerialBT project is compiled for the ESP32.

Is there any chance that the compiler settings need to be changed when using the esptool to program the board with passthrough?

Juraj gave me the needed guidance to get this working without soldering to the ESP32 chip. So first, I set the Arduino IDE for programming the NANO 33 IOT. I opened the SerialNINAPassthrough sketch; compiled it; and then uploaded it to the NANO 33 IOT using the COM3 port (which is the recognized port for the NANO 33 IOT). I then going changed the device in the Arduino IDE to target the SAMD ESP32 device as described by danielkopiec above. I then opened the SerialToSerialBT sketch; compiled it; and used the "upload" bin functionality of the Arduino IDE. This caused the Arduino IDE to upload the bin file to COM3. What I understand from Juraj, this upload to the "ESP32" on the COM3 port was recognized by the NANO 33 IOT to be passed through to the ESP32 and not reprogram the NANO 33 IOT itself. After this, I then set the Arduino IDE to again target the NANO 33 IOT and ran the SerialPassthrough sketch described by danielkopiec, which after compiling and uploading caused the NANO 33 IOT to show up as a Bluetooth device in the Windows 10 Bluetooth control panel.

I am very happy that I did all of this without soldering and only because of the help I received from this group.

Thanks everyone.

1 Like

so super simple. I wondered when I read about soldering in this thread.

the esp32 Arduino upload is done withe esptool. the SAMD requires a 1200 baud 'touch' to reset to bootloader. esptool doesn't do it. so the SAMD will only relay the data to the esp32 as when you used the esptool from command line.

I don't have a NINA board, but I have the first Uno WiFi with 328p and esp8266 and the esp8266 there is too accessible only over the ATmega with a similar passthrough sketch which resets the esp8266 into flashing mode.

(If I want to test the WiFiNINA library I wire together a MKR Zero or Nano Every with an esp32 dev board.)

I got the connection to work following drhalftone’s instructions, but it seems I can’t quite get the data that is transmitted over bluetooth.

I am running a terminal app on my mobile. If I type in any text into the arduino serial monitor and press enter, the mobile receives and displays is.

If, however, I send a text from the mobile terminal, the arduino logs the following to serial:

[V][BluetoothSerial.cpp:275] esp_spp_cb(): ESP_SPP_DATA_IND_EVT len=6 handle=129

len is the lenght of the string I send +2 (which I assume is a line break; it works consistently with different texts.)

I have been trying different variants of

if (SerialNina.available()) {
     Serial.write(SerialNina.read());
}

same result. So how can I get to the actual content of the message? Where should I be looking for that kind of information? Googling has failed me, unfortunately. I can’t even seem to find documentation for SerialNina.

Good day

I have been looking at this topic for a few days now and I don't quit follow the procedure, I am new to Arduino and bought the Nano 33 IOT specifically to pair it to a phone via std bluetooth.

I can see you all manage to flash it (without soldering), but I can't seem to figure it out.

Is there anyway to list the steps via the IDE in beginners code?

I am also not sure how you guys are interfacing to it (Bluetooth name and pin).

I have gone through the HC-05 examples and it seems that you do not need any code pushed to the Arduino to connect to the bluetooth once you have set the HC-05 up via terminal.

Any help would be great.

tommy_pap:
.. bought the Nano 33 IOT specifically to pair it to a phone via std bluetooth.

May I ask why? Its not like pairing would make them both happier. :slight_smile: Your app can connect to the Arduino and read/write characteristics.

Maybe what you want can be achieved in another way.