adafruit / adafruit/Adafruit_CircuitPython_AzureIoT

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

Open
#57 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
19
Forks
13
PR merge metrics
No merged PRs in 30d

Description

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 ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Trace the connection flow from adafruit_azureiot/iothub_device.py:connect through iot_mqtt.py:connect and _subscribe_to_core_topics, then inspect adafruit_minimqtt/adafruit_minimqtt.py:subscribe and _wait_for_msg. Reproduce the device-bound topic subscription timeout; done means the subscription completes without MMQTTException and device-bound messages can be received.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.