-
Notifications
You must be signed in to change notification settings - Fork 15
OTA Service
This service run periodically to check for any software update available from server specified in ota config. The ota check period is also defined in ota config with OTA_API_CHECK_DURATION keyword in milliseconds.
Below web portal UI is provided to set the server host address details.
OTA service uses firmware version to decide whether to start update or not. we need to set below GET route at server (e.g. server.com)
GET route format as ==> http://server.com/ota
device will call this route with parameters as ==> http://server.com/ota?mac_id=xx:xx:xx:xx:xx:xx&version=2019041100. In parameters, device will provide the mac address and the current firmware version. Based on this inputs from the device server should provide the response of latest version available on server in below json format.
{ "latest": 2020053012 }
by default update start only if device current firmware version is older than received firmware version from server.
when device start the update process after knowing its current firmware version is older it looks for the downloadable binary file from the same server in format given below
server address / bin / device mac address / latest firmware version .bin file
e.g. http://server.com/bin/xx:xx:xx:xx:xx:xx/2019041101.bin
so make sure server should have this binary available.