🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    AWS IoT SDK support

    Scheduled Pinned Locked Moved General
    11 Posts 2 Posters 14.7k Views
    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.
    • K Offline
      kulmam92
      last edited by

      Is there any way to install AWS IoT SDK to be able to use core2 as a greengrass client device?
      https://docs.aws.amazon.com//greengrass/v2/developerguide/client-devices-tutorial.html#connect-client-devices-tutorial

      1 Reply Last reply Reply Quote 0
      • ajb2k3A Offline
        ajb2k3
        last edited by

        For micropython?
        If you are just using MQTT to send data to green grass as shown in that article then you can use the included AWS functions along with MQTT function in the current UIFLOW/Micropython firmware.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          kulmam92
          last edited by kulmam92

          The sample(https://github.com/aws/aws-iot-device-sdk-python-v2/blob/main/samples/basic_discovery.py) uses below imports:

          import time
          import json
          from concurrent.futures import Future
          from awscrt import io
          from awscrt.mqtt import QoS
          from awsiot.greengrass_discovery import DiscoveryClient
          from awsiot import mqtt_connection_builder

          If you run that script on core2, you will get an error because concurrent, awscrt, and awsiot don't exist in the core2. It will be great if I can make those available from core2.

          1 Reply Last reply Reply Quote 0
          • K Offline
            kulmam92 @ajb2k3
            last edited by

            @ajb2k3 Did you have a chance to test out if there's any way to do this?

            1 Reply Last reply Reply Quote 0
            • ajb2k3A Offline
              ajb2k3
              last edited by

              @kulmam92 Sorry, up to my next dealing with the ATECC608b and security features of the Core2 AWS

              UIFlow, so easy an adult can learn it!
              If I don't know it, be patient!
              I've ether not learned it or am too drunk to remember it!
              Author of the WIP UIFlow Handbook!
              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kulmam92 @ajb2k3
                last edited by

                @ajb2k3 FYI, the below are the closest attempts that I was able to find.

                • Embed aws iot device sdk to Micropython as user C module - stackoverflow question
                • Releasing LTS of AWS IoT Device SDK for Embedded C on ESP32
                1 Reply Last reply Reply Quote 0
                • ajb2k3A Offline
                  ajb2k3
                  last edited by ajb2k3

                  Ok so from what I can work out (two days fighting to log into AWS!)
                  Any device works as a Grass client using MQTT or HTTP
                  No devices at present work as a Greengrass hub until CM4's become available enough to start production of the M5CM4 Hub.
                  You can use an RPI4 or equiv as the Greengrass hub or just use mosquitto service on the RPI4 or equivalent linux device.

                  UIFlow, so easy an adult can learn it!
                  If I don't know it, be patient!
                  I've ether not learned it or am too drunk to remember it!
                  Author of the WIP UIFlow Handbook!
                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                  K 1 Reply Last reply Reply Quote 0
                  • K Offline
                    kulmam92 @ajb2k3
                    last edited by kulmam92

                    @ajb2k3 Thank you for your effort and update. The flow that I have in mind is:

                    Core2(Greengrass client using aws IoT device SDK) -> RaspberryPi(Greengrass) -> AWS IoT Core

                    The reason that I want to use this is to demonstrate the features of the AWS Greengrass like:

                    • ML at the edge: core2 send image to RaspberryPi(Greengrass) and run ML like object detection.
                    • device shadow
                    • device defender

                    You may send message to RsapberryPi(Greengrass) via mqttclient like below but you can’t use device shadow or device defender.

                    https://www.rosietheredrobot.com/2019/03/green-green-grass-of-home.html?m=1

                    I hope this give you a clear picture of what I’m trying to do.

                    ajb2k3A 1 Reply Last reply Reply Quote 0
                    • ajb2k3A Offline
                      ajb2k3 @kulmam92
                      last edited by

                      @kulmam92 from what I gather DeviceShadow/Device Twin and device defender work between the GGgateway and AWS IOT server.

                      UIFlow, so easy an adult can learn it!
                      If I don't know it, be patient!
                      I've ether not learned it or am too drunk to remember it!
                      Author of the WIP UIFlow Handbook!
                      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                      1 Reply Last reply Reply Quote 0
                      • ajb2k3A Offline
                        ajb2k3
                        last edited by ajb2k3

                        @kulmam92 love the humour you put in your post and it looks great so far.
                        Cpt.James.Purcell (my split personality) just subscribed to rosietherobot

                        UIFlow, so easy an adult can learn it!
                        If I don't know it, be patient!
                        I've ether not learned it or am too drunk to remember it!
                        Author of the WIP UIFlow Handbook!
                        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                        K 1 Reply Last reply Reply Quote 0
                        • K Offline
                          kulmam92 @ajb2k3
                          last edited by kulmam92

                          @ajb2k3 I’m afraid but I’m not the author of that post. But, I agree that it’s a well written one. Regarding device shadow, this is what I meant:
                          local shadow.png

                          • Interact with device shadows
                          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
                          • First post
                            Last post