Modules#
Over-The-Air Device Firmware Upgrade (Alpha)#
Wi-SUN Over-The-Air Device Firmware Upgrade (OTA DFU) service is implemented for updating Wi-SUN device's firmware. The component uses the Gecko Bootloader API to perform firmware write, verify, and set to bootload operations.
A Trivial File Transfer Protocol (TFTP) client provides downloader solution to obtain a new Gecko Bootloader File (GBL) file from remote host Over-The-Air, using the Wi-SUN network. The connection to the TFTP remote host can be configured in component configuration file. The entire firmware upgrade session can be managed over CoAP. The service includes notification and status request capabilities.
Functions#
Initialize the device firmware upgrade service.
Start firmware update.
Stop firmware update.
Get the status value.
Get the status string in JSON format.
Free the status string buffer.
Get the status flag value.
OTA DFU error handler (weak implementation)
Function Documentation#
sl_wisun_ota_dfu_init#
void sl_wisun_ota_dfu_init (void )
Initialize the device firmware upgrade service.
N/A |
Initialize Wi-SUN OTA Device Firmware Upgrade service.
145
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/app/wisun/component/ota_dfu/sl_wisun_ota_dfu.h
sl_wisun_ota_dfu_start_fw_update#
sl_status_t sl_wisun_ota_dfu_start_fw_update (void )
Start firmware update.
N/A |
Start firmware update by setting SL_WISUN_OTA_DFU_STATUS_FW_UPDATE_STARTED flag Returns
sl_status_t SL_STATUS_OK on success, otherwise SL_STATUS_FAIL
153
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/app/wisun/component/ota_dfu/sl_wisun_ota_dfu.h
sl_wisun_ota_dfu_stop_fw_update#
sl_status_t sl_wisun_ota_dfu_stop_fw_update (void )
Stop firmware update.
N/A |
Stop firmware update by setting SL_WISUN_OTA_DFU_STATUS_FW_UPDATE_STOPPED flag Returns
sl_status_t SL_STATUS_OK on success, otherwise SL_STATUS_FAIL
161
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/app/wisun/component/ota_dfu/sl_wisun_ota_dfu.h
sl_wisun_ota_dfu_get_fw_update_status#
uint32_t sl_wisun_ota_dfu_get_fw_update_status (void )
Get the status value.
N/A |
Returning the value of event flags Returns
uint32_t Status
168
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/app/wisun/component/ota_dfu/sl_wisun_ota_dfu.h
sl_wisun_ota_dfu_get_fw_update_status_json_str#
const char * sl_wisun_ota_dfu_get_fw_update_status_json_str (void )
Get the status string in JSON format.
N/A |
String buffer is allocated in heap by CoAP allocator Returns
const char * Allocated string pointer on success, otherwise NULL
175
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/app/wisun/component/ota_dfu/sl_wisun_ota_dfu.h
sl_wisun_ota_dfu_free_fw_update_status_json_str#
void sl_wisun_ota_dfu_free_fw_update_status_json_str (const char * str)
Free the status string buffer.
[in] | str | String ptr |
Call CoAP free to release allocated memory
182
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/app/wisun/component/ota_dfu/sl_wisun_ota_dfu.h
sl_wisun_ota_dfu_get_fw_update_status_flag#
bool sl_wisun_ota_dfu_get_fw_update_status_flag (const sl_wisun_ota_dfu_status_t status_flag)
Get the status flag value.
[in] | status_flag | Status flag enum |
Bool representation of status variable bit value Returns
bool true if the flag is set, otherwise false
190
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/app/wisun/component/ota_dfu/sl_wisun_ota_dfu.h
sl_wisun_ota_dfu_error_hnd#
void sl_wisun_ota_dfu_error_hnd (const sl_wisun_ota_dfu_error_code_t error_code, sl_wisun_ota_dfu_error_ctx_t *const ctx)
OTA DFU error handler (weak implementation)
[in] | error_code | Error code |
[in] | ctx | Error context with error details |
Catch error in different stages of boot load.
198
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/app/wisun/component/ota_dfu/sl_wisun_ota_dfu.h