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

    AWS IoT Device Support for LoPy

    Scheduled Pinned Locked Moved LoPy
    25 Posts 10 Posters 12.3k Views 13 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.
    • J Offline
      jomifo Pybytes Beta
      last edited by

      @daniel Could you please confirm your AWS IoT demo still works for you?
      I am using the latest firmware and when trying to connect to the MQTT broker using the REPL, I get OSError 0-

      >>> connection.connect(ssl=True, certfile='/flash/cert/lopy-gateway.cert.pem', keyfile='/flash/cert/lopy-gateway.private.key', ca_certs='/flash/cert/root-CA.crt')
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "simple.py", line 79, in connect
      OSError: 0
      >>>                                          
      >>> 
      >>> import os
      >>> os.uname()
      (sysname='LoPy', nodename='LoPy', release='1.0.1.b1', version='v1.8.6-265-g5722083 on 2016-12-22', machine='LoPy with ESP32')
      
      D 1 Reply Last reply Reply Quote 0
      • D Offline
        daniel @jomifo
        last edited by

        @jomifo I'll be performing some tests this morning and get I'll get back with an update shortly.

        Cheers,
        Daniel

        1 Reply Last reply Reply Quote 0
        • D Offline
          daniel
          last edited by

          @jomifo I can confirm that the issue is there, we also get the exception with OSError 0. We'll investigate it and provide and solution on tomorrow's release.

          1 Reply Last reply Reply Quote 0
          • J Offline
            jomifo Pybytes Beta
            last edited by

            @daniel - I tried this in the latest release (1.1.0.b1) and am now getting a different OSError. Just wondering if you were able to address this in the latest release and verify your AWS IoT demo works so I know if it is something on my end. Thanks.

            >>> from simple import MQTTClient
            >>> DEVICE_ID = "lopy-gateway"
            >>> HOST = "[redacted]"
            >>> TOPIC_DOWNLOAD = "Download"
            >>> TOPIC_UPLOAD = "Upload"
            >>> connection = MQTTClient(DEVICE_ID, server=HOST, port=8883)
            >>> connection.connect(ssl=True, certfile='/flash/cert/lopy-gateway.cert.pem', keyfile='/flash/cert/lopy-gateway.private.key', ca_certs='/flash/cert/root-CA.crt')
            Traceback (most recent call last):
              File "<stdin>", line 1, in <module>
              File "simple.py", line 77, in connect
            OSError: -32512
            >>> import os
            >>> os.uname()
            (sysname='LoPy', nodename='LoPy', release='1.1.0.b1', version='v1.8.6-274-g9a2018f on 2016-12-29', machine='LoPy with ESP32')
            >>> 
            
            1 Reply Last reply Reply Quote 0
            • D Offline
              daniel
              last edited by

              @jomifo we are also experiencing that error and it is caused by the changes made to integrate the Bluetooth stack. We are still investigating the exact root cause. Apologies for the the delay.

              J 1 Reply Last reply Reply Quote 0
              • J Offline
                jomifo Pybytes Beta @daniel
                last edited by

                @daniel No problem. Thanks for the quick confirmation reply.

                1 Reply Last reply Reply Quote 0
                • G Offline
                  gertjanvanhethof Pybytes Beta
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    daniel
                    last edited by

                    @gertjanvanhethof no, we are still busy trying to solve it. It's going to have to wait for the next release.

                    J 1 Reply Last reply Reply Quote 0
                    • U Offline
                      ubiq_01 Pybytes Beta @daniel
                      last edited by

                      Hello Daniel, dear all,

                      I used your code and could do interaction with a custom mosquitto MQTT broker + Let's encrypt certificate (so using TLS on port 8883 and server authentication) from my WiPy. Still using the older firmware from Dec 16th which works fine with TLS + certificates.
                      https://twitter.com/_rac01/status/814894297208287237

                      Many thanks for the great work!
                      Ralf

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        jomifo Pybytes Beta @daniel
                        last edited by

                        @daniel Just checking... this is still an open issue, correct? Thanks.

                        J 1 Reply Last reply Reply Quote 2
                        • J Offline
                          juriw
                          last edited by

                          @daniel also interested in a working sample code.

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            juriw @jomifo
                            last edited by

                            @jomifo I have made a mini guide for this issue: https://forum.pycom.io/topic/908/umqtt-aws-iot

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              RSK
                              last edited by

                              @juriw Thanks a Lot!

                              1 Reply Last reply Reply Quote 0
                              • G Offline
                                Gurpreet Singh Banned @RSK
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  Armen Edvard Banned
                                  last edited by

                                  This post is deleted!
                                  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
                                  • 2
                                  • 1 / 2
                                  • First post
                                    Last post

                                  Pycom on Twitter

                                  Pycom