Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
wiced_bt_ota_firmware_upgrade.h File Reference

> More...

Data Structures

struct  wiced_bt_ota_fw_upgrad_event_data_t
 

Macros

#define UUID_OTA_FW_UPGRADE_SERVICE   0x1f, 0x38, 0xa1, 0x38, 0xad, 0x82, 0x35, 0x86, 0xa0, 0x43, 0x13, 0x5c, 0x47, 0x1e, 0x5d, 0xae
 
#define UUID_OTA_SEC_FW_UPGRADE_SERVICE   0xd8, 0x8b, 0x76, 0x46, 0x72, 0x9d, 0xbd, 0xa1, 0x7a, 0x44, 0x25, 0xf4, 0x10, 0x11, 0x26, 0xc7
 
#define UUID_OTA_FW_UPGRADE_CHARACTERISTIC_CONTROL_POINT   0x1b, 0x66, 0x6c, 0x08, 0x0a, 0x57, 0x8e, 0x83, 0x99, 0x4e, 0xa7, 0xf7, 0xbf, 0x50, 0xdd, 0xa3
 
#define UUID_OTA_FW_UPGRADE_CHARACTERISTIC_DATA   0x26, 0xfe, 0x2e, 0xe7, 0x09, 0x24, 0x4f, 0xb7, 0x91, 0x40, 0x61, 0xd9, 0x7a, 0x6c, 0xe8, 0xa2
 
#define UUID_OTA_FW_UPGRADE_SERVICE_CHARACTERISTIC_APP_INFO   0x4b, 0xde, 0xc4, 0xed, 0xd4, 0x75, 0x3b, 0x91, 0xeb, 0x47, 0x2d, 0x2e, 0x08, 0x76, 0x7f, 0xa4
 
#define WICED_OTA_FW_UPGRADE_MAX_DATA_LEN   128
 
#define WICED_OTA_UPGRADE_COMMAND_PREPARE_DOWNLOAD   1
 
#define WICED_OTA_UPGRADE_COMMAND_DOWNLOAD   2
 
#define WICED_OTA_UPGRADE_COMMAND_VERIFY   3
 
#define WICED_OTA_UPGRADE_COMMAND_FINISH   4
 
#define WICED_OTA_UPGRADE_COMMAND_GET_STATUS   5 /* Not currently used */
 
#define WICED_OTA_UPGRADE_COMMAND_CLEAR_STATUS   6 /* Not currently used */
 
#define WICED_OTA_UPGRADE_COMMAND_ABORT   7
 
#define WICED_OTA_UPGRADE_STATUS_OK   0
 
#define WICED_OTA_UPGRADE_STATUS_UNSUPPORTED_COMMAND   1
 
#define WICED_OTA_UPGRADE_STATUS_ILLEGAL_STATE   2
 
#define WICED_OTA_UPGRADE_STATUS_VERIFICATION_FAILED   3
 
#define WICED_OTA_UPGRADE_STATUS_INVALID_IMAGE   4
 
#define WICED_OTA_UPGRADE_STATUS_INVALID_IMAGE_SIZE   5
 
#define WICED_OTA_UPGRADE_STATUS_MORE_DATA   6
 
#define WICED_OTA_UPGRADE_STATUS_INVALID_APPID   7
 
#define WICED_OTA_UPGRADE_STATUS_INVALID_VERSION   8
 
#define WICED_OTA_UPGRADE_STATUS_CONTINUE   9
 
#define WICED_OTA_UPGRADE_STATUS_BAD_PARAM   10
 
#define HANDLE_OTA_FW_UPGRADE_SERVICE   0xff00 /* OTA firmware upgrade service handle */
 
#define HANDLE_OTA_FW_UPGRADE_CHARACTERISTIC_CONTROL_POINT   0xff01 /* OTA firmware upgrade characteristic control point handle */
 
#define HANDLE_OTA_FW_UPGRADE_CONTROL_POINT   0xff02 /* OTA firmware upgrade control point value handle */
 
#define HANDLE_OTA_FW_UPGRADE_CLIENT_CONFIGURATION_DESCRIPTOR   0xff03 /* OTA firmware upgrade client configuration description handle */
 
#define HANDLE_OTA_FW_UPGRADE_CHARACTERISTIC_DATA   0xff04 /* OTA firmware upgrade data characteristic handle */
 
#define HANDLE_OTA_FW_UPGRADE_DATA   0xff05 /* OTA firmware upgrade data value handle */
 
#define HANDLE_OTA_FW_UPGRADE_CHARACTERISTIC_APP_INFO   0xff06 /* OTA firmware upgrade app info characteristic handle */
 
#define HANDLE_OTA_FW_UPGRADE_APP_INFO   0xff07 /* OTA firmware upgrade app info value handle */
 
#define OTA_FW_UPGRADE_STATUS_STARTED   1 /* Client started OTA firmware upgrade process */
 
#define OTA_FW_UPGRADE_STATUS_ABORTED   2 /* OTA firmware upgrade process was aborted or failed verification */
 
#define OTA_FW_UPGRADE_STATUS_COMPLETED   3 /* OTA firmware upgrade completed, will reboot */
 
#define OTA_FW_UPGRADE_STATUS_VERIFICATION_START   4
 OTA firmware upgrade starts verification.
 
#define OTA_FW_UPGRADE_EVENT_STARTED   1 /* Client started OTA firmware upgrade process */
 
#define OTA_FW_UPGRADE_EVENT_DATA   2 /* OTA firmware upgrade data received */
 
#define OTA_FW_UPGRADE_EVENT_COMPLETED   3 /* OTA firmware upgrade completed */
 

Typedefs

typedef void( wiced_ota_firmware_upgrade_status_callback_t )(uint8_t status)
 An optional callback to be executed when the OTA Firmware Upgrade state changes. More...
 
typedef wiced_bt_gatt_status_twiced_ota_firmware_upgrade_send_data_callback_t )(wiced_bool_t is_notification, uint16_t conn_id, uint16_t attr_handle, uint16_t val_len, uint8_t *p_val)
 An optional callback to be executed to before sending data over the air. More...
 
typedef void( wiced_ota_firmware_event_callback_t )(uint16_t event, void *p_data)
 A callback used in Transfer-Only mode to pass event/data to upper layer. More...
 

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

>

AIROC OTA Firmware Upgrade Service over GATT

Provides definitions and APIs that exposes an OTA Firmware Upgrade GATT service and managed by the OTA Firmware Upgrade library, e.g. fw_upgrade_lib. This service can be utilized by peer Firmware Upgrade applications to perform a firmware upgrade.