esp-azure compile fails when enabled SAMPLE_MQTT_OVER_WEBSOCKETS

zliudr
Posts: 51
Joined: Thu Oct 03, 2019 5:15 am

esp-azure compile fails when enabled SAMPLE_MQTT_OVER_WEBSOCKETS

Postby zliudr » Thu Oct 03, 2019 4:44 pm

This issue is related to my other problem and I think it may be the source of the other issue, device twin not updating or accepting methods.

I am building the esp-azure device twin sample code. I added some debug printf to the event handlers. Despite setting device twin properties on server and sending direct methods, the esp32 side prints out no debug info. I suspect the communication from server to device is blocked by firewall. I switched an option in the code to use MQTT over websocket but the very last step or so failed to compile:
Compile time for success is about 6 min 40 sec and this compile took 6 min 20 sec so it's very last step or two:

Generating libwifi_provisioning.a.sections_info
Generating libwpa_supplicant.a.sections_info
Generating libxtensa-debug-module.a.sections_info
Generating esp32.project.ld
LD build/iothub_devicetwin_samples_and_methods.elf
C:/Users/user/Downloads/msys32/home/user/esp/esp-azure/examples/iothub_devicetwin_samples_and_methods/build/main\libmain.a(iothub_client_device_twin_and_methods_sample.o):(.literal.iothub_client_device_twin_and_methods_sample_run+0x4): undefined reference to `MQTT_WebSocket_Protocol'
collect2.exe: error: ld returned 1 exit status
make: *** [C:/Users/user/Downloads/msys32/home/user/esp/esp-idf/make/project.mk:483: /home/qk9446me/esp/esp-azure/examples/iothub_devicetwin_samples_and_methods/build/iothub_devicetwin_samples_and_methods.elf] Error 1

I don't know how to resolve this issue. Meanwhile maybe port forwarding will temporarily solve it but is NOT the solution I'm looking for.

If you have any idea how to enable websocket for MQTT, I appreciate your help. I could add a little incentive to a successful demo if that helps.

Who is online

Users browsing this forum: Bing [Bot], somesh and 13 guests