aws / aws-iot-device-sdk-embedded-C

SDK for connecting to AWS IoT from a device using embedded C.
MIT License
980 stars 632 forks source link

Does this library work with Greengrass v2? #1725

Closed mleister97 closed 3 years ago

mleister97 commented 3 years ago

Hello,

could you please tell me the following: Is this library working (on Arduino/ESP 32/Node MCU/....) with the new Greengrass V2? I was not able to find any information about that. I know there is a new lib: https://github.com/aws/aws-iot-device-sdk-cpp-v2 but I am not sure how to use this new lib in combination with my arduino.

Any help appreciated. Thanks a lot.

arslan77 commented 3 years ago

Hello there,

I also want to know if this library can be used in Arduno UNO or ESP 8266 ?

I want to use greengrass with these microcontrollers or I have to upgrade the device to support the greengrass.

Thanks

dachalco commented 3 years ago

@gshvang Are you able to chime in?

yourslab commented 3 years ago

Yes, I'm assuming you are trying to setup an MQTT connection with the Greengrass Core. In doing so, you are able to use any MQTT client, including coreMQTT, which is bundled with this SDK and FreeRTOS. Please follow the tutorial here: https://docs.aws.amazon.com/greengrass/v2/developerguide/client-devices-tutorial.html

Under Connect client devices section, you will find setup instructions that are specific to the Python SDK. Instead of using the Python SDK, you can use the setup instructions for FreeRTOS given that AWS IoT Greengrass V2 support for client devices is backward-compatible with AWS IoT Greengrass V1. Although the Arduino is not directly supported under our reference integrations, our libraries are platform agnostic, making it very easy to write an application that can discover and connect to a Greengrass V2 Core over MQTT. You can also use the HTTP client and JSON parser provided in this SDK that will allow you to discover cores by making an HTTP request to greengrass-ats.iot.{aws-region}.amazonaws.com then parsing the response with the JSON parser.

mleister97 commented 3 years ago

@yourslab Your assumptions are correct. Thanks for clearification. I will try to combine these two instructions to communicate between my ESP32 device and the Greengrass core device.

mleister97 commented 3 years ago

I ended up using freeRTOS following the tutorial here: https://docs.aws.amazon.com/greengrass/v2/developerguide/client-devices-tutorial.html (Until section Connect client devices). https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html https://docs.aws.amazon.com/freertos/latest/userguide/gg-demo.html

yourslab commented 3 years ago

Happy to see that it worked for you, @mleister97. Feel free to reach out for more questions.