3.0.0.0R11
Software Development Kit
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
wiced_bt_ble.h File Reference

Data Structures

struct  wiced_bt_ble_scan_results_t
 

Macros

#define BTM_BLE_AUTH_SIGNATURE_SIZE   12
 
#define BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_CONTROLLER_SUPPORTED   (0x01 << 3)
 
#define BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_HOST_SUPPORTED   (0x01 << 4)
 

Typedefs

typedef uint8_t wiced_bt_ble_advert_chnl_map_t
 
typedef uint8_t wiced_bt_ble_advert_filter_policy_t
 
typedef uint8_t wiced_bt_ble_advert_type_t
 
typedef uint8_t wiced_bt_ble_conn_type_t
 
typedef uint8_t wiced_bt_ble_scan_mode_t
 
typedef void( wiced_bt_ble_scan_result_cback_t )(wiced_bt_ble_scan_results_t *p_scan_result, uint8_t *p_adv_data)
 
typedef uint8_t wiced_bt_ble_scanner_filter_policy_t
 
typedef wiced_bool_twiced_bt_ble_selective_conn_cback_t )(wiced_bt_device_address_t remote_bda, uint8_t *p_remote_name)
 
typedef uint8_t wiced_bt_dev_ble_evt_type_t
 
typedef uint8_t wiced_dev_ble_signature_t [BTM_BLE_AUTH_SIGNATURE_SIZE]
 

Enumerations

enum  wiced_bt_ble_advert_chnl_map_e { BTM_BLE_ADVERT_CHNL_37 = (0x01 << 0), BTM_BLE_ADVERT_CHNL_38 = (0x01 << 1), BTM_BLE_ADVERT_CHNL_39 = (0x01 << 2) }
 
enum  wiced_bt_ble_advert_filter_policy_e { BTM_BLE_ADVERT_FILTER_ALL_CONNECTION_REQ_ALL_SCAN_REQ = 0x00, BTM_BLE_ADVERT_FILTER_ALL_CONNECTION_REQ_WHITELIST_SCAN_REQ = 0x01, BTM_BLE_ADVERT_FILTER_WHITELIST_CONNECTION_REQ_ALL_SCAN_REQ = 0x02, BTM_BLE_ADVERT_FILTER_WHITELIST_CONNECTION_REQ_WHITELIST_SCAN_REQ = 0x03 }
 
