Error -76 from MbedTLS
Posted: Fri Jul 17, 2020 6:52 am
Hi everyone.
Hopefully someone of you can help me in my current project.
We are using ESP-IDF on the current stable version 4.0.1 with ESP-AZURE to send telemetry data to the Azure IoT Hub.
I have my main loop which uses the light sleep mode and configured the wifi with power safe mode with the following line:
I'm a little bit new to ESP32 and ESP-IDF.
Do I have to necessarily need to STOP and START the WIFI before light sleep and after light sleep?
Right now I'm having a main-loop which starts the light-sleep after 5 seconds for 5 seconds.
I've several tasks which are running all the time. One tasks sends my generated telemetry messages to IoT Hub (so uses the WIFI) with a periodically call to
After round about 287 messages the follwing error occures:
Error: Time:Tue Jul 14 10:04:30 2020 File:/Users/marius/esp/esp-azure/port/src/tlsio_esp_tls.c Func:tlsio_esp_tls_send_async Line:552 tlsio_esp_tls_send_async without a prior successful open
Error: Time:Tue Jul 14 10:04:30 2020 File:/Users/marius/esp/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:sendPacketItem Line:395 Failure sending control packet data
Error: Time:Tue Jul 14 10:04:30 2020 File:/Users/marius/esp/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:mqtt_client_publish Line:1101 Error: mqtt_client_publish send failed
Error: Time:Tue Jul 14 10:04:30 2020 File:/Users/marius/esp/esp-azure/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:publish_mqtt_telemetry_msg Line:898 Failed attempting to publish mqtt message
After this happened a few times following error is printed:
Error: Time:Tue Jul 14 10:04:44 2020 File:/Users/marius/esp/esp-azure/port/src/tlsio_esp_tls.c Func:tlsio_esp_tls_destroy Line:153 tlsio_esp_tls_destroy called while not in TLSIO_STATE_CLOSED.
I (2889204) azure_client:
Connection Status result:IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED, Connection Status reason: IOTHUB_CLIENT_CONNECTION_EXPIRED_SAS_TOKEN
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Core 0 register dump:
PC : 0x6572757a PS : 0x00060630 A0 : 0x800e48ae A1 : 0x3ffd90b0
A2 : 0x3ffd7944 A3 : 0x00000000 A4 : 0x3ffd7974 A5 : 0x40a68000
A6 : 0x7ff00000 A7 : 0x00000200 A8 : 0x801a0f92 A9 : 0x3ffd9080
A10 : 0x3ffd77ac A11 : 0x00000000 A12 : 0x3f40342c A13 : 0x002c15f4
A14 : 0x3f40b1cc A15 : 0x7ff5fb1c SAR : 0x00000004 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffff5
Backtrace:0x65727577:0x3ffd90b0 |<-CORRUPTED
This only happens with light sleep mode. If I'm commenting out the light sleep, the error seems to be disappeared.
I really need to get this done, thanks in advance!
Hopefully someone of you can help me in my current project.
We are using ESP-IDF on the current stable version 4.0.1 with ESP-AZURE to send telemetry data to the Azure IoT Hub.
I have my main loop which uses the light sleep mode and configured the wifi with power safe mode with the following line:
Code: Select all
esp_wifi_set_ps(WIFI_PS_MAX_MODEM);
Do I have to necessarily need to STOP and START the WIFI before light sleep and after light sleep?
Right now I'm having a main-loop which starts the light-sleep after 5 seconds for 5 seconds.
I've several tasks which are running all the time. One tasks sends my generated telemetry messages to IoT Hub (so uses the WIFI) with a periodically call to
Code: Select all
IoTHubDeviceClient_LL_DoWork
Error: Time:Tue Jul 14 10:04:30 2020 File:/Users/marius/esp/esp-azure/port/src/tlsio_esp_tls.c Func:tlsio_esp_tls_send_async Line:552 tlsio_esp_tls_send_async without a prior successful open
Error: Time:Tue Jul 14 10:04:30 2020 File:/Users/marius/esp/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:sendPacketItem Line:395 Failure sending control packet data
Error: Time:Tue Jul 14 10:04:30 2020 File:/Users/marius/esp/esp-azure/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:mqtt_client_publish Line:1101 Error: mqtt_client_publish send failed
Error: Time:Tue Jul 14 10:04:30 2020 File:/Users/marius/esp/esp-azure/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:publish_mqtt_telemetry_msg Line:898 Failed attempting to publish mqtt message
After this happened a few times following error is printed:
Error: Time:Tue Jul 14 10:04:44 2020 File:/Users/marius/esp/esp-azure/port/src/tlsio_esp_tls.c Func:tlsio_esp_tls_destroy Line:153 tlsio_esp_tls_destroy called while not in TLSIO_STATE_CLOSED.
I (2889204) azure_client:
Connection Status result:IOTHUB_CLIENT_CONNECTION_UNAUTHENTICATED, Connection Status reason: IOTHUB_CLIENT_CONNECTION_EXPIRED_SAS_TOKEN
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Core 0 register dump:
PC : 0x6572757a PS : 0x00060630 A0 : 0x800e48ae A1 : 0x3ffd90b0
A2 : 0x3ffd7944 A3 : 0x00000000 A4 : 0x3ffd7974 A5 : 0x40a68000
A6 : 0x7ff00000 A7 : 0x00000200 A8 : 0x801a0f92 A9 : 0x3ffd9080
A10 : 0x3ffd77ac A11 : 0x00000000 A12 : 0x3f40342c A13 : 0x002c15f4
A14 : 0x3f40b1cc A15 : 0x7ff5fb1c SAR : 0x00000004 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffff5
Backtrace:0x65727577:0x3ffd90b0 |<-CORRUPTED
This only happens with light sleep mode. If I'm commenting out the light sleep, the error seems to be disappeared.
I really need to get this done, thanks in advance!