OTA Firmware Client#

Functions#

int32_t
rsi_ota_firmware_upgradation(uint8_t flags, uint8_t *server_ip, uint32_t server_port, uint16_t chunk_number, uint16_t timeout, uint16_t tcp_retry_count, void(*ota_fw_up_response_handler)(uint16_t status, uint16_t chunk_number))

Create an OTAF client. Initialize the client with a given configuration. This is a non-blocking API.

Function Documentation#

rsi_ota_firmware_upgradation#

int32_t rsi_ota_firmware_upgradation (uint8_t flags, uint8_t * server_ip, uint32_t server_port, uint16_t chunk_number, uint16_t timeout, uint16_t tcp_retry_count, void(*)(uint16_t status, uint16_t chunk_number) ota_fw_up_response_handler, status, chunk_number)

Create an OTAF client. Initialize the client with a given configuration. This is a non-blocking API.

Parameters
[in]flags

- Select the IP version.
BIT(0) – RSI_IPV6: Set this bit to enable IPv6 , by default it is configured to IPv4

[in]server_ip

- OTAF server IP address

[in]server_port

- OTAF server port number

[in]chunk_number

- Firmware content request chunk number

[in]timeout

- TCP receive packet timeout

[in]tcp_retry_count

- TCP retransmissions count

[in]ota_fw_up_response_handler

- Callback when asynchronous response is received from module for firmware update request. Callback parameters: status and chunk_number

[out]status

- Status code

[out]chunk_number

- Chunk number of the firmware content

Returns

  • 0 - Success

  • Negative Value - Failure (Possible Error Codes - 0xfffffffd,0xfffffffa)

Note

  • Precondition - rsi_config_ipaddress() API needs to be called before this API.

  • For safe firmware upgrade via TCP server,
    it will take approx. 65 sec duration for upgrading the firmware of 1.5 MB file.

  • Refer to Error Codes for the description of above error codes.


Definition at line 46 of file network/protocols/rsi_ota_fw_up.c