Functions#
This section provides a reference to the Firmware Upgrade API functions.
Functions#
Post the HTTP data for the requested URL to HTTP server.This is a non-blocking API.
Function Documentation#
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.
Type | Direction | Argument Name | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
uint8_t | [in] | type | Valid values are: 0 - HTTPGET, 1 - HTTPPOST | |||||||||||||||||||||
uint8_t | [in] | flags | Select version and security:
| |||||||||||||||||||||
uint8_t * | [in] | ip_address | Server IP address. | |||||||||||||||||||||
uint16_t | [in] | port | Port number. Default : 80 - HTTP, 443 - HTTPS | |||||||||||||||||||||
uint8_t * | [in] | resource | Requested resource URL in string format. | |||||||||||||||||||||
uint8_t * | [in] | host_name | Host name. | |||||||||||||||||||||
uint8_t * | [in] | extended_header | Extender header if present, after each header member append \r | |||||||||||||||||||||
uint8_t * | [in] | user_name | Username for server authentication. | |||||||||||||||||||||
uint8_t * | [in] | password | Password for server authentication. | |||||||||||||||||||||
uint8_t * | [in] | post_data | HTTP data to be posted to server. | |||||||||||||||||||||
uint32_t | [in] | post_data_length | HTTP data length to be posted to server. |
Returns
sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.