ESP Azure IoT SDK issue

Andrzej.T
Posts: 6
Joined: Mon Mar 11, 2019 10:04 am

ESP Azure IoT SDK issue

Postby Andrzej.T » Mon Jun 10, 2019 8:15 am

Hi,
I have a problem with Azure IoT library from https://github.com/espressif/esp-azure
I get lots of errors from mqtt library.
This is my log:

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6184
load:0x40078000,len:10168
load:0x40080400,len:6632
entry 0x40080764
I (28) boot: ESP-IDF v3.3-dev-206-g7b1777dd3 2nd stage bootloader
I (28) boot: compile time 09:18:15
I (28) boot: Enabling RNG early entropy source...
I (34) boot: SPI Speed : 40MHz
I (38) boot: SPI Mode : DIO
I (42) boot: SPI Flash Size : 2MB
I (46) boot: Partition Table:
I (50) boot: ## Label Usage Type ST Offset Length
I (57) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (65) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (72) boot: 2 factory factory app 00 00 00010000 00100000
I (80) boot: End of partition table
I (84) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x242c4 (148164) map
I (145) esp_image: segment 1: paddr=0x000342ec vaddr=0x3ff80000 size=0x00000 ( 0) load
I (145) esp_image: segment 2: paddr=0x000342f4 vaddr=0x3ff80000 size=0x00000 ( 0) load
I (151) esp_image: segment 3: paddr=0x000342fc vaddr=0x3ffb0000 size=0x02ebc ( 11964) load
I (165) esp_image: segment 4: paddr=0x000371c0 vaddr=0x3ffb2ebc size=0x00000 ( 0) load
I (169) esp_image: segment 5: paddr=0x000371c8 vaddr=0x40080000 size=0x00400 ( 1024) load
I (179) esp_image: segment 6: paddr=0x000375d0 vaddr=0x40080400 size=0x08a40 ( 35392) load
I (202) esp_image: segment 7: paddr=0x00040018 vaddr=0x400d0018 size=0x8fc94 (588948) map
I (408) esp_image: segment 8: paddr=0x000cfcb4 vaddr=0x40088e40 size=0x08378 ( 33656) load
I (423) esp_image: segment 9: paddr=0x000d8034 vaddr=0x400c0000 size=0x00000 ( 0) load
I (423) esp_image: segment 10: paddr=0x000d803c vaddr=0x50000000 size=0x00000 ( 0) load
I (430) esp_image: segment 11: paddr=0x000d8044 vaddr=0x50000000 size=0x00000 ( 0) load
I (449) boot: Loaded app from partition at offset 0x10000
I (449) boot: Disabling RNG early entropy source...
I (450) cpu_start: Pro cpu up.
I (454) cpu_start: Starting app cpu, entry point is 0x40081020
I (0) cpu_start: App cpu up.
I (464) heap_init: Initializing. RAM available for dynamic allocation:
I (471) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (477) heap_init: At 3FFB8F60 len 000270A0 (156 KiB): DRAM
I (483) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (490) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (496) heap_init: At 400911B8 len 0000EE48 (59 KiB): IRAM
I (502) cpu_start: Pro cpu start user code
I (185) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (274) wifi: wifi driver task: 3ffc0a80, prio:23, stack:3584, core=0
I (274) wifi: wifi firmware version: cf7682f
I (274) wifi: config NVS flash: enabled
I (284) wifi: config nano formating: disabled
I (284) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (294) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (324) wifi: Init dynamic tx buffer num: 32
I (324) wifi: Init data frame dynamic rx buffer num: 32
I (324) wifi: Init management frame dynamic rx buffer num: 32
I (334) wifi: Init static rx buffer size: 1600
I (334) wifi: Init static rx buffer num: 10
I (334) wifi: Init dynamic rx buffer num: 32
I (344) azure: Setting WiFi configuration SSID HTC...
I (414) phy: phy_version: 4000, b6198fa, Sep 3 2018, 15:11:06, 0, 0
I (414) wifi: mode : sta (24:0a:c4:c0:fb:00)
I (1144) wifi: n:6 0, o:1 0, ap:255 255, sta:6 0, prof:1
I (2124) wifi: state: init -> auth (b0)
I (2134) wifi: state: auth -> assoc (0)
I (2144) wifi: state: assoc -> run (10)
I (2164) wifi: connected with HTC, channel 6
I (2164) wifi: pm start, type: 1

I (3274) event: sta ip: 192.168.1.220, mask: 255.255.255.0, gw: 192.168.1.1
I (3274) azure: Connected to AP success!
Initializing SNTP
ESP platform sntp inited!
Time is not set yet. Connecting to WiFi and getting time over NTP. timeinfo.tm_year:70
Waiting for system time to be set... tm_year:0[times:1]
I (5294) platform: The current date/time is: Mon Jun 10 07:39:33 2019
I (5294) azure: Connected to Azure
-> 07:39:35 CONNECT | VER: 4 | KEEPALIVE: 240 | FLAGS: 192 | USERNAME: XXX.azure-devices.net/000001/?api-version=2017-11-08-preview&DeviceClientType=iothubclient%2f1.2.14%20(native%3b%20freer
tos%3b%20esp%20platform) | PWD: XXXX | CLEAN: 0
<- 07:39:36 CONNACK | SESSION_PRESENT: true | RETURN_CODE: 0x0


Connection Status result:IOTHUB_CLIENT_CONNECTION_AUTHENTICATED, Connection Status reason: IOTHUB_CLIENT_CONNECTION_OK

