← index #8011Issue #2535
Related · high · value 1.638
QUERY · ISSUE

Better support for OTA updates on esp32

openby bobveringaopened 2021-11-18updated 2025-10-03
port-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.

CANDIDATE · ISSUE

esp8266: Architecture and implementation of OTA update

closedby pfalconopened 2016-10-19updated 2022-06-23
port-esp8266

I have a WIP prototype of OTA updates support for esp8266 port. The architecture is:

  1. First-stage bootloader. Decides which of 2 components below to boot.
  2. OTA server application.
  3. MicroPython application.

The distinctive difference from existing OTA solutions for esp8266 is that it doesn't require 2 areas for the main application, with a new OTA update being flashed to "inactive" area, and "active area" switch occurring only integrity of new flashed application is confirmed. With proposed scheme, OTA update overwrites area of the main application immediately. This is based on the requirement to utilize well resources of 1MB modules: support both file system and OTA.

Of course, such scheme is much more risky, so all measures to preventing "bricking" by incomplete OTA update should be provided.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied