Hello,
I am trying to determine if the esp-mqtt library is suitable to use for OTA updates via MQTT. The question arose as a result of viewing this other forum post:
viewtopic.php?f=2&p=122070.
It seems that I should generally avoid using the esp-aws-iot library, though AWS has specific documentation pertaining to OTA when using coreMQTT. I cannot find any documentation related to esp-mqtt and OTA specifically though.
Does anybody have any insight into this? Might it be easier to just use esp-aws-iot in this instance? Would using both esp-aws-iot, specifically for OTA, and esp-mqtt, for other MQTT messages, within the same project be an acceptable and easier approach?
Thanks,
Brandon
ESP-MQTT usage for OTA updates
Re: ESP-MQTT usage for OTA updates
Hi.
I'm also in the process of implementing OTA on AWS. I also felt that the esp-aws-iot examples that use aws sdk libraries are unnecessarily complex. So I decided to implement it using esp-idf libraries.
I used esp-mqtt for provisioning certificates and private keys to devices (provisioning by claim) and really liked the how it turned out. I mostly followed the aws docs and used esp-aws-iot as a template. The final implementation was much more readable and easier to understand.
But I'm not completely sure about OTA as I haven't finished its implementation yet.
For now I decided to not use FreeRTOS OTA job template on aws. Instead I created a custom job template that generates a pre-signed url from S3 and sends it to the esp32 board. After that flashing the firmware from URL is trivial. It's almost the same as the esp-https-ota example.
But updating the aws job status is a little bit awkward as the topics for updating the job depend on the jobId. I'm still trying to find a decent solution for it.
This was more or less my experience with it so far.
I'm also in the process of implementing OTA on AWS. I also felt that the esp-aws-iot examples that use aws sdk libraries are unnecessarily complex. So I decided to implement it using esp-idf libraries.
I used esp-mqtt for provisioning certificates and private keys to devices (provisioning by claim) and really liked the how it turned out. I mostly followed the aws docs and used esp-aws-iot as a template. The final implementation was much more readable and easier to understand.
But I'm not completely sure about OTA as I haven't finished its implementation yet.
For now I decided to not use FreeRTOS OTA job template on aws. Instead I created a custom job template that generates a pre-signed url from S3 and sends it to the esp32 board. After that flashing the firmware from URL is trivial. It's almost the same as the esp-https-ota example.
But updating the aws job status is a little bit awkward as the topics for updating the job depend on the jobId. I'm still trying to find a decent solution for it.
This was more or less my experience with it so far.
Re: ESP-MQTT usage for OTA updates
Wanted to update, I ended up only using esp-aws-iot to handle both normal MQTT message transmission and OTA. I found the examples to be very bloated, but easy enough to build off of and follow.
Last edited by BDesterBE on Thu Mar 14, 2024 4:32 pm, edited 1 time in total.
Re: ESP-MQTT usage for OTA updates
Couple years ago ive been working with AWS-FreeRTOS, which has had support for OTA from aws.
https://docs.aws.amazon.com/freertos/la ... arted.html
Currently it seems to be deprecated, but i found this on freertos site, which i believe is worth to study:
https://freertos.org/lts-libraries.html
And this one should be interesting
https://freertos.org/ota/index.html
https://freertos.org/featured-freertos- ... isc-v-mcu/
https://github.com/FreeRTOS/iot-referen ... qtt_demo.c
https://docs.aws.amazon.com/freertos/la ... arted.html
Currently it seems to be deprecated, but i found this on freertos site, which i believe is worth to study:
https://freertos.org/lts-libraries.html
And this one should be interesting
https://freertos.org/ota/index.html
https://freertos.org/featured-freertos- ... isc-v-mcu/
https://github.com/FreeRTOS/iot-referen ... qtt_demo.c
Who is online
Users browsing this forum: No registered users and 81 guests