<- 07:39:36 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE = 0x01 | TOPIC_NAME: devices/000001/messages/devicebound/%24.mid=0d05fbff-ce4b-4a3a-a6e2-f87a18d677dc&%24.to=%2Fde
vices%2F000001%2Fmessages%2FdeviceBound&iothub-ack=full | PACKET_ID: 73 | PAYLOAD_LEN: 7
Received Message [0]
Message ID: 0d05fbff-ce4b-4a3a-a6e2-f87a18d677dc
Correlation ID: <null>
Data: <<<fghdgfh>>> & Size=7
-> 07:39:36 SUBSCRIBE | PACKET_ID: 2 | TOPIC_NAME: devices/000001/messages/devicebound/# | QOS: 1
<- 07:39:46 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_LEAST_ONCE = 0x01 | TOPIC_NAME: devices/000001/messages/devicebound/%24.mid=40a50960-d3b2-4viceBound&iothub-ack=full | PACKET
_ID: 14132 | PAYLOAD_LEN: 7
Received Message [1]
Message ID: 40a50960-d3b2-4viceBound
Correlation ID: <null>
Data: <<<f0a16-9>>> & Size=7
Error: Time:Mon Jun 10 07:39:46 2019 File:../../main/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:byteutil_readUTF Line:160 String passed not a valid UTF.
Error: Time:Mon Jun 10 07:39:46 2019 File:../../main/azure-iot-sdk-c/umqtt/src/mqtt_client.c Func:ProcessPublishMessage Line:615 Publish MSG: failure reading topic name
Error: Time:Mon Jun 10 07:39:46 2019 File:../../main/azure-iot-sdk-c/iothub_client/src/iothubtransport_mqtt_common.c Func:mqtt_error_callback Line:1871 INTERNAL ERROR: unexpected error value
received MQTT_CLIENT_PARSE_ERROR
E (19114) esp-tls: read error :-28928:
Error: Time:Mon Jun 10 07:39:46 2019 File:../../main/port/src/tlsio_esp_tls.c Func:tlsio_esp_tls_destroy Line:152 tlsio_esp_tls_destroy called while not in TLSIO_STATE_CLOSED.
CORRUPT HEAP: multi_heap.c:432 detected at 0x3ffbabd0
abort() was called at PC 0x4008e2df on core 0

Backtrace: 0x4008e9dc:0x3ffc68d0 0x4008ec09:0x3ffc68f0 0x4008e2df:0x3ffc6910 0x40087e91:0x3ffc6930 0x40087ebd:0x3ffc6950 0x40088891:0x3ffc6970 0x4000beaf:0x3ffc6990 0x4008ba36:0x3ffc69b0 0x40
08bc68:0x3ffc69d0 0x400886a6:0x3ffc69f0 0x400886cc:0x3ffc6a10 0x40088811:0x3ffc6a40 0x400e4ab7:0x3ffc6a60 0x400e0911:0x3ffc6d20 0x400e08a0:0x3ffc6d70 0x4008e0a3:0x3ffc6da0 0x4008e3a3:0x3ffc6d
c0 0x40087f7a:0x3ffc6de0 0x4008ae19:0x3ffc6e00 0x40141692:0x3ffc6e20 0x401494b5:0x3ffc6e40 0x4013bfdc:0x3ffc6e60 0x4013c80b:0x3ffc6e80 0x400dcc5e:0x3ffc6ea0 0x400dccce:0x3ffc6ec0 0x400ded47:0
x3ffc6ee0 0x400d7e7b:0x3ffc6f00 0x400d8563:0x3ffc6f20 0x400d99fd:0x3ffc6f50 0x400d6915:0x3ffc6f80 0x400d457d:0x3ffc6fa0 0x400d3d71:0x3ffc6fd0 0x400d3000:0x3ffc6ff0 0x4008b419:0x3ffc7020

Rebooting...
ets Jun 8 2016 00:22:57

Thanks.

Regards,
Andrzej

Andrzej.T
Posts: 6
Joined: Mon Mar 11, 2019 10:04 am

Re: ESP Azure IoT SDK issue

Postby Andrzej.T » Tue Jun 11, 2019 10:20 am

Ok, I have solved this issue.
Thanks.

Regards,
Andrzej T

sagar448
Posts: 2
Joined: Thu Jul 25, 2019 11:31 pm

Re: ESP Azure IoT SDK issue

Postby sagar448 » Thu Jul 25, 2019 11:34 pm

Andrzej.T wrote:
Tue Jun 11, 2019 10:20 am
Ok, I have solved this issue.
Thanks.

Regards,
Andrzej T
Hey Andrze, I am also trying to get the ESP-IDF to work with the Azure IoT SDK C, could you please help me? The i set the include dirs in the cmakelist for idf, it does find the header files but it says undefined reference to the functions, please help!

mengzihoudai
Posts: 1
Joined: Wed Jul 31, 2019 6:45 am

Re: ESP Azure IoT SDK issue

Postby mengzihoudai » Wed Jul 31, 2019 6:49 am

Andrzej, how did you solve this issue?
I met completely the same error log ("MQTT_CLIENT_PARSE_ERROR") as you once met.
Could you share with me about the solution?
Thanks!
Andrzej.T wrote:
Tue Jun 11, 2019 10:20 am
Ok, I have solved this issue.
Thanks.

Regards,
Andrzej T

Who is online

Users browsing this forum: No registered users and 1 guest