OTA host MCU and esp32 with AWS

I’m working on a project that is using a host MCU that connects to an ESP32 via UART to connect to the internet. I can get the esp32 to update with the OTA demo in amazon freeRTOS. Now I’m looking to see how I can get the host MCU to update via OTA. I’m asking here to see if there is already a solution for this or best practice to do this. Another major issue is the OTA for the main MCU is about 5MB and the project is using the 4MB esp32. I’m looking for a way to stream the OTA through the ESP32, so the 4MB on the esp32 wont limit this from happening. Does anyone have any thoughts on how to make this work?

One idea I had was the host MCU should have AWS IoT Over the Air library on it and communicate with the esp32 with AT commands to pass through the data. However, this idea seems wasteful to me as both MCUs would then then certs to connect to AWS, thing names, etc.

Thank you, for any thoughts on this you have.

Hi,

Yes, you are right, a connectivity module will typically be used is to offload the security (key management) and computational processing of TLS encryption from the host MCU so that host MCU can be less complex. Hence its common to have certificate and TLS tunnel ending at the module and host MCU communicates with module using simple AT commands.

Is the overall memory on ESP32 a limiting factor here ? if so you can use a smaller buffer but still stream the entire image. For more details you can refer doc on how to stream a file using MQTT protocol.

You can also take a look at AWS IoT express link documentation here. The modules offloads the connectivity and device management from host MCU through a simple AT command interface. This looks to be suited to the use case you described.

@ravibhagavandas Yes, the ESP32 memory size is the limiting factor. We could solve this with buying a 16mb version, but we want a software solution to save $ on the hardware side. I’ll look into this MQTT file transfer, this looks promising. Thanks!

I did look into expresslink and it did sound great, but it doesn’t quite do everything I need. The following is more of a rant to the expresslink team… It’s a great idea and does about 80% of what I need, I just need a more developed solution. Specifically AT commands that allow a host to use BT and ability to OTA the host MCU with larger OTA files than the ESP32 flash size. Ideally, I would also like to get access to the source code to make minor changes and to be able to load it onto different versions of the esp32 line.

@DoubleH Thank you for the feedback for ExpresLink. You’re right about the BT capability and Host OTA file size constraint. We’re looking into it to see how we can improve.
Currently, the BT is HW specific and is up to the vendor to implement. Among different modules, Espressif ExpressLink module has BT capability and in fact the Wifi credentials for the module can be provisioned using BT and mobile app (see Espressif’s specific instructions here.

Please note that every ExpressLink modules come with identity, private key and certs preprovisioned, which require security hardware as well as manufacturing process to support. Simply loading the ExpressLink firmware onto the same or different ESP32 will not work. Are you interested in extending ExpressLink firmware to do application task outside of ExpressLink defined functionalities or looking for ExpressLink module on another ESP32 part?

We value your feedback to improve ExpressLink product. Should you have further questions or inquiries, I invite you to the AWS IoT ExpressLink forum for further discussion.