.eff images and A/B slots with rollback. Open the M1
over USB or Bluetooth LE (BLE), then stop device-local recording and uploads
before updating.
The image location is normally not required. The SDK queries the update-check
service for the version this device should be running and passes the result to
the device, so the common case requires no URL.
Check what is available
check_update() issues a single request from the host. It downloads nothing and
does not instruct the device to perform its own check.
available is false both when the device is current and when the service has
nothing published for it. service_error reports the reason in either case,
which distinguishes an absence of published updates from a misconfigured service.
Apply
url argument selects the source:
Regardless of how the image is obtained, the device verifies its signature and
refuses any image that is not strictly newer than the running firmware, so an
incorrect source costs only a download.
update() returns DEVICE_UP_TO_DATE in
that case, and WIFI_NOT_CONNECTED if a download is required but the device is
not connected to a network.
update() blocks through download, verification, apply, reboot, and
reconnection. Use the callback or get_update_status() to monitor progress, and
abort_update() to request cancellation.
From the CLI
Pointing at a different service
The endpoint is compiled in. Override it per invocation withEF_UPDATE_CHECK_URL, or at configure time with
cmake -DEF_UPDATE_CHECK_URL=https://my-host/ota/check, which is the
appropriate option for a self-hosted or air-gapped deployment.
After a successful reconnect, call
grab() again to start a new live data
plane. A firmware update cannot preserve a continuous stream across the reboot.
