Hello lovely people,
I’ve inherited some code that uses an earlier version of the ESP-AWS-IoT framework (release v3.1.x), at GitHub - espressif/esp-aws-iot at release/v3.1.x) for adding MQTT communications to an ESP32, allowing it to communicate with AWS over MQTT and provide a system with IoT-type functionality (remote changing of settings, reporting of data from the system, etc.).
That part all works well, so I didn’t want to change it, but now I need to add OTA functionality to that, with the intention of using the methods described on AWS, where a signed firmware update is deployed to a device registered as a thing on AWS, using the OTA Update Manager service (which creates an job on AWS that notifies the device that an update is available, then the OTA Agent on the ESP32 publishes requests to AWS IoT, to obtain updates using the MQTT protocol), as described in all of this stuff here: FreeRTOS Over-the-Air Updates - FreeRTOS
The earlier release of the ESP-AWS-IoT framework doesn’t seem to have any OTA parts to it, though, and while the latest version (here: GitHub - espressif/esp-aws-iot: AWS IoT SDK for ESP32 based chipsets) does have OTA (and looks like it might be able to do all of the things mentioned above, integrating with AWS jobs to allow OTA updates to be easily deployed), it is very different to the earlier version (all of the MQTT functions have changed, as well as many variables and structures being changed or introduced).
So I’m not sure whether I should translate the old, working code to use the functionality, variables, etc. of the new version, or try and take just the OTA parts from the new code, to add into the older version.
So far I have tried adding in some OTA/demo functionality from the new version, but it’s a slog, as the versions are so different, and the ESP32, AWS, VS Code, PlatformIO and all of that are still quite new to me. I can’t seem to import the code as one submodule (or similar) and get PlatformIO to locate the files (both for the IntelliSense-type functionality and when building), so that leads to a slow dismantling and rearranging of the files, which is taking forever.
I found an excellent translation of one of the esp-idf OTA examples by @maxgerhardt into code that works on PlatformIO, here: ESP32 OTA default examples don't work in PlatformIO but those are more about obtaining the firmware from a local server.
I wonder if there’s anyone out there who has been following developments in these repositories, and can give any ideas on how best to proceed with this?
Thank you for any help you can give.