User's Guide

Over the Air Updates
OVMS v3 includes 16MB flash storage. This is partition as:
4MB for factory application image (factory)
4MB for the first OTA application image (ota_0)
4MB for a second OTA application image (ota_1)
1MB for /store configuration and scripting storage
The remainder for bootloader, generic non-volatile storage, and other data
In general, the factory application firmware is stored in flash at the factory, during module
production. That firmware is never changed on production modules, and is always kept as a
failover backup.
That leaves two firmwares for Over The Air (OTA) updates. If the currently running firmware is
the factory one, an OTA updated firmware can be written to either of the OTA partitions. If the
current running firmware is ota_0, then any new OTA updates will be written to ota_1 (and
similarly if ota_1 is currently running, then new OTA updates will be written to ota_0). In this
way, the currently running firmware is never modified and is always available as a failover
backup.
You can check the status of OTA with the ‘ota status’ command:
OVMS# ota status
Firmware: 3.1.003-2-g7ea18b4-dirty/factory/main (build idf
v3.1-dev-453-g0f978bcb Apr 7 2018 16:26:57)
Server Available: 3.1.003
Running partition: factory
Boot partition: factory
That is showing the currently running firmware as a custom image v3.1.003-2-g7ea18b4-dirty
running in factory partition. The running currently running partition is factory and the next time
the system is booted, it will run from factory as well.
As a convenience, if there is currently active wifi connectivity, a network lookup will be
performed and the currently available firmware version on the server will be shown. In this case,
that is the standard 3.1.003 release (as shown in the ‘Server Available:’ line).
If we wanted to boot from ota_1, we can do this with ‘ota boot ota_1’:
OVMS# ota boot ota_1
Boot from ota_1 at 0x00810000 (size 0x00400000)
OVMS# ota status
OVMS v3 User Guide Page 33 / 86