Guidance Needed: OTA and MQTT in AWS FreeRTOS Using STM32 with ESP32 Wi-Fi Modem

Hello, everyone!

I am currently working on a project to implement OTA (Over-the-Air updates) and MQTT in AWS FreeRTOS on an STM32 microcontroller, with an ESP32 acting as the Wi-Fi modem.

I have a couple of questions:

  1. Are there any demos or SDKs available for the setup I mentioned (AWS FreeRTOS with STM32 and ESP32)?
  2. Is it mandatory to use TLS for secure communication in AWS IoT Core, or are there alternatives?

Any guidance, resources, or best practices for getting started with this setup would be greatly appreciated. Looking forward to your insights!

Thank you!

Hello @Jhon,
Welcome to freertos forums.
For over the air updates, we have a modular OTA library, that you can read more about here: FreeRTOS announces availability of modular and composable OTA libraries. There is also a sample example of implementation here: Merge SwitchToNewOTA to main branch by chinglee-iot · Pull Request #45 · FreeRTOS/iot-reference-nxp-rt1060 · GitHub.

And yes TLS connection is required for IOT core

Note: the new modular ota uses combination of currently existing aws sdks.

There are more GRI here: AWS Reference Integrations - FreeRTOS™

As far as I know, there is no pre-configured project for this setup. You should take a step-by-step approach to connect to AWS IoT:

  1. First get the TCP working. You can verify that the TCP is working by communicating with a TCP echo server.
  2. Once you have the TCP working, integrate coreMQTT and get plaintext MQTT working. You can refer to these instructions for setting up a local MQTT broker which you can use for plaintext MQTT communication.
  3. Once you have plaintext MQTT working, integrate TLS and connect to AWS IoT.

Let us know if you face any problem.