Firmware Update APIs#
Functions#
Request wireless firmware upgrade. This is a blocking API.
Helper function for actual APIs.
Send the RPS header content of firmware file. This is a blocking API.
Send the firmware file content. This is a blocking API.
Initiate firmware update from an HTTP server. This is non-blocking API.
Function Documentation#
rsi_req_wireless_fwup#
int32_t rsi_req_wireless_fwup (void )
Request wireless firmware upgrade. This is a blocking API.
[in] |
Returns
0 - Success
Non-Zero Value - Failure (Possible Error Codes - 0xfffffffe, 0xfffffffc)
Note
Precondition - rsi_config_ipaddress() API needs to be called before this API.
For wireless firmware upgrade, it will take approximately 85 seconds for upgrading the firmware file of 1.5 MB
Need to call rsi_bl_module_power_cycle() API, for the module to reboot after successful firmware upgradation and wait for 50 seconds for the upgraded firmware to be reflected.
Refer to Error Codes section for the description of the above error codes Error Codes.
605
of file network/protocols/http_server/rsi_http_server.c
rsi_fwup#
static int32_t rsi_fwup (uint8_t type, uint8_t * content, uint16_t length)
Helper function for actual APIs.
[in] | type | - Firmware upgrade chunk type |
[in] | content | - Firmware content |
[in] | length | - Length of the content |
Returns
0 - Success
3 - Firmware upgrade completed successfully
Negative Value - Failure
35
of file network/protocols/rsi_firmware_upgradation.c
rsi_fwup_start#
int32_t rsi_fwup_start (uint8_t * rps_header)
Send the RPS header content of firmware file. This is a blocking API.
[in] | rps_header | - Pointer to the RPS header content |
Returns
0 - Success
Non-Zero Value - Failure (Possible Error Codes - 0xfffffffe, 0xfffffffc)
Note
Precondition - rsi_wlan_radio_init() API needs to be called before this API
Refer to Error Codes for the description of above error codes.
120
of file network/protocols/rsi_firmware_upgradation.c
rsi_fwup_load#
int32_t rsi_fwup_load (uint8_t * content, uint16_t length)
Send the firmware file content. This is a blocking API.
[in] | content | - Pointer to the firmware file content |
[in] | length | - Length of the content |
rsi_wlan_radio_init() API needs to be called before this API
Returns
0 - Success
3 - Firmware upgradate is completed successfully
Negative Value - Failure (Possible Error Codes - 0xfffffffe, 0xfffffffc)
Note
Precondition - rsi_wlan_radio_init() API needs to be called before this API
Refer to Error Codes for the description of above error codes.
148
of file network/protocols/rsi_firmware_upgradation.c
rsi_http_fw_update#
int32_t rsi_http_fw_update (uint8_t flags, uint8_t * ip_address, uint16_t port, uint8_t * resource, uint8_t * host_name, uint8_t * extended_header, uint8_t * user_name, uint8_t * password, void(*)(uint16_t status, const uint8_t *buffer) http_otaf_response_handler, status, buffer)
Initiate firmware update from an HTTP server. This is non-blocking API.
[in] | flags | - Select version and security
| ||||||||||||||||||||||||
[in] | ip_address | - Server IP address | ||||||||||||||||||||||||
[in] | port | - Port number, default : 80 - HTTP, 443 - HTTPS | ||||||||||||||||||||||||
[in] | resource | - URL string for requested resource | ||||||||||||||||||||||||
[in] | host_name | - Host name | ||||||||||||||||||||||||
[in] | extended_header | - Extender header if present | ||||||||||||||||||||||||
[in] | user_name | - Username for server Authentication | ||||||||||||||||||||||||
[in] | password | - Password for server Authentication | ||||||||||||||||||||||||
[in] | http_otaf_response_handler | - Callback is called when asynchronous response is received from module for HTTP firmware update request | ||||||||||||||||||||||||
[out] | status | - Status code | ||||||||||||||||||||||||
[out] | buffer | - NULL |
Returns
0 - Success
Non-Zero value - Failure (Possible Error Codes - BBED,BB40,BB38,BBD2,FF74,FFF4)
Note
Refer to Error Codes for the description of above error codes.
52
of file network/protocols/rsi_http_ota_fw_up.c