Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Azure IoTHub MQTT connect issue

    Scheduled Pinned Locked Moved Issues & Bugs
    azuremqttmqtt connectwipy
    3 Posts 2 Posters 477 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      Milan
      last edited by

      What are the steps to reproduce this issue?

      1. Connect to WiFi network
      2. Call MQTTClient(...) with Azure IoTHub credentials.
      3. Call client.connect().

      What happens?

      Following error appears:

      Traceback (most recent call last):
      File "main.py", line 45, in
      File "/flash/lib/mqtt.py", line 85, in connect
      IndexError: bytes index out of range

      What were you expecting to happen?

      I'm expecting successfully MQTT connect to Azure IoTHub.

      What versions of software are you using?

      (sysname='LoPy4', nodename='LoPy4', release='1.18.1.r7', version='v1.8.6-849-d1c5ea9 on 2018-12-17', machine='LoPy4 with ESP32', lorawan='1.0.2', sigfox='1.0.1')

      1 Reply Last reply Reply Quote 0
      • P Offline
        Paul Thornton
        last edited by

        Hello,

        Just to let you know we are aware of this. Our MQTT libs were specifically written to support AWS. That said they should also work with Azure. I took a quick look last night into why they dont but ran out of time. I will be doing some more investigation today and hopefully will have a solution.

        1 Reply Last reply Reply Quote 1
        • M Offline
          Milan
          last edited by Milan

          Hello @Paul-Thornton ,

          Glad to here that, it's very important to me to have this possibility with Pycom. All my devices should be connected to Azure.

          I've done some researching and found out that your MQTT libs are sending bytes that Azure doesn't understand. Short description of this is on the link: https://www.youtube.com/watch?v=pRqpKZ7mO1s

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom