You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arduino IDE 2.2.0, ESP IDF 2.0.14 and ESP32 board NodeMCU-32S.
When using UbiTcp classes I get the following looping crashes (rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) after flashing the ESP32:
This seems to be caused by the Ubidots global variable constructor line:
Ubidots ubidots(UBIDOTS_TOKEN, UBI_TCP);
Looking in the library class UbiTcp.cpp I can see in the constructor the method _syncronizeTime(); is being called before any WiFi connection is made. The _syncronizeTime(); method therefore seems to be failing with the below error message when trying to get the current time from the SNTP server as there is no WiFi connection:
Setting time using SNTP......[ERROR] Could not set time using remote SNTP to verify Cert
Ubidots ubidots(UBIDOTS_TOKEN, UBI_TCP); // <--- global variable constructor causes crashes
void setup() {
Serial.begin(115200);
}
void loop() {
}`
I'm very new to ESP32 and library usage so if this issue is due to my environment or setup in some way then please let me know.
The text was updated successfully, but these errors were encountered:
hoadster
changed the title
UbiTCP causes repeated crashes after flasing with ESP32 IDF 2.0.10 and above
UbiTCP causes repeated crashes after flashing with ESP32 IDF 2.0.10 and above
Dec 14, 2023
Arduino IDE 2.2.0, ESP IDF 2.0.14 and ESP32 board NodeMCU-32S.
When using UbiTcp classes I get the following looping crashes (rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) after flashing the ESP32:
This seems to be caused by the Ubidots global variable constructor line:
Ubidots ubidots(UBIDOTS_TOKEN, UBI_TCP);
Looking in the library class UbiTcp.cpp I can see in the constructor the method _syncronizeTime(); is being called before any WiFi connection is made. The _syncronizeTime(); method therefore seems to be failing with the below error message when trying to get the current time from the SNTP server as there is no WiFi connection:
Setting time using SNTP......[ERROR] Could not set time using remote SNTP to verify Cert
This was a silent failure for me because as per the supplied example ( https://github.com/ubidots/ubidots-esp32/blob/main/examples/GetValueTcp/GetValueTcp.ino ), the Ubidots variable is declared as a global variable and therefore the constructor runs before setup() is called and any WiFi connection is made.
Interestingly, this was not an issue for me with IDF version 2.0.9 but started crashing with IDF versions 2.0.10 and above.
Example code which can be used to re-produce the crash shown below:
`#include "Ubidots.h"
const char* UBIDOTS_TOKEN = "XXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
Ubidots ubidots(UBIDOTS_TOKEN, UBI_TCP); // <--- global variable constructor causes crashes
void setup() {
Serial.begin(115200);
}
void loop() {
}`
I'm very new to ESP32 and library usage so if this issue is due to my environment or setup in some way then please let me know.
The text was updated successfully, but these errors were encountered: