ESP-IDF file download and OTA over MQTT

AnthonyThet
Posts: 11
Joined: Sun Sep 06, 2020 6:46 am

ESP-IDF file download and OTA over MQTT

Postby AnthonyThet » Mon Jul 04, 2022 6:47 am

Hi Everyone,
I am currently working on a project which involves STM32MCU and ESP32 Module.
STM32 Main task is to read data from sensors and control some peripherals communicate with ESP32 via UART comms and ESP32 will relay the message back to the MQTT broker.
Currently I need to face two major challenges.
1. Need to OTA-update STM32 firmware and
2. Need to OTA-update ESP32 itself via MQTT only.
( I couldn't set HTTP server as we won't have much access to go the site for firmware update. So we have to use the current MQTT protocol)

I found an open source example to download the STM32 firmware bin file and upload to STM32 via UART but they use HTTP not the MQTT. So how can I download STM32 firmware bin file to ESP32 using MQTT?
And I also can find espressif example of OTA update only via HTTPS. So is there any example or project that I can refer to for this as well?
I am currently developing it on esp-idf-v4.3.1.

Need your kind help....
Thanks so much in advance.

Who is online

Users browsing this forum: No registered users and 113 guests