Comments (4)
Getting the same error with Adafruit HUZZAH32 ESP32 Feather. Did you resolve this? The minimum code example is: /home/yourhomehere/.arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/AzureIoT/examples/SimpleMQTT/SimpleMQTT.ino from Microsoft. Add the Microsoft Azure liberies in the Arduino Library Manager to install. Depending on your connection and the setting for #define EVENT_TIMEOUT_MS 10000 in Esp32MQTTClient.cpp it will fail in 5 minutes. The TLS close does not seem to work.
from esp-azure.
"tlsio_openssl_destroy called while not in TLSIO_STATE_CLOSED" is not a fatal error. it will close any existing connection
from esp-azure.
@jpagliaccio sorry for the delay. In my case it ended up being caused my a memory leak. My best guess is that low memory was causing a socket allocation error (socket_async_is_create_complete failure).
This message seems to point in the same direction as well.
wifi: alloc eb len=24 type=3 fail, heap:432
from esp-azure.
Robert thanks for the reply. This is whats happening while I look into the leak. I am using the ESP32, Arduino IDE, and the Microsoft demo code. Everything ruins fine but if I loose my signal or its slow to respond I get the crash below. I am able to recreate this. The code is the Azure IoT simple example in the Arduino IDE.
Below is 3 good messages, then I move my WiFi router just out of range (you can pull the antennas or press the WiFi on/off button to simulate this) and then it tries to reconnect but there is the "Operating mode must not be set while SNTP client is running"
Thanks for your help.
Send Confirmation Callback finished.
{"deviceId":"Esp32Device", "messageId":31, "Temperature":48.000000, "Humidity":24.299999}
Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
Info: >>>Confirmation[30] received for message tracking id = 30 with result = IOTHUB_CLIENT_CONFIRMATION_OK
Send Confirmation Callback finished.
{"deviceId":"Esp32Device", "messageId":32, "Temperature":25.000000, "Humidity":51.400002}
Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
Info: >>>Confirmation[31] received for message tracking id = 31 with result = IOTHUB_CLIENT_CONFIRMATION_OK
Send Confirmation Callback finished.
{"deviceId":"Esp32Device", "messageId":33, "Temperature":15.000000, "Humidity":88.199997}
Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
Error: Time:Fri Nov 16 13:32:59 2018 File:/home/jpagliaccio/.arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/AzureIoT/src/Esp32MQTTClient.cpp Func:SendEventOnce Line:316 Waiting for send confirmation, time is up 10008
Info: >>>Re-connect.
Info: >>>Confirmation[32] received for message tracking id = 32 with result = IOTHUB_CLIENT_CONFIRMATION_BECAUSE_DESTROY
Info: Initializing SNTP
assertion "Operating mode must not be set while SNTP client is running" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/lwip/apps/sntp/sntp.c", line 591, function: sntp_setoperatingmode
abort() was called at PC 0x400e3bbb on core 1
Backtrace: 0x4008fac0:0x3ffb1d10 0x4008fcc3:0x3ffb1d30 0x400e3bbb:0x3ffb1d50 0x4011997d:0x3ffb1d80 0x400d3bfe:0x3ffb1da0 0x400d3f5e:0x3ffb1dc0 0x400d3406:0x3ffb1de0 0x400d373a:0x3ffb1e20 0x400d38a1:0x3ffb1e40 0x400d2787:0x3ffb1e60 0x40148594:0x3ffb1fa0
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:808
load:0x40078000,len:6084
load:0x40080000,len:6696
entry 0x400802e4
ESP32 Device
Initializing...
In Setup Microsoft Demo Code - WiFi
Connecting...
......WiFi connected
IP address: 192.168.0.145
IoT Hub
Info: Initializing SNTP
Info: SNTP initialization complete
Info: IoT Hub SDK for C, version 1.1.23
Info: >>>Connection status: connected
{"deviceId":"Esp32Device", "messageId":1, "Temperature":29.000000, "Humidity":46.599998}
Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
Info: >>>Confirmation[0] received for message tracking id = 0 with result = IOTHUB_CLIENT_CONFIRMATION_OK
Send Confirmation Callback finished.
{
"desired": {
"$version": 1
},
"reported": {
"$version": 1
}
}
{"deviceId":"Esp32Device", "messageId":2, "Temperature":22.000000, "Humidity":41.900002}
Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
Info: >>>Confirmation[1] received for message tracking id = 1 with result = IOTHUB_CLIENT_CONFIRMATION_OK
Send Confirmation Callback finished.
{"deviceId":"Esp32Device", "messageId":3, "Temperature":28.000000, "Humidity":33.000000}
Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
Info: >>>Confirmation[2] received for message tracking id = 2 with result = IOTHUB_CLIENT_CONFIRMATION_OK
Send Confirmation Callback finished.
{"deviceId":"Esp32Device", "messageId":4, "Temperature":7.000000, "Humidity":15.300000}
Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
Info: >>>Confirmation[3] received for message tracking id = 3 with result = IOTHUB_CLIENT_CONFIRMATION_OK
Send Confirmation Callback finished.
from esp-azure.
Related Issues (20)
- When will this project get its next update ot match ESP-IDF V4.x? (CA-128) HOT 1
- Replace printf() with proper ESP_LOGx() (CA-137)
- Device disconnects after ~49 days online (CA-138)
- HSM Module not included (CA-140)
- Send Azure message larger than 5000 bytes (CA-153)
- Update to LTS_07_2021_Ref01 (CA-167) HOT 11
- README update (CA-172)
- Cannot compile project, issues (CA-184) HOT 1
- Not able to auto-reconnect with Azure Cloud (CA-218) HOT 6
- Loss of wifi AP connection results in Azure/TLS errors on recovery (IDFGH-7210) (CA-220) HOT 6
- connection string setup for multiple device (CA-222) HOT 1
- Example iothub_client_sample_mqtt crash (CA-251)
- Delays / waits in Direct Method / Device Twin Callbacks (CA-269)
- prov_dev_client_ll_sample - Failure encountered on registration PROV_DEVICE_RESULT_DEV_AUTH_ERROR (CA-279) HOT 1
- JSON Serialization failed! iothub device twin sample. (CA-290)
- tls error when compiling on esp-idf 5 (CA-295) HOT 4
- No connection with NB-IoT (CA-308) HOT 1
- Azure Blob Storage data fetch fails due to HTTPS Client MBed TLS (IDFGH-11100) (CA-313) HOT 1
- ESP-AZURE on Espressif-IDE (CA-315)
- error: implicit declaration of function 'esp_tls_conn_delete' (CA-319) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-azure.