Functions#

This section provides a reference to the Firmware Upgrade API functions.

Functions#

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.

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.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]type

Valid values are: 0 - HTTPGET, 1 - HTTPPOST

uint8_t[in]flags

Select version and security:

Flags

Macro

Description

BIT(0)

IPV6

Set this bit to enable IPv6, by default it is configured to IPv4.

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)

SI91X_TLS_V_1_2

Set this bit to support SSL_TLS Version 1.2 if HTTPS is enabled.

BIT(4)

SI91X_TLS_V_1_1

Set this bit to support SSL_TLS Version 1.1 if HTTPS is enabled.

BIT(6)

HTTP_V_1_1

Set this bit to use HTTP version 1.1

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\n

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