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.

int32_t
rsi_pop3_session_create_async(uint8_t flags, uint8_t *server_ip_address, uint16_t server_port_number, uint8_t auth_type, uint8_t *username, uint8_t *password, void(*rsi_pop3_client_mail_response_handler)(uint16_t status, uint8_t type, const uint8_t *buffer))

Create POP3 client session. This is a non-blocking API.

int32_t

Delete POP3 client session. This is a non-blocking API.

int32_t

Get mail stats. This is a non-blocking API.

int32_t
rsi_pop3_get_mail_list(uint16_t mail_index)

Get the size of the mail for the passed mail index. This is a blocking API.

int32_t
rsi_pop3_retrive_mail(uint16_t mail_index)

Retrieve mail content for the passed mail index. This is a non-blocking API.

int32_t
rsi_pop3_mark_mail(uint16_t mail_index)

Mark a mail as deleted for the passed mail index.This is a non-blocking API.

int32_t

Unmark all the marked (deleted) mails in the current session. This is a non-blocking API.

int32_t

Get the POP3 server status. 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(*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.

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

- Success - RSI_SUCCESS Failure - Negative value -3 : Command given in wrong state -4 : Buffer not available to serve the command

[out]chunk_number

- Chunk number of the firmware content

Note

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

Returns

  • 0 - Success Negative Value - Failure -3 - Command given in wrong state -4 - Buffer not available to serve the command


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

rsi_pop3_session_create_async#

int32_t rsi_pop3_session_create_async (uint8_t flags, uint8_t *server_ip_address, uint16_t server_port_number, uint8_t auth_type, uint8_t *username, uint8_t *password, void(*rsi_pop3_client_mail_response_handler)(uint16_t status, uint8_t type, const uint8_t *buffer))

Create POP3 client session. 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_address

- POP3 server IP address

[in]server_port_number

- POP3 server TCP port

[in]auth_type

- Client authentication type

[in]username

- Username for authentication. It must be a NULL terminated string

[in]password

- Password for authentication. It must be a NULL terminated string

[in]rsi_pop3_client_mail_response_handler

- Callback when asynchronous response comes for the session create. The callback parameters are: status,type, and buffer

[out]status

- Status code

[out]type

- Sub-command type

[out]buffer

- Buffer pointer

Note

  • Currently API is not supported.

Returns

  • Zero - Success Non-Zero Value - If return value is less than 0 -3 : Command given in wrong state -4 : Buffer not available to serve the command If return value is greater than 0 0x0021,0x0015,0xBB87,0xff74

Note

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


Definition at line 52 of file network/protocols/rsi_pop3_client.c

rsi_pop3_session_delete#

int32_t rsi_pop3_session_delete (void)

Delete POP3 client session. This is a non-blocking API.

Parameters
[in]

Note

  • Currently API is not supported.

Returns

  • Zero - Success Non-Zero Value - If return value is less than 0 -3 : Command given in wrong state -4 : Buffer not available to serve the command If return value is greater than 0 0x0021,0xFF74,0xBB87

Note

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


Definition at line 178 of file network/protocols/rsi_pop3_client.c

rsi_pop3_get_mail_stats#

int32_t rsi_pop3_get_mail_stats (void)

Get mail stats. This is a non-blocking API.

Parameters
[in]

Note

  • Currently API is not supported.

Returns

  • Zero - Success Non-Zero Value - If return value is less than 0 -3 : Command given in wrong state -4 : Buffer not available to serve the command If return value is greater than 0 0x0021,0xFF74,0xBB87

Note

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


Definition at line 257 of file network/protocols/rsi_pop3_client.c

rsi_pop3_get_mail_list#

int32_t rsi_pop3_get_mail_list (uint16_t mail_index)

Get the size of the mail for the passed mail index. This is a blocking API.

Parameters
[in]mail_index

- Mail index to get the size of the mail

Note

  • Currently API is not supported.

Returns

  • Zero - Success Non-Zero Value - If return value is less than 0 -3 : Command given in wrong state -4 : Buffer not available to serve the command If return value is greater than 0 0x0021,0xBB87,0xFF74,0xBBFF

Note

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


Definition at line 340 of file network/protocols/rsi_pop3_client.c

rsi_pop3_retrive_mail#

int32_t rsi_pop3_retrive_mail (uint16_t mail_index)

Retrieve mail content for the passed mail index. This is a non-blocking API.

Parameters
[in]mail_index

- Mail index to get the mail content for the passed index

Note

  • Currently API is not supported.

Returns

  • Zero - Success Non-Zero Value - If return value is less than 0 -3 : Command given in wrong state -4 : Buffer not available to serve the command If return value is greater than 0 0x0021,0xBB87,0xFF74,0xBBFF,0xBBC5

Note

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


Definition at line 436 of file network/protocols/rsi_pop3_client.c

rsi_pop3_mark_mail#

int32_t rsi_pop3_mark_mail (uint16_t mail_index)

Mark a mail as deleted for the passed mail index.This is a non-blocking API.

Parameters
[in]mail_index

- Mail index to mark the mail as deleted

Note

  • Currently API is not supported.

Returns

  • Zero - Success Non-Zero Value - If return value is less than 0 -3 : Command given in wrong state -4 : Buffer not available to serve the command If return value is greater than 0 0x0021,0xFF74,0xBB87,0xBBFF

Note

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


Definition at line 521 of file network/protocols/rsi_pop3_client.c

rsi_pop3_unmark_mail#

int32_t rsi_pop3_unmark_mail (void)

Unmark all the marked (deleted) mails in the current session. This is a non-blocking API.

Parameters
[in]

Note

  • Currently API is not supported.

Returns

  • Zero - Success Non-Zero Value - If return value is less than 0 -3 : Command given in wrong state -4 : Buffer not available to serve the command If return value is greater than 0 0x0021,0xFF74,0xBB87

Note

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


Definition at line 605 of file network/protocols/rsi_pop3_client.c

rsi_pop3_get_server_status#

int32_t rsi_pop3_get_server_status (void)

Get the POP3 server status. This is a non-blocking API.

Parameters
[in]

Note

  • Currently API is not supported.

Returns

  • Zero - Success Non-Zero Value - If return value is less than 0 -3 : Command given in wrong state -4 : Buffer not available to serve the command If return value is greater than 0 0x0021,0xBB87,0xFF74

Note

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


Definition at line 686 of file network/protocols/rsi_pop3_client.c