adafruit / Adafruit_CircuitPython_AzureIoT

Access to Microsoft Azure IoT device, messaging, and job services from CircuitPython!
MIT License
20 stars 15 forks source link

Subscribing to topic /messages/devicebound/ results in wait_for_msg timeout exception #57

Open cassimv opened 1 year ago

cassimv commented 1 year ago

I am having issues subscribing to the IOT HUB messages topic.

Connecting to Azure IoT Hub... 55139.563: INFO - - iot_mqtt :: connect :: xxx.azure-devices.net 55139.563: DEBUG - - iot_mqtt :: _on_connect :: username = xxx, password = yyy 55139.563: DEBUG - Attempting to connect to MQTT broker (attempt #0) 55139.578: DEBUG - Attempting to establish MQTT connection... 55139.578: INFO - Establishing a SECURE SSL connection to xxx:8883 55142.422: DEBUG - Sending CONNECT to broker... 55142.422: DEBUG - Fixed Header: bytearray(b'\x10\x80\x02\x00') 55142.438: DEBUG - Variable Header: bytearray(b'\x04MQTT\x04\xc2\x00x') 55142.453: DEBUG - Receiving CONNACK packet from broker 55142.734: DEBUG - Got message type: 0x20 55142.734: INFO - - iot_mqtt :: _on_connect :: rc = 0, userdata = None 55142.750: DEBUG - Resetting reconnect backoff 55142.750: INFO - - iot_mqtt :: connect :: created mqtt client. connecting.. 55142.750: INFO - - iot_mqtt :: connect :: on_connect must be fired. Connected ? True 55142.766: DEBUG - SUBSCRIBING to topic devices/xxxxx/messages/devicebound/# with QoS 0

Traceback (most recent call last): File "", line 61, in File "/lib/adafruit_azureiot/iothub_device.py", line 325, in connect File "/lib/adafruit_azureiot/iot_mqtt.py", line 415, in connect File "/lib/adafruit_azureiot/iot_mqtt.py", line 374, in _subscribe_to_core_topics File "adafruit_minimqtt/adafruit_minimqtt.py", line 831, in subscribe File "adafruit_minimqtt/adafruit_minimqtt.py", line 1041, in _wait_for_msg MMQTTException:

Any ideas ?