GithubHelp home page GithubHelp logo

Comments (4)

jpagliaccio avatar jpagliaccio commented on August 31, 2024

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.

Resultfactory avatar Resultfactory commented on August 31, 2024

"tlsio_openssl_destroy called while not in TLSIO_STATE_CLOSED" is not a fatal error. it will close any existing connection

from esp-azure.

robert-kuramshin avatar robert-kuramshin commented on August 31, 2024

@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.

jpagliaccio avatar jpagliaccio commented on August 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.