Programming via IDE works great, programming via Arduino Cloud causes failures. Any pointers?

I'm having an issue that I have not been able to find the root cause of, and I'm hopeful that someone here can point me in the right direction.

Essentially, the issue boils down to this:

  • After being programmed via the IDE:

    • Everything runs as intended when connected to PC via USB.

    • Everything runs as intended when NOT connected to PC via USB.

  • When the exact same code is programmed via the Arduino Cloud interface - both locally and OTA:

    • The code runs poorly* when connected to PC via USB.

    • The code runs poorly* when NOT connected to PC via USB.

*by poorly, I mean that the beginning of the code runs well, but when the setup code begins to establish a link back to the Arduino cloud, either it times-out and my 120 second watchdog timer restarts everything - OR it throws these warnings and then the code runs 1 or 2 loops and then the WDT restarts the board.

ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to mqtts-up.iot.arduino.cc:8884
ArduinoIoTCloudTCP::handle_ConnectMqttBroker 1 connection attempt at tick time 40654

I'm happy to post anything that might help, but first I wanted to simply post what I've found to be different after each of the programming styles:

At boot, when loaded from the Arduino IDE, this is the initial output:

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232      <== NOTE the length is 100 larger than below
load:0x40080400,len:3028       <== NOTE the length is 8 smaller than below
entry 0x400805e4

and when loaded via USB from the Cloud Web interface, this is the initial output:

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132      <== NOTE the length is 100 smaller than above
load:0x40080400,len:3036       <== NOTE the length is 8 larger than above
entry 0x400805e4

The device is an ESP32 development board, and all of the "device flavours" in the web interface are set the same as in the Arduino IDE.

The library versions used are the same between both platforms, however my local IDE uses v2.0.14 of the esp32 hardware package while the Arduino cloud uses v2.0.5

If anyone has any thoughts on where I can look, or what I can try, I'd appreciate it. I've been chasing this for far too long, and continue to be unable to make any headway on it.

Thank you all for your time and any feedback you might have!

Hi @davidsandbrand.

I would guess this is the cause of the different results. You could verify it by reproducing this environment in Arduino IDE and then checking to see whether the behavior of the program compiled via Arduino IDE now matches the behavior of the program compiled via Arduino Cloud. Determining this won't solve the problem, but it will allow you to focus your research and troubleshooting efforts.

I'll provide instructions:

  1. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Scroll down through the list of boards platforms until you see the "esp32 by Espressif Systems" entry.
  3. Select "2.0.5" from the version menu at the bottom of the "esp32 by Espressif Systems" entry.
  4. Click the "INSTALL" button at the bottom of the entry.
  5. Wait for the installation to finish.

Now upload your Thing sketch to the board using Arduino IDE and then check to see if the "runs poorly" problem now occurs.


If you do determine that the problem is correlated to the version of the "esp32" boards platform in use, you could further bisect the issue by determining what is the highest version between 2.0.5 and 2.0.14 where the problem still occurs.

You can then review the changelog for the first good version of the "esp32" boards platform to see if you can identify the specific change. The changelogs are available here:

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