1.6.3.9 SYS_OTA_CtrlMsg Function
C
SYS_OTA_RESULT SYS_OTA_CtrlMsg(uint32_t event, void *buffer, uint32_t length);
Summary
Returns success/ failure for the update check/ota trigger/system reset operations asked by client.
Description
This function is used to set OTA server and image related parameters
Precondition
The SYS_OTA_Initialize function should have been called before calling this function.
Parameters
Param | Description |
---|---|
url | pointer to server |
version | version number of image present in OTA server |
digest | SHA256 key of OTA image |
Returns
None
Example
if(ota_app_reg_cb() == true) { uint32_t version = 2; char *digest = "ef90bf8bf7fd96205c3240c31e1a378430e7a8f053a300e5c91ebe64fefea197"; SYS_OTA_SET_PARAMETERS("http://192.168.43.173:8000/wifi_ota_demo.bin", version , digest); appData.state = APP_STATE_SERVICE_TASKS; }
Remarks
None