Infineon Logo AIROC BTSDK v4.0 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Functions

wiced_bool_t wiced_ota_fw_upgrade_init (void *public_key, wiced_ota_firmware_upgrade_status_callback_t *p_status_callback, wiced_ota_firmware_upgrade_send_data_callback_t *p_send_data_callback)
 Initializes the AIROC OTA Firmware Upgrade Service module. More...
 
wiced_bool_t wiced_ota_fw_upgrade_is_active (void)
 Checks the state of the OTA Firmware Upgrade. More...
 
void wiced_ota_fw_upgrade_connection_status_event (wiced_bt_gatt_connection_status_t *p_status)
 The Connection status notification. More...
 
wiced_bt_gatt_status_t wiced_ota_fw_upgrade_read_handler (uint16_t conn_id, wiced_bt_gatt_read_t *p_read_data)
 The OTA FW Upgrade read request. More...
 
wiced_bt_gatt_status_t wiced_ota_fw_upgrade_write_handler (uint16_t conn_id, wiced_bt_gatt_write_t *p_write_data)
 the OTA FW Upgrade write request. More...
 
wiced_bt_gatt_status_t wiced_ota_fw_upgrade_indication_cfm_handler (uint16_t conn_id, uint16_t handle)
 The OTA FW Upgrade indication confirmation. More...
 
wiced_bool_t wiced_ota_fw_upgrade_is_gatt_handle (uint16_t handle)
 The OTA Firmware Upgrade Service GATT handle check. More...
 
wiced_bool_t wiced_ota_fw_upgrade_get_new_fw_info (uint16_t *company_id, uint8_t *fw_id_len, uint8_t *fw_id)
 Gets info of received firmware. More...
 
wiced_bool_t wiced_ota_fw_upgrade_set_transfer_mode (wiced_bool_t transfer_only, wiced_ota_firmware_event_callback_t *p_event_callback)
 Set OTA for data transfer only. More...
 

Detailed Description

Function Documentation

void wiced_ota_fw_upgrade_connection_status_event ( wiced_bt_gatt_connection_status_t p_status)

The Connection status notification.

The application calls this function to pass the Connection status notification to the OTA Firmware Upgrade library.

wiced_bool_t wiced_ota_fw_upgrade_get_new_fw_info ( uint16_t *  company_id,
uint8_t *  fw_id_len,
uint8_t *  fw_id 
)

Gets info of received firmware.

The firmware info is available only after the whole image is received and verified.

wiced_bt_gatt_status_t wiced_ota_fw_upgrade_indication_cfm_handler ( uint16_t  conn_id,
uint16_t  handle 
)

The OTA FW Upgrade indication confirmation.

The application calls this function to pass a GATT indication confirm request to the OTA Firmware Upgrade library for handles that belong to the FW Upgrade Service.

wiced_bool_t wiced_ota_fw_upgrade_init ( void *  public_key,
wiced_ota_firmware_upgrade_status_callback_t p_status_callback,
wiced_ota_firmware_upgrade_send_data_callback_t p_send_data_callback 
)

Initializes the AIROC OTA Firmware Upgrade Service module.

The application calls this function during initialization. The none-zero pointer to the public key indicates to the library that the secure OTA firmware update procedure is being used.

Parameters
public_keyThe pointer to the public key.
p_status_callbackOptional callback to be executed when the Firmware Upgrade state changes. NULL if not used.
p_send_data_callbackOptional callback to be executed to before sending data over the air. NULL if not used.
Note
AIROC BTSDK platforms that use external flash(i.e not on chip flash) must define the flash size, sector size before calling this API. For example see the wiced_platform.h, for default flash configuration exists on AIROC eval kits.
wiced_bool_t wiced_ota_fw_upgrade_is_active ( void  )

Checks the state of the OTA Firmware Upgrade.

Returns TRUE if OTA Firmware Upgrade is active.

wiced_bool_t wiced_ota_fw_upgrade_is_gatt_handle ( uint16_t  handle)

The OTA Firmware Upgrade Service GATT handle check.

The application calls this function to check if the handle is a GATT handle within the OTA Firmware Upgrade Service handles

Parameters
[in]handleThe OTA Firmware Service GATT handle to check.
Returns
true The handle is a GATT handle, otherwise - false.
wiced_bt_gatt_status_t wiced_ota_fw_upgrade_read_handler ( uint16_t  conn_id,
wiced_bt_gatt_read_t p_read_data 
)

The OTA FW Upgrade read request.

The application calls this function to pass a GATT read request to the OTA Firmware Upgrade library for handles that belong to the FW Upgrade Service.

wiced_bool_t wiced_ota_fw_upgrade_set_transfer_mode ( wiced_bool_t  transfer_only,
wiced_ota_firmware_event_callback_t p_event_callback 
)

Set OTA for data transfer only.

Transfer only mode can be used by other module such as DFU

wiced_bt_gatt_status_t wiced_ota_fw_upgrade_write_handler ( uint16_t  conn_id,
wiced_bt_gatt_write_t p_write_data 
)

the OTA FW Upgrade write request.

The application calls this function to pass a GATT write request to the OTA Firmware Upgrade library for handles that belong to the FW Upgrade Service.