Firmware Update APIs#
Functions#
Wireless firmware upgrade request. 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 )
Wireless firmware upgrade request. This is a blocking API.
[in] |
rsi_config_ipaddress() API needs to be called before this API.
Returns
0 - Success Negative Value - Failure -2 - Invalid parameters -4 - Buffer not available to serve the command
Note
1. For Wireless firmware upgrade, it will take approx. 85 sec duration for upgrading the firmware of 1.5 MB file.
2. Refer to Error Codes section for the description of the above error codes Error Codes.
609
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
Zero - 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 |
rsi_wlan_radio_init() API needs to be called before this API
Returns
0 - Success Negative Value - Failure -2 - Invalid Parameters -4 - Buffer not available to serve the command
Note
Refer to Error Codes section for the description of the above error codes Error Codes.
122
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 Negative Value - Failure 3 - Firmware upgradate is completed successfully -2 - Invalid parameters -4 - Buffer not availableto serve the command
Note
Refer to Error Codes section for the description of the above error codes Error Codes.
151
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 represent RSI_SUCCESS : Firmware update success oOther expected error codes : BBED,BB40,BB38,BBD2,FF74,FFF4 | ||||||||||||||||||||||||
[out] | buffer | - NULL |
Returns
0 - Success Negative value - Failure
53
of file network/protocols/rsi_http_ota_fw_up.c