If a device includes
rpc-service-ota library, then it can be updated remotely.
The three RPC functions that perform the OTA are
mDash provides a convenience RESTful handler for the OTA, where you can
POST the new firmware .zip file, and mDash will call
followed by a sequence of
OTA.Write calls, finished by
The OTA can be performed either via the Web UI, or programmatically using the REST API:
curl -H 'Authorization: Bearer API_KEY' \ -v -F firstname.lastname@example.org http://dash.mongoose-os.com/api/v2/devices/DEVICE_ID/ota true
Once the firmware is updated, the device reboots in the "dirty", uncommitted
OTA.Commit call must be done to bless the new firmware, otherwise
it will rollback, thinking that the health check did not pass. You can
OTA.Commit as any other RPC method. mDash provides a handy
commit button for the convenience, when it sees an uncommitted device.