enum  wiced_bt_ble_advert_type_e {
  BTM_BLE_ADVERT_TYPE_FLAG = 0x01, BTM_BLE_ADVERT_TYPE_16SRV_PARTIAL = 0x02, BTM_BLE_ADVERT_TYPE_16SRV_COMPLETE = 0x03, BTM_BLE_ADVERT_TYPE_32SRV_PARTIAL = 0x04,
  BTM_BLE_ADVERT_TYPE_32SRV_COMPLETE = 0x05, BTM_BLE_ADVERT_TYPE_128SRV_PARTIAL = 0x06, BTM_BLE_ADVERT_TYPE_128SRV_COMPLETE = 0x07, BTM_BLE_ADVERT_TYPE_NAME_SHORT = 0x08,
  BTM_BLE_ADVERT_TYPE_NAME_COMPLETE = 0x09, BTM_BLE_ADVERT_TYPE_TX_POWER = 0x0A, BTM_BLE_ADVERT_TYPE_DEV_CLASS = 0x0D, BTM_BLE_ADVERT_TYPE_SM_TK = 0x10,
  BTM_BLE_ADVERT_TYPE_SM_OOB_FLAG = 0x11, BTM_BLE_ADVERT_TYPE_INTERVAL_RANGE = 0x12, BTM_BLE_ADVERT_TYPE_SOLICITATION_SRV_UUID = 0x14, BTM_BLE_ADVERT_TYPE_128SOLICITATION_SRV_UUID = 0x15,
  BTM_BLE_ADVERT_TYPE_SERVICE_DATA = 0x16, BTM_BLE_ADVERT_TYPE_PUBLIC_TARGET = 0x17, BTM_BLE_ADVERT_TYPE_RANDOM_TARGET = 0x18, BTM_BLE_ADVERT_TYPE_APPEARANCE = 0x19,
  BTM_BLE_ADVERT_TYPE_ADVERT_INTERVAL = 0x1a, BTM_BLE_ADVERT_TYPE_32SOLICITATION_SRV_UUID = 0x1b, BTM_BLE_ADVERT_TYPE_32SERVICE_DATA = 0x1c, BTM_BLE_ADVERT_TYPE_128SERVICE_DATA = 0x1d,
  BTM_BLE_ADVERT_TYPE_MANUFACTURER = 0xFF, BTM_BLE_ADVERT_TYPE_FLAG = 0x01, BTM_BLE_ADVERT_TYPE_16SRV_PARTIAL = 0x02, BTM_BLE_ADVERT_TYPE_16SRV_COMPLETE = 0x03,
  BTM_BLE_ADVERT_TYPE_32SRV_PARTIAL = 0x04, BTM_BLE_ADVERT_TYPE_32SRV_COMPLETE = 0x05, BTM_BLE_ADVERT_TYPE_128SRV_PARTIAL = 0x06, BTM_BLE_ADVERT_TYPE_128SRV_COMPLETE = 0x07,
  BTM_BLE_ADVERT_TYPE_NAME_SHORT = 0x08, BTM_BLE_ADVERT_TYPE_NAME_COMPLETE = 0x09, BTM_BLE_ADVERT_TYPE_TX_POWER = 0x0A, BTM_BLE_ADVERT_TYPE_DEV_CLASS = 0x0D,
  BTM_BLE_ADVERT_TYPE_SM_TK = 0x10, BTM_BLE_ADVERT_TYPE_SM_OOB_FLAG = 0x11, BTM_BLE_ADVERT_TYPE_INTERVAL_RANGE = 0x12, BTM_BLE_ADVERT_TYPE_SOLICITATION_SRV_UUID = 0x14,
  BTM_BLE_ADVERT_TYPE_128SOLICITATION_SRV_UUID = 0x15, BTM_BLE_ADVERT_TYPE_SERVICE_DATA = 0x16, BTM_BLE_ADVERT_TYPE_PUBLIC_TARGET = 0x17, BTM_BLE_ADVERT_TYPE_RANDOM_TARGET = 0x18,
  BTM_BLE_ADVERT_TYPE_APPEARANCE = 0x19, BTM_BLE_ADVERT_TYPE_ADVERT_INTERVAL = 0x1a, BTM_BLE_ADVERT_TYPE_32SOLICITATION_SRV_UUID = 0x1b, BTM_BLE_ADVERT_TYPE_32SERVICE_DATA = 0x1c,
  BTM_BLE_ADVERT_TYPE_128SERVICE_DATA = 0x1d, BTM_BLE_ADVERT_TYPE_MANUFACTURER = 0xFF
}
 
enum  wiced_bt_ble_conn_type_e { BTM_BLE_CONN_NONE, BTM_BLE_CONN_AUTO, BTM_BLE_CONN_SELECTIVE }
 
enum  wiced_bt_ble_scan_mode_e { BTM_BLE_SCAN_MODE_PASSIVE = 0, BTM_BLE_SCAN_MODE_ACTIVE = 1, BTM_BLE_SCAN_MODE_NONE = 0xff }
 
enum  wiced_bt_ble_scanner_filter_policy_e
 
enum  wiced_bt_ble_sec_flags_e { BTM_SEC_LE_LINK_ENCRYPTED = 0x01, BTM_SEC_LE_LINK_PAIRED_WITHOUT_MITM = 0x02, BTM_SEC_LE_LINK_PAIRED_WITH_MITM = 0x04 }
 
