Performing Over-The-Air firmware update over a slow/unreliable internet connection may be challenging. I have had many cases, where the edge nodes to be updated are in a remote rural area with a 2G modem internet connection, and pushing a let’s say 1.1MB firmware file can be challenging. The OTA times out multiple times before succeeding, and in some cases, it simply does not complete.
To solve this, I decided to test OTA firmware updates using a compressed firmware image, pretty much the same approach
So it is a win-win process, the only draw-back is that there will be a need for extra memory to handle the firmware image decompression, a fixed size 32K buffer is needed for the purpose.
This works both over HTTP(s) and MQTT(s) (see my OTA over MQTT blog post), so can be quite useful.
Below is a short video demonstration of the process:
Hi, I’m going down that same path, is your code available somewhere? Thanks much!
my code isn’t public for a number of reasons. You have all that you need to perform this task in esptool’s flasher stub https://github.com/espressif/esptool/blob/91822c3a0e2d81f830b81f1a2046106c474e27d8/flasher_stub/stub_write_flash.c#L272
That’s the function that handles the deflation, from there on it is downhill.
Let me know if you need further tips.