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!