enum  wiced_bt_dev_ble_evt_type_e {
  BTM_BLE_EVT_CONNECTABLE_ADVERTISEMENT = 0x00, BTM_BLE_EVT_CONNECTABLE_DIRECTED_ADVERTISEMENT = 0x01, BTM_BLE_EVT_SCANNABLE_ADVERTISEMENT = 0x02, BTM_BLE_EVT_NON_CONNECTABLE_ADVERTISEMENT = 0x03,
  BTM_BLE_EVT_SCAN_RSP = 0x04
}
 

Functions

uint8_t * wiced_bt_ble_check_advertising_data (uint8_t *p_adv, wiced_bt_ble_advert_type_t type, uint8_t *p_length)
 
wiced_bool_t wiced_bt_ble_clear_white_list (void)
 
wiced_bool_t wiced_bt_ble_data_signature (wiced_bt_device_address_t bd_addr, uint8_t *p_text, uint16_t len, wiced_dev_ble_signature_t signature)
 
wiced_bt_ble_advert_mode_t wiced_bt_ble_get_current_advert_mode (void)
 
wiced_bt_ble_scan_type_t wiced_bt_ble_get_current_scan_state (void)
 
wiced_bool_t wiced_bt_ble_get_security_state (wiced_bt_device_address_t bd_addr, uint8_t *p_le_sec_flags, uint8_t *p_le_key_size)
 
uint8_t wiced_bt_ble_get_white_list_size (void)
 
wiced_bt_dev_status_t wiced_bt_ble_observe (wiced_bool_t start, uint8_t duration, wiced_bt_ble_scan_result_cback_t *p_scan_result_cback)
 
wiced_result_t wiced_bt_ble_read_adv_tx_power (wiced_bt_ble_compl_cback *p_cb)
 
wiced_result_t wiced_bt_ble_scan (wiced_bt_ble_scan_type_t scan_type, wiced_bool_t duplicate_filter_enable, wiced_bt_ble_scan_result_cback_t *p_scan_result_cback)
 
void wiced_bt_ble_security_grant (wiced_bt_device_address_t bd_addr, uint8_t res)
 
wiced_result_t wiced_bt_ble_set_adv_tx_power (int power)
 
wiced_bool_t wiced_bt_ble_set_background_connection_type (wiced_bt_ble_conn_type_t conn_type, wiced_bt_ble_selective_conn_cback_t *p_select_cback)
 
wiced_result_t wiced_bt_ble_set_raw_advertisement_data (UINT8 num_elem, wiced_bt_ble_advert_elem_t *p_data)
 
wiced_bt_dev_status_t wiced_bt_ble_set_raw_scan_response_data (uint8_t num_elem, wiced_bt_ble_advert_elem_t *p_data)
 
wiced_bool_t wiced_bt_ble_update_advertising_white_list (wiced_bool_t add, wiced_bt_device_address_t remote_bda)
 
wiced_bool_t wiced_bt_ble_update_background_connection_device (wiced_bool_t add_remove, wiced_bt_device_address_t remote_bda)
 
void wiced_bt_ble_update_scanner_filter_policy (wiced_bt_ble_scanner_filter_policy_t scanner_policy)
 
wiced_bool_t wiced_bt_ble_update_scanner_white_list (wiced_bool_t add, wiced_bt_device_address_t remote_bda, wiced_bt_ble_address_type_t addr_type)
 
wiced_bool_t wiced_bt_ble_verify_signature (wiced_bt_device_address_t bd_addr, uint8_t *p_orig, uint16_t len, uint32_t counter, uint8_t *p_comp)
 
wiced_result_t wiced_bt_start_advertisements (wiced_bt_ble_advert_mode_t advert_mode, wiced_bt_ble_address_type_t directed_advertisement_bdaddr_type, wiced_bt_device_address_ptr_t directed_advertisement_bdaddr_ptr)
 
