Greengrass V2 & AWS IoT Core: Update connected µController

0

Hi,

I have a Raspberry PI which is a core device and connected to the AWS IOT Core via Greengrass V2. Connected to the Raspberry PI there is a µController which has it's own Firmware. I want to update that Firmware from within the AWS; what would be the best possible way to do it. The µController itself is no device in the AWS IOT Core.

Thanks and Best Regards, Manuel

Phobios
asked a year ago373 views
2 Answers
0

Hello Manuel,

Thank you for your Question.

We have an AWS Blog that discusses performing secondary processor over-the-air updates with FreeRTOS - https://aws.amazon.com/blogs/iot/how-to-perform-secondary-processor-over-the-air-updates-with-freertos/ . For additional details on how to set up OTA using FreeRTOS and AWS IoT Device Management, refer to the FreeRTOS OTA tutorial [1].Here the OTA update and secondary device ( in your case the microcontroller ) running FreeRTOS, which is connected to the Raspberry Pi requires that the device must support installing FreeRTOS.

Coming to the recommended communication protocols (SPI or I2C) between your Raspberry Pi and MicroController, these protocols are supported by the hardware which you may use and is limited to the recommended protocol by the hardware vendors. The communication between the devices Greengrass Core device and the IoT Core is done over MQTT. The use of hardware communication protocols would not affect the Greengrass communication performance. For example, if you have a sensor or a camera running on your MicroController board, the connection between the sensor and the MicroController board can be via GPIO pins, SPI or I2C or whichever protocol is supported by the MicroController board. The communication between the MicroController board and the Raspberry Pi will take place over MQTT as they will be a part of the Core device.

However, if the workaround suggested in the blog is not suitable for your use-case, then you may need to develop a custom component[2] to download the firmware to your Greengrass Core device first and then using MQTT, transfer the same to your end device (Microcontroller).

References: [1] OTA tutorial - https://docs.aws.amazon.com/freertos/latest/userguide/dev-guide-ota-workflow.html [2] AWS IoT Greengrass development tools - https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-development-tools.html

AWS
SUPPORT ENGINEER
Rahul_P
answered a year ago
0

Hi Rahul,

thank you for your quick answer and the links. I've looked into it and the option to use the µController as IoT client things looks fine; but I have to check whether this is possible with my Firmware & operation System. See we don't use freeRTOS - we use Zephyr. WE also have to different sensors connected to the CORE device. (One time via UART and one time via Bluetooth Low Energy)

In case I decide to develop a custom component and take care of the OTA Update myself. How would you handle the different updates and firmware versions.

  • Should each µController-update be like a component revision? So the firmware (HEX file) is coupled with the Greengrass component version. If a new update is needed I have to publish a new component version (with the HEX file in it)
  • Or is there a way where the component version is fix and I only can send the hex file to it. I think of it like a configuration file. So my component is handling the update, if it receives a new hex file, it starts the OTA. Is there a simple way to do that?
Phobios
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions