esp-azure compile fails when enabled SAMPLE_MQTT_OVER_WEBSOCKETS

zliudr
Posts: 357
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.

ajeger
Posts: 1
Joined: Fri Oct 15, 2021 10:25 pm

Re: esp-azure compile fails when enabled SAMPLE_MQTT_OVER_WEBSOCKETS

Postby ajeger » Sat Oct 16, 2021 12:30 pm

Hi

I am running tinto the same issue using IDF 4.3.1 and the latest esp-azure repo (where I thinbk this should be resolver). But I am also getting the undefined reference to "MQTT_Websocket_Protocol" lionker errors. Looks like the esp-azure\azure-iot-sdk-c\iothub_client\src\iothubtransportmqtt_websockets.c file is not compiling at all.

Were you able to resolve the issue?

Any hints appreciated, thanks
Andy

Who is online

Users browsing this forum: No registered users and 116 guests