wiced_bool_t wiced_btm_ble_update_advertisement_filter_policy (wiced_bt_ble_advert_filter_policy_t advertising_policy)
 

Detailed Description

WICED Bluetooth Low Energy (BLE) Functions

Macro Definition Documentation

#define BTM_BLE_AUTH_SIGNATURE_SIZE   12

BLE Signature BLE data signature length 8 Bytes + 4 bytes counter

#define BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_CONTROLLER_SUPPORTED   (0x01 << 3)

Simultaneous LE and BR/EDR to Same Device Capable (Controller).

#define BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_HOST_SUPPORTED   (0x01 << 4)

Simultaneous LE and BR/EDR to Same Device Capable (Host).

Typedef Documentation

BLE advertisement channel map (see wiced_bt_ble_advert_chnl_map_e)

Advertising filter policy (see wiced_bt_ble_advert_filter_policy_e)

typedef uint8_t wiced_bt_ble_advert_type_t

BLE advertisement data type (see wiced_bt_ble_advert_type_e)

typedef uint8_t wiced_bt_ble_conn_type_t

Connection type (see wiced_bt_ble_conn_type_e)

typedef uint8_t wiced_bt_ble_scan_mode_t

scan mode (see wiced_bt_ble_scan_mode_e)

typedef void( wiced_bt_ble_scan_result_cback_t)(wiced_bt_ble_scan_results_t *p_scan_result, uint8_t *p_adv_data)

Callback wiced_bt_ble_scan_result_cback_t

Scan result callback (from calling wiced_bt_ble_scan)

Parameters
p_scan_result: scan result data (NULL indicates end of scanning)
p_adv_data: Advertisement data (parse using wiced_bt_ble_check_advertising_data)
Returns
Nothing
typedef wiced_bool_t( wiced_bt_ble_selective_conn_cback_t)(wiced_bt_device_address_t remote_bda, uint8_t *p_remote_name)

Callback wiced_bt_ble_selective_conn_cback_t

Selective connection callback (registered with wiced_bt_ble_set_background_connection_type)

Parameters
remote_bda: remote device
p_remote_name: remote device name
Returns
typedef uint8_t wiced_bt_dev_ble_evt_type_t

Scan result event value (see wiced_bt_dev_ble_evt_type_e)

typedef uint8_t wiced_dev_ble_signature_t[BTM_BLE_AUTH_SIGNATURE_SIZE]

Device address (see BTM_BLE_AUTH_SIGNATURE_SIZE)

Enumeration Type Documentation

advertising channel map

Enumerator
BTM_BLE_ADVERT_CHNL_37 

ADV channel

BTM_BLE_ADVERT_CHNL_38 

ADV channel

BTM_BLE_ADVERT_CHNL_39 

ADV channel

Advertising filter policy

Enumerator
BTM_BLE_ADVERT_FILTER_ALL_CONNECTION_REQ_ALL_SCAN_REQ 

Process scan and connection requests from all devices (i.e., the White List is not in use) (default)

BTM_BLE_ADVERT_FILTER_ALL_CONNECTION_REQ_WHITELIST_SCAN_REQ 

Process connection requests from all devices and only scan requests from devices that are in the White List.

BTM_BLE_ADVERT_FILTER_WHITELIST_CONNECTION_REQ_ALL_SCAN_REQ 

Process scan requests from all devices and only connection requests from devices that are in the White List

BTM_BLE_ADVERT_FILTER_WHITELIST_CONNECTION_REQ_WHITELIST_SCAN_REQ 

Process scan and connection requests only from devices in the White List.

Advertisement data types

Enumerator
BTM_BLE_ADVERT_TYPE_FLAG 

Advertisement flags

BTM_BLE_ADVERT_TYPE_16SRV_PARTIAL 

List of supported services - 16 bit UUIDs (partial)

BTM_BLE_ADVERT_TYPE_16SRV_COMPLETE 

List of supported services - 16 bit UUIDs (complete)

BTM_BLE_ADVERT_TYPE_32SRV_PARTIAL 

List of supported services - 32 bit UUIDs (partial)

BTM_BLE_ADVERT_TYPE_32SRV_COMPLETE 

List of supported services - 32 bit UUIDs (complete)

BTM_BLE_ADVERT_TYPE_128SRV_PARTIAL 

List of supported services - 128 bit UUIDs (partial)

BTM_BLE_ADVERT_TYPE_128SRV_COMPLETE 

List of supported services - 128 bit UUIDs (complete)

BTM_BLE_ADVERT_TYPE_NAME_SHORT 

Short name

BTM_BLE_ADVERT_TYPE_NAME_COMPLETE 

Complete name

BTM_BLE_ADVERT_TYPE_TX_POWER 

TX Power level

BTM_BLE_ADVERT_TYPE_DEV_CLASS 

Device Class

BTM_BLE_ADVERT_TYPE_SM_TK 

Security manager TK value

BTM_BLE_ADVERT_TYPE_SM_OOB_FLAG 

Security manager Out-of-Band data

BTM_BLE_ADVERT_TYPE_INTERVAL_RANGE 

Slave connection interval range

BTM_BLE_ADVERT_TYPE_SOLICITATION_SRV_UUID 

List of solicitated services - 16 bit UUIDs

BTM_BLE_ADVERT_TYPE_128SOLICITATION_SRV_UUID 

List of solicitated services - 128 bit UUIDs

BTM_BLE_ADVERT_TYPE_SERVICE_DATA 

Service data - 16 bit UUID

BTM_BLE_ADVERT_TYPE_PUBLIC_TARGET 

Public target address

BTM_BLE_ADVERT_TYPE_RANDOM_TARGET 

Random target address

BTM_BLE_ADVERT_TYPE_APPEARANCE 

Appearance

BTM_BLE_ADVERT_TYPE_ADVERT_INTERVAL 

Advertising interval

BTM_BLE_ADVERT_TYPE_32SOLICITATION_SRV_UUID 

List of solicitated services - 32 bit UUIDs

BTM_BLE_ADVERT_TYPE_32SERVICE_DATA 

Service data - 32 bit UUID

BTM_BLE_ADVERT_TYPE_128SERVICE_DATA 

Service data - 128 bit UUID

BTM_BLE_ADVERT_TYPE_MANUFACTURER 

Manufacturer data

Background connection type

Enumerator
BTM_BLE_CONN_NONE 

No background connection

BTM_BLE_CONN_AUTO 

Auto connection

BTM_BLE_CONN_SELECTIVE 

Selective connection

Scan modes

Enumerator
BTM_BLE_SCAN_MODE_PASSIVE 

Passive scan mode

BTM_BLE_SCAN_MODE_ACTIVE 

Active scan mode

BTM_BLE_SCAN_MODE_NONE 

None

Scanner filter policy

security settings used with L2CAP LE COC

Enumerator
BTM_SEC_LE_LINK_ENCRYPTED 

Link encrypted

BTM_SEC_LE_LINK_PAIRED_WITHOUT_MITM 

Paired without man-in-the-middle protection

BTM_SEC_LE_LINK_PAIRED_WITH_MITM 

Link with man-in-the-middle protection

Scan result event type

Enumerator
BTM_BLE_EVT_CONNECTABLE_ADVERTISEMENT 

Connectable advertisement

BTM_BLE_EVT_CONNECTABLE_DIRECTED_ADVERTISEMENT 

Connectable Directed advertisement

BTM_BLE_EVT_SCANNABLE_ADVERTISEMENT 

Scannable advertisement

BTM_BLE_EVT_NON_CONNECTABLE_ADVERTISEMENT 

Non connectable advertisement

BTM_BLE_EVT_SCAN_RSP 

Scan response