Sketch Stuck on OTA

IOT. Esp32 dev board. Created thing, dashboard, sketch etc. uploaded via usb. Later it automatically started doing OTA. I thought cool, I didn’t even have to do anything. Decided to go a different direction with my project and started over. New thing, dashboard, sketch but same device. It uploaded by OTA but couldn’t get it to connect to cloud/dashboard. I figured I messed up the secret code part. Tried to start completely over and now can’t upload via OTA or via usb. IDE drops the create agent. Does not let me select a board. I can go to another sketch and it will upload via usb. It’s like ide is locked onto OTA only for this one sketch.

Hi @jimo67. This is caused by a bug recently introduced into Arduino Cloud that affects uploading IoT Thing, and dashboards sketches to serial ports of ESP32 and ESP8266 boards. The Arduino Cloud developers are aware of the bug and are already working on a fix. I will report back here if I have any news to share regarding a resolution.

For now, please use Arduino IDE when you need to upload Arduino Cloud IoT Thing sketches to ESP32 and ESP8266 boards via the serial port. You can install support for the ESP32 boards in Arduino IDE by following these instructions.

You can use the Arduino Cloud sketchbook integration feature of Arduino IDE 2.x to get convenient access to all your Arduino Cloud sketches (including Thing sketches) for use in Arduino IDE:

https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-cloud-sketch-sync

You can continue to use Arduino Cloud to set up IoT Devices, Things, and dashboards, to write and compile sketches, and to interact with the Thing via dashboards. The only problem is the inability to upload to the board via the serial port. The bug does not occur when using a non-IoT sketch so you can work with non-IoT sketches in Arduino Cloud, including uploading them to ESP32 and ESP8266 boards, just as always.

The bug is specific to serial ports. Arduino Cloud also has an OTA (over-the-air) upload feature that allows you to uploading to boards via the Internet This feature is available if you have an "Entry" Arduino Cloud plan or higher. You must use the serial port to upload the IoT Thing sketch to a board for the first time, or if the board is no longer able to connect to the network using the credentials that were configured the last time the sketch was uploaded, but once an IoT Thing sketch is running on the ESP32 board with access to the Internet, it will produce an OTA port. You can then upload to that OTA port via Arduino Cloud. So the workaround of using Arduino IDE to upload the sketch is only required in cases where the board is not producing an OTA port.

Thanks. I got the ide to work and got my sketch to upload to my ESP32. :+1:

You are welcome. I'm glad if I was able to be of assistance.

Regards,
Per

Hello again @jimo67. The bug that caused Cloud Editor to not recognize the serial ports of ESP32 and ESP8266 boards has now been fixed. I apologize for any inconvenience this has caused you.

There is one remaining problem you should be aware of: if you have multiple Arduino boards (or other devices that produce serial ports) connected to your computer, Cloud Editor might pick the wrong port to use. I have submitted a report about this problem to the developers. For now, please disconnect any additional Arduino boards from your computer before opening an Arduino Cloud IoT Thing sketch in Cloud Editor when using a serial port to upload to the board.

Please give it a try and let us know if you still have any problems.

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