Expand description
§Over The Air Updates (OTA)
§Overview
The OTA update mechanism allows a device to update itself based on data received while the normal firmware is running (for example, over Wi-Fi, Bluetooth or Ethernet).
OTA requires configuring the Partition Tables of the device with at least two OTA app slot partitions (i.e., ota_0 and ota_1) and an OTA Data Partition.
The OTA operation functions write a new app firmware image to whichever OTA app slot that is currently not selected for booting. Once the image is verified, the OTA Data partition is updated to specify that this image should be used for the next boot.
Note: The prebuilt bootloaders provided by espflash
might not include
OTA support. In that case you need to build the bootloader yourself.
The general procedure to change the active slot
- read the partition table crate::partitions::read_partition_table
- find the Data/Ota partition
- initialize Ota
- read the current slot, change the current slot
For more details see https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/ota.html
Structs§
- Ota
- This is used to manipulate the OTA-data partition.
Enums§
- OtaImage
State - OTA image states for checking operability of the app.
- Slot
- Representation of the current OTA slot.