Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Adafruit Huzzah ESP32 Crash after Azure IoT Hub Timeout - Running Microsoft Sample Code  #4

@jpagliaccio

Description

@jpagliaccio

I followed the Microsoft Tutorial and got Azure working for the Adafruit Huzzah32 Feather. I set the message timer to send to Azure to 90 seconds. But every 20-30 messages it crashes and reboots the Huzzah.

Here is the serial out. You can see message 30 and 31 are okay. But then there is a timeout and when it tries to reconnect there is a SNTP failure.

Any ideas how to fix would be great. Thanks.

Msg: {"deviceId":"Esp32Device", "messageId":30, "Temperature":4.000000, "Humidity":19.200001}
Info: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
Info: >>>Confirmation[29] received for message tracking id = 29 with result = IOTHUB_CLIENT_CONFIRMATION_OK
Send Confirmation Callback finished.

Msg: {"deviceId":"Esp32Device", "messageId":31, "Temperature":7.000000, "Humidity":77.099998}
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.

Info: >>>Connection status: timeout
Info: >>>Re-connect.
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 0x400e3b83 on core 1

Backtrace: 0x4008fac0:0x3ffb1d10 0x4008fcc3:0x3ffb1d30 0x400e3b83:0x3ffb1d50 0x40119945:0x3ffb1d80 0x400d3bc6:0x3ffb1da0 0x400d3f26:0x3ffb1dc0 0x400d33ce:0x3ffb1de0 0x400d3702:0x3ffb1e20 0x400d3869:0x3ffb1e40 0x400d274f:0x3ffb1e60 0x4014855c: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...

WiFi
Connecting...
..WiFi connected
IP address: 192.168.1.59
IoT Hub
Info: Initializing SNTP
Info: SNTP initialization complete
Info: IoT Hub SDK for C, version 1.1.23
Info: >>>Connection status: connected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions