Skip to content

IOT Hub requires TLS #60

Closed
Closed
@geudrik

Description

@geudrik

IOT Hub requires TLS for MQTT connections now. Changing the port to 443 and adding is_ssl=True on the MQTT client init in iot_mqtt.py doesn't work though. After that change, I get the following

498.412: INFO - Establishing a SECURE SSL connection to hubname.azure-devices.net:443
499.814: DEBUG - Sending CONNECT to broker...
499.816: DEBUG - Fixed Header: bytearray(b'\x10\xfe\x01\x00')
499.818: DEBUG - Variable Header: bytearray(b'\x04MQTT\x04\xc2\x00x')
499.826: DEBUG - Receiving CONNACK packet from broker
499.850: DEBUG - Got message type: 0x48
499.853: DEBUG - Got message type: 0x54
499.855: DEBUG - Got message type: 0x54
499.857: DEBUG - Got message type: 0x50
499.860: DEBUG - Got message type: 0x2f
499.863: INFO - MMQT error: Topic length 12576 in PUBLISH packet exceeds remaining length 46 - 2

I'm not familiar enough with MQTT to understand what this is actually telling me. But ultimately, this library doesn't currently work because of the TLS requirement and it's not supported (at all) without making code changes in the lib.

The code I'm using for testing is the default example code in this repo (example code), with the added addition of an adafruit_logger() instance to the IOTHubDevice init

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions