Better support for OTA updates on esp32
I work on an esp32 based device where we rely heavily on MicroPython for our development workflow and device code. We started using MicroPython around 2 years ago, and during that time we have developed a decent amount of MicroPython code. Part of that code is to support OTA (Over the Air) updates. Our current OTA Update system code was developed around 2 years ago for MicroPython v1.12 and is entirely written in python.
We have recently identified our propriety code as somewhat of a risk, and we want to rewrite the code to use more native espressif functions. Ideally, we want to contribute this code back to the community as we also rely on their work for our platform to function.
Is better support for OTA updates on esp32 something that should be added to MicroPython, and if so in what capacity?
The OTA update is specific to the firmware application, not files on the file system. We intend to develop a system that can download the update from both http and https sources.
I'm interested to hear what you think about this change.
ESP 32 OTA with v1.18
Hi Team,
I have flashed " esp32-ota-20220117-v1.18.bin " to my esp32 with 4MB flash device, After flashing it it took almost 1.5 MB for firmware partition and rest for others as per given below partition table.
As per below table and v1.18 bin file size, there is no possibility for OTA updates with provision of having factory , OTA_0 & OTA_1, along with application code. please correct me if my understanding is not valid.
Also, I did not find any sample code for implementation of OTA along with application code . Requesting team to include sample files or guide us the implementation instructions with this version.
Partition table for MicroPython with OTA support using 4MB flash
Notes: the offset of the partition table itself is set in
$IDF_PATH/components/partition_table/Kconfig.projbuild.
Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
ota_0, app, ota_0, 0x10000, 0x180000,
ota_1, app, ota_1, 0x190000, 0x180000,
vfs, data, fat, 0x310000, 0x0f0000,
Thank you