Firmware Update from Module#
This section provides a reference to the APIs used to perform firmware updates from the module.
Functions#
Create an OTAF client.
Post the HTTP data for the requested URL to HTTP server.This is a non-blocking API.
Function Documentation#
sl_si91x_ota_firmware_upgradation#
sl_status_t sl_si91x_ota_firmware_upgradation (sl_ip_address_t server_ip, uint16_t server_port, uint16_t chunk_number, uint16_t timeout, uint16_t tcp_retry_count, bool asynchronous)
Create an OTAF client.
[in] | server_ip | OTAF server IP address sl_ip_address_t |
[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] | asynchronous | OTAF upgrade done aynchronously when this is set, else synchronous upgrade. |
Initialize the client with a given configuration.
Pre-conditions:
sl_net_up API needs to be called before this API.
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.
Note
For safe firmware upgrade via TCP server,
it will take approx. 65 sec duration for upgrading the firmware of 1.5 MB file.
This is an asynchronous API. The response is recieved via sl_net_event_handler_t with SL_NET_OTA_FW_UPDATE_EVENT as event
637
of file components/device/silabs/si91x/wireless/inc/sl_si91x_driver.h
sl_si91x_http_otaf#
sl_status_t sl_si91x_http_otaf (uint8_t type, 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, uint8_t * post_data, uint32_t post_data_length)
Post the HTTP data for the requested URL to HTTP server.This is a non-blocking API.
[in] | type | Server IP address. |
[in] | flags | Port number. Default : 80 - HTTP, 443 - HTTPS |
[in] | ip_address | Requested resource URL in string format. |
[in] | port | Host name. |
[in] | resource | Extender header if present, after each header member append \r |
[in] | host_name | Username for server authentication. |
[in] | extended_header | Password for server authentication. |
[in] | user_name | HTTP data to be posted to server. |
[in] | password | HTTP data length to be posted to server. |
N/A | post_data | |
N/A | post_data_length |
Flags | Macro | Description |
---|---|---|
BIT(0) | HTTPS_SUPPORT | Set this bit to enable HTTPS_SUPPORT to use HTTPS feature. |
BIT(1) | SSL_ENABLE | Set this bit to enable SSL feature. |
BIT(2) | SI91X_TLS_V_1_0 | Set this bit to support SSL TLS Version 1.0 if HTTPS is enabled. |
BIT(3) | IPV6 | Set this bit to enable IPv6, by default it is configured to IPv4. |
BIT(4) | SI91X_TLS_V_1_1 | Set this bit to support SSL_TLS Version 1.1 if HTTPS is enabled. |
BIT(5) | HTTP_POST_DATA | Set this bit to enable Http_post large data feature. |
BIT(6) | HTTP_V_1_1 | Set this bit to use HTTP version 1.1 |
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.
77
of file components/device/silabs/si91x/wireless/firmware_upgrade/firmware_upgradation.h