Not able to upload OTA AND send data over a Bluetooth connection

Hi guys, really stuck on this one!

So I am in the process of creating a device using an Arduino Nano 33 IoT that uploads a sketch OTA then sends the data received through pin A0 via Bluetooth.

I am able to accomplish each half of the task separately.

First I update the Arduino's NINA firmware to 1.4.8. This allows me to upload the sketch to my Arduino OTA using the IoT Cloud.

Then I move on to uploading my sketch via Bluetooth. The original Bluetooth signal is dropped when uploading my sketch OTA so I follow these steps to bring it back. I upload the SerialNINAPassthrough sketch, change the board to ESP32 Dev Mod. , alter a few settings and upload the SerialToSerialBT sketch. This then allows me to connect to my mobile phone. However, once completed, the option to upload OTA is removed, and the 'CheckFirmware' sketch for the NINA module tells me:

WiFiNINA firmware check.

Communication with WiFi module failed!

I can only have just one or the other by the looks of it, but was wondering if it's possible to have both.

Any questions let me know!!

No you cannot. The NINA on the Arduino only supports WiFi or BLE at one time.
There are modules from ublox that allow you to create a device with Bluetooth and Wi-Fi Coexistence but even that is not as easy as it sound.

The lower software stack needs to interlace the two protocols and that is not easy because they each have their own timing requirements. You cannot send the WiFi signal and the Bluetooth signal at the same time.
You can even have that issue when you use two Arduinos and place them next to each other. Only the three BLE advertisement channel are in between the WiFi channels. All other BLE channels are in the WiFi channels and can be overpowered by a WiFi. BLE does frequency hoping to mitigate this but that may not be enough when the devices are too close.

If you want to know more start with Google "ublox Bluetooth and Wi-Fi Coexistence".

1 Like

it's important to me this topic. what is the way to upload my sketch to the device? any example to upload via Bluetooth or wi-fi?

Ahh I see. Yes, that does sound quite complex. I'll look into it!

Thanks for your help!

I use Arduino IoT Cloud which uploads sketches over WiFi.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.