I need to be able to upload updated firmware to the devices that I have deployed in the field. (By firmware I mean my application package and not the Mediatek firmware/bootloader). I'm using the AWS IoT service to send/receive commands and data from the devices. Here's how I have thought of implementing it:
- Send FOTA "command" to device over MQTT with URL of the update package.
- In the package, have an executable shell script that would backup and overwrite the existing files
- Once the device successfully downloads the update package execuate the shell script
- Hope that the device comes back online!
Is there a better way of doing it? And is there any obvious mistakes that I making in going about implementing it this way? Thanks!