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

LE Security API. More...

Functions

wiced_result_t wiced_bt_dev_get_ble_keys (wiced_bt_device_address_t bd_addr, wiced_bt_dev_le_key_type_t *p_key_mask)
 get le key mask from stored key information of nv ram More...
 
wiced_result_t wiced_bt_dev_add_device_to_address_resolution_db (wiced_bt_device_link_keys_t *p_link_keys)
 add link key information to internal address resolution db More...
 
wiced_result_t wiced_bt_dev_remove_device_from_address_resolution_db (wiced_bt_device_link_keys_t *p_link_keys)
 remove link key information from internal address resolution db More...
 
uint16_t wiced_bt_dev_get_acl_conn_handle (wiced_bt_device_address_t bdaddr, wiced_bt_transport_t transport)
 get the acl connection handle for bdaddr More...
 
void wiced_bt_ble_security_grant (wiced_bt_device_address_t bd_addr, wiced_bt_dev_status_t res)
 btm_ble_api_functions More...
 
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)
 Sign the data using AES128 CMAC algorith. More...
 
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)
 Verify the data signature. More...
 
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)
 Get security mode 1 flags and encryption key size for LE peer. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_privacy_mode (wiced_bt_device_address_t remote_bda, wiced_bt_ble_address_type_t rem_bda_type, wiced_bt_ble_privacy_mode_t privacy_mode)
 Updates privacy mode if device is already available in controller resolving list. More...
 
wiced_bt_dev_status_t wiced_bt_ble_read_device_random_address (wiced_bt_device_address_t random_bd_addr)
 Get the configured local random device address. More...
 
wiced_bool_t wiced_bt_ble_is_ext_adv_supported (void)
 Check if the local BT controller supports extended advertising. More...
 
wiced_bool_t wiced_bt_ble_is_periodic_adv_supported (void)
 Check if the local BT controller supports periodic advertising. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_ext_adv_random_address (wiced_bt_ble_ext_adv_handle_t adv_handle, wiced_bt_device_address_t random_addr)
 Sends HCI command to set the random address for an adv set. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_ext_adv_parameters (wiced_bt_ble_ext_adv_handle_t adv_handle, wiced_bt_ble_ext_adv_event_property_t event_properties, uint32_t primary_adv_int_min, uint32_t primary_adv_int_max, wiced_bt_ble_advert_chnl_map_t primary_adv_channel_map, wiced_bt_ble_address_type_t own_addr_type, wiced_bt_ble_address_type_t peer_addr_type, wiced_bt_device_address_t peer_addr, wiced_bt_ble_advert_filter_policy_t adv_filter_policy, int8_t adv_tx_power, wiced_bt_ble_ext_adv_phy_t primary_adv_phy, uint8_t secondary_adv_max_skip, wiced_bt_ble_ext_adv_phy_t secondary_adv_phy, wiced_bt_ble_ext_adv_sid_t adv_sid, wiced_bt_ble_ext_adv_scan_req_notification_setting_t scan_request_not)
 Sends the HCI command to set the parameters for extended advetisement. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_ext_adv_data (wiced_bt_ble_ext_adv_handle_t adv_handle, uint16_t data_len, uint8_t *p_data)
 Sends HCI command to write the extended adv data. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_legacy_adv_data (uint16_t data_len, uint8_t *p_data)
 Sends HCI command to write the legacy adv data. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_ext_scan_rsp_data (wiced_bt_ble_ext_adv_handle_t adv_handle, uint16_t data_len, uint8_t *p_data)
 Sends HCI command to write the extended scan rsp data. More...
 
wiced_bt_dev_status_t wiced_bt_ble_start_ext_adv (uint8_t enable, uint8_t num_sets, wiced_bt_ble_ext_adv_duration_config_t *p_dur)
 Sends the HCI command to start/stop extended advertisements. More...
 
wiced_bt_dev_status_t wiced_bt_ble_remove_adv_set (wiced_bt_ble_ext_adv_handle_t adv_handle)
 Sends the HCI command to remove an extended advertisement set (which is currently not advertising) More...
 
wiced_bt_dev_status_t wiced_bt_ble_clear_adv_sets (void)
 Sends the HCI command to remove all extended advertisement sets which are currently not advertising. More...
 
uint8_t wiced_bt_ble_read_num_ext_adv_sets (void)
 Read the number of ADV sets supported by the controller. More...
 
uint16_t wiced_bt_ble_read_max_ext_adv_data_len (void)
 Read the maximum ADV data length supported by the controller. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_periodic_adv_params (wiced_bt_ble_ext_adv_handle_t adv_handle, uint16_t periodic_adv_int_min, uint16_t periodic_adv_int_max, wiced_bt_ble_periodic_adv_prop_t periodic_adv_properties)
 Sends the HCI command to set the parameters for periodic advertising. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_periodic_adv_data (wiced_bt_ble_ext_adv_handle_t adv_handle, uint16_t adv_data_length, uint8_t *p_adv_data)
 Sends the HCI command to write the periodic adv data. More...
 
wiced_bt_dev_status_t wiced_bt_ble_start_periodic_adv (wiced_bt_ble_ext_adv_handle_t adv_handle, wiced_bool_t enable)
 Sends the HCI command to start/stop periodic advertisements. More...
 
wiced_bt_dev_status_t wiced_bt_ble_cache_ext_scan_config (wiced_bt_ble_ext_scan_config_t *p_ext_scan_cfg)
 Stores extended scan configuration to apply on start ext scan. More...
 
wiced_bt_dev_status_t wiced_bt_ble_cache_ext_conn_config (wiced_bt_ble_ext_conn_cfg_t *p_ext_conn_cfg)
 Stores the extended ADV connection configuration. More...
 
wiced_bt_dev_status_t wiced_bt_ble_create_sync_to_periodic_adv (wiced_bt_ble_adv_sync_options_t options, wiced_bt_ble_ext_adv_sid_t adv_sid, wiced_bt_ble_address_type_t adv_addr_type, wiced_bt_device_address_t adv_addr, uint16_t skip, uint16_t sync_timeout, uint8_t sync_cte_type)
 Sends the HCI command to synchronize with periodic advertising from an advertiser and begin receiving periodic advertising packets. More...
 
wiced_bt_dev_status_t wiced_bt_ble_cancel_sync_to_periodic_adv (void)
 Sends HCI command to cancel the create sync command while it is pending. More...
 
wiced_bt_dev_status_t wiced_bt_ble_terminate_sync_to_periodic_adv (uint16_t sync_handle)
 Sends the HCI command to stop reception of periodic advertising identified by the sync_handle. More...
 
wiced_bt_dev_status_t wiced_bt_ble_add_device_to_periodic_adv_list (wiced_bt_ble_address_type_t advertiser_addr_type, wiced_bt_device_address_t advetiser_addr, wiced_bt_ble_ext_adv_sid_t adv_sid)
 Sends the HCI command to add the given advertiser to Periodic Advertiser list. More...
 
wiced_bt_dev_status_t wiced_bt_ble_remove_device_from_periodic_adv_list (wiced_bt_ble_address_type_t advertiser_addr_type, wiced_bt_device_address_t advetiser_addr, wiced_bt_ble_ext_adv_sid_t adv_sid)
 Sends the HCI command to remove the given advertiser from Periodic Advertiser list. More...
 
wiced_bt_dev_status_t wiced_bt_ble_clear_periodic_adv_list (void)
 Sends the HCI command to remove to remove all devices from the the Periodic Advertisers list. More...
 
uint8_t wiced_bt_ble_read_periodic_adv_list_size (void)
 Read the Periodic Advertisers list size. More...
 
void wiced_bt_ble_register_adv_ext_cback (wiced_bt_ble_adv_ext_event_cb_fp_t p_app_adv_ext_event_cb)
 Register an application callback function to receive extended advertising events. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_periodic_adv_rcv_enable (wiced_bt_ble_periodic_adv_sync_handle_t sync_handle, wiced_bool_t enable)
 Sends the HCI command enable or disable receiving periodic ADV data for a sync handle. More...
 
wiced_bt_dev_status_t wiced_bt_ble_periodic_adv_sync_transfer (wiced_bt_device_address_t peer_bda, uint16_t service_data, wiced_bt_ble_periodic_adv_sync_handle_t sync_handle)
 Sends the HCI command to send synchronization information about the periodic advertising train identified by the Sync_Handle parameter to given device. More...
 
wiced_bt_dev_status_t wiced_bt_ble_periodic_adv_set_info_transfer (wiced_bt_device_address_t peer_bda, uint16_t service_data, wiced_bt_ble_ext_adv_handle_t adv_handle)
 Sends the HCI command to send synchronization information about the periodic advertising in an advertising set to given device. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_periodic_adv_sync_transfer_param (wiced_bt_device_address_t peer_bda, wiced_bt_ble_periodic_adv_sync_transfer_mode_t mode, uint16_t skip, uint16_t sync_timeout, uint8_t sync_cte_type)
 Sends the HCI command to set synchronize periodic transfer parameter. More...
 
wiced_bt_dev_status_t wiced_bt_ble_set_default_periodic_adv_sync_transfer_param (wiced_bt_ble_periodic_adv_sync_transfer_mode_t mode, uint16_t skip, uint16_t sync_timeout, uint8_t sync_cte_type)
 Sends the HCI command to set Default synchronize periodic transfer parameter. More...
 
wiced_result_t wiced_ble_private_device_address_resolution (wiced_bt_device_address_t rpa, BT_OCTET16 irk)
 Function wiced_ble_private_device_address_resolution. More...
 
wiced_result_t wiced_bt_ble_read_le_features (wiced_bt_device_address_t bda, wiced_bt_features_t features)
 Function wiced_bt_ble_read_le_features. More...
 
wiced_result_t wiced_bt_ble_address_resolution_list_clear_and_disable (void)
 Function wiced_bt_ble_address_resolution_list_clear_and_disable. More...
 
wiced_result_t wiced_bt_dev_sec_bond (wiced_bt_device_address_t bd_addr, wiced_bt_ble_address_type_t bd_addr_type, wiced_bt_transport_t transport, uint8_t pin_len, uint8_t *p_pin)
 Bluetooth LE Security Functions. More...
 
wiced_result_t wiced_bt_dev_sec_pair_without_bonding (wiced_bt_device_address_t bd_addr, wiced_bt_ble_address_type_t bd_addr_type, wiced_bt_transport_t transport, uint8_t pin_len, uint8_t *p_pin)
 Pair with peer device(dont store the keys). More...
 
wiced_result_t wiced_bt_dev_sec_bond_cancel (wiced_bt_device_address_t bd_addr)
 Cancel an ongoing bonding process with peer device. More...
 
wiced_result_t wiced_bt_dev_set_encryption (wiced_bt_device_address_t bd_addr, wiced_bt_transport_t transport, void *p_ref_data)
 Encrypt the specified connection. More...
 
void wiced_bt_dev_confirm_req_reply (wiced_result_t res, wiced_bt_device_address_t bd_addr)
 Confirm the numeric value for pairing (in response to BTM_USER_CONFIRMATION_REQUEST_EVT of wiced_bt_management_cback_t) More...
 
void wiced_bt_dev_send_key_press_notif (wiced_bt_device_address_t bd_addr, wiced_bt_dev_passkey_entry_type_t type)
 Inform remote device of keypress during pairing. More...
 
wiced_result_t wiced_bt_dev_delete_bonded_device (wiced_bt_device_address_t bd_addr)
 remove bonding with remote device with assigned bd_addr Note: This API cannot be used while being connected to the remote bd_addr More...
 
wiced_bool_t wiced_bt_dev_get_security_state (wiced_bt_device_address_t bd_addr, uint8_t *p_sec_flags)
 Get security flags for the device. More...
 

Detailed Description

LE Security API.

Function Documentation

wiced_result_t wiced_ble_private_device_address_resolution ( wiced_bt_device_address_t  rpa,
BT_OCTET16  irk 
)

Function wiced_ble_private_device_address_resolution.

This API verifies whether given device address is Resolvable Private Address or not

Parameters
rpaLE Resolvable Private Address
irkLE IRK
Returns
wiced_result_t WICED_BT_SUCCESS the identity of device address has been resolved. WICED_BT_ERROR otherwise.
wiced_bt_dev_status_t wiced_bt_ble_add_device_to_periodic_adv_list ( wiced_bt_ble_address_type_t  advertiser_addr_type,
wiced_bt_device_address_t  advetiser_addr,
wiced_bt_ble_ext_adv_sid_t  adv_sid 
)

Sends the HCI command to add the given advertiser to Periodic Advertiser list.

Note : Caller shall not attempt to add more than max list size Shall not attempt to call this API, while create to periodic sync command is pending.

Parameters
[in]advertiser_addr_type: Periodic advertiser addr type
[in]advetiser_addr: Periodic advertiser addr
[in]adv_sid: Periodic advertiser sid
Returns
wiced_bt_dev_status_t WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
WICED_BT_SUCCESS : If successful
wiced_result_t wiced_bt_ble_address_resolution_list_clear_and_disable ( void  )

Function wiced_bt_ble_address_resolution_list_clear_and_disable.

This API clears the address resolution list and disables the address resolution feature.

Returns
wiced_result_t WICED_BT_SUCCESS if address resolution list is cleared and adress resolution feature is disabled. WICED_BT_ERROR otherwise.
wiced_bt_dev_status_t wiced_bt_ble_cache_ext_conn_config ( wiced_bt_ble_ext_conn_cfg_t p_ext_conn_cfg)

Stores the extended ADV connection configuration.

Parameters
[in]p_ext_conn_cfg- pointer to connection configuration
Returns
wiced_bt_dev_status_t

WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful

wiced_bt_dev_status_t wiced_bt_ble_cache_ext_scan_config ( wiced_bt_ble_ext_scan_config_t p_ext_scan_cfg)

Stores extended scan configuration to apply on start ext scan.

Parameters
[in]p_ext_scan_cfg- pointer to scan configuration
Returns
wiced_bt_dev_status_t

WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful

wiced_bt_dev_status_t wiced_bt_ble_cancel_sync_to_periodic_adv ( void  )

Sends HCI command to cancel the create sync command while it is pending.

Returns
wiced_bt_dev_status_t WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_bt_ble_clear_adv_sets ( void  )

Sends the HCI command to remove all extended advertisement sets which are currently not advertising.

Returns
wiced_bt_dev_status_t

WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successfuly

wiced_bt_dev_status_t wiced_bt_ble_clear_periodic_adv_list ( void  )

Sends the HCI command to remove to remove all devices from the the Periodic Advertisers list.

Note : Shall not attempt to call this API, while create to periodic sync command is pending.

Returns
wiced_bt_dev_status_t WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_bt_ble_create_sync_to_periodic_adv ( wiced_bt_ble_adv_sync_options_t  options,
wiced_bt_ble_ext_adv_sid_t  adv_sid,
wiced_bt_ble_address_type_t  adv_addr_type,
wiced_bt_device_address_t  adv_addr,
uint16_t  skip,
uint16_t  sync_timeout,
uint8_t  sync_cte_type 
)

Sends the HCI command to synchronize with periodic advertising from an advertiser and begin receiving periodic advertising packets.

Parameters
[in]options- ref: wiced_bt_ble_adv_sync_options_t
[in]adv_sid- min SID / max SID
[in]adv_addr_type- address type
[in]adv_addr- address value
[in]skip
[in]sync_timeout- timeout value
[in]sync_cte_type- bit 0 - Do not sync to packets with an AoA Constant Tone Extension 1 - Do not sync to packets with an AoD Constant Tone Extension with 1 μs slots 2 - Do not sync to packets with an AoD Constant Tone Extension with 2 μs slots 3 - Do not sync to packets with a type 3 Constant Tone Extension
Returns
wiced_bt_dev_status_t WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
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 
)

Sign the data using AES128 CMAC algorith.

Parameters
[in]bd_addrtarget device the data to be signed for.
[in]p_textsigning data
[in]lenlength of the signing data
[in]signatureoutput parameter where data signature is going to be stored
Returns
TRUE if signing successful, otherwise FALSE.
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 
)

Get security mode 1 flags and encryption key size for LE peer.

Parameters
[in]bd_addr: peer address
[out]p_le_sec_flags: security flags (see wiced_bt_ble_sec_flags_e)
[out]p_le_key_size: encryption key size
Returns
TRUE if successful
wiced_bool_t wiced_bt_ble_is_ext_adv_supported ( void  )

Check if the local BT controller supports extended advertising.

Returns
wiced_bool_t
wiced_bool_t wiced_bt_ble_is_periodic_adv_supported ( void  )

Check if the local BT controller supports periodic advertising.

Returns
wiced_bool_t
wiced_bt_dev_status_t wiced_bt_ble_periodic_adv_set_info_transfer ( wiced_bt_device_address_t  peer_bda,
uint16_t  service_data,
wiced_bt_ble_ext_adv_handle_t  adv_handle 
)

Sends the HCI command to send synchronization information about the periodic advertising in an advertising set to given device.

Parameters
[in]peer_bda- Peer Bluetooth Address
[in]service_data- Service Data value
[in]adv_handle- handle of the advertising set
Returns
wiced_bt_dev_status_t WICED_BT_UNKNOWN_ADDR : If Unknown remote BD address
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If command queued to send down
wiced_bt_dev_status_t wiced_bt_ble_periodic_adv_sync_transfer ( wiced_bt_device_address_t  peer_bda,
uint16_t  service_data,
wiced_bt_ble_periodic_adv_sync_handle_t  sync_handle 
)

Sends the HCI command to send synchronization information about the periodic advertising train identified by the Sync_Handle parameter to given device.

Parameters
[in]peer_bda- Peer Bluetooth Address
[in]service_data- Service Data value
[in]sync_handle: Sync handle
Returns
wiced_bt_dev_status_t WICED_BT_UNKNOWN_ADDR : If Unknown remote BD address
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If command queued to send down
wiced_bt_dev_status_t wiced_bt_ble_read_device_random_address ( wiced_bt_device_address_t  random_bd_addr)

Get the configured local random device address.

Note : random address depends on below settings in that priority order. 1) Global privacy configuration using rpa_refresh_timeout (see wiced_bt_cfg_settings_t). 2) else configured for static random bd_address while downloading using BT_DEVICE_ADDRESS=random build setting.

Parameters
[out]random_bd_addr- device random bd address
Returns
wiced_bt_dev_status_t WICED_BT_SUCCESS : if random address is configured.
WICED_BT_WRONG_MODE : if random address not configured.
wiced_result_t wiced_bt_ble_read_le_features ( wiced_bt_device_address_t  bda,
wiced_bt_features_t  features 
)

Function wiced_bt_ble_read_le_features.

This API returns the features supported by the bda

Parameters
[in]bdaDevice address pointer, pass NULL for local device
[out]featuresPointer to store the supported features
Returns
wiced_result_t WICED_BT_SUCCESS contents of features are valid WICED_BT_ERROR otherwise.
uint16_t wiced_bt_ble_read_max_ext_adv_data_len ( void  )

Read the maximum ADV data length supported by the controller.

Returns
uint16_t
uint8_t wiced_bt_ble_read_num_ext_adv_sets ( void  )

Read the number of ADV sets supported by the controller.

Returns
uint8_t
uint8_t wiced_bt_ble_read_periodic_adv_list_size ( void  )

Read the Periodic Advertisers list size.

Returns
uint8_t : list size
void wiced_bt_ble_register_adv_ext_cback ( wiced_bt_ble_adv_ext_event_cb_fp_t  p_app_adv_ext_event_cb)

Register an application callback function to receive extended advertising events.

Parameters
[in]p_app_adv_ext_event_cb- pointer to function to receive extended adv events.
Returns
wiced_bt_dev_status_t WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_bt_ble_remove_adv_set ( wiced_bt_ble_ext_adv_handle_t  adv_handle)

Sends the HCI command to remove an extended advertisement set (which is currently not advertising)

Parameters
[in]adv_handle- handle to advertisement set
Returns
wiced_bt_dev_status_t

WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful

wiced_bt_dev_status_t wiced_bt_ble_remove_device_from_periodic_adv_list ( wiced_bt_ble_address_type_t  advertiser_addr_type,
wiced_bt_device_address_t  advetiser_addr,
wiced_bt_ble_ext_adv_sid_t  adv_sid 
)

Sends the HCI command to remove the given advertiser from Periodic Advertiser list.

Note : Shall not attempt to call this API, while create to periodic sync command is pending.

Parameters
[in]advertiser_addr_type: Periodic advertiser addr type
[in]advetiser_addr: Periodic advertiser addr
[in]adv_sid: Periodic advertiser sid
Returns
wiced_bt_dev_status_t WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
WICED_BT_SUCCESS : If successful
void wiced_bt_ble_security_grant ( wiced_bt_device_address_t  bd_addr,
wiced_bt_dev_status_t  res 
)

btm_ble_api_functions

Grant or deny access. Used in response to an BTM_SECURITY_REQUEST_EVT event.

Parameters
[in]bd_addr: peer device bd address.
[in]res: WICED_BT_SUCCESS to grant access; WICED_BT_UNSUPPORTED , if local device does not allow pairing; WICED_BT_REPEATED_ATTEMPTS otherwise
Returns
None
wiced_bt_dev_status_t wiced_bt_ble_set_default_periodic_adv_sync_transfer_param ( wiced_bt_ble_periodic_adv_sync_transfer_mode_t  mode,
uint16_t  skip,
uint16_t  sync_timeout,
uint8_t  sync_cte_type 
)

Sends the HCI command to set Default synchronize periodic transfer parameter.

Parameters
[in]mode- ref: wiced_bt_ble_periodic_adv_sync_transfer_mode_t
[in]skip- The number of periodic advertising packets that can be skipped after a successful receive
[in]sync_timeout- timeout value
[in]sync_cte_type- bit 0 - Do not sync to packets with an AoA Constant Tone Extension 1 - Do not sync to packets with an AoD Constant Tone Extension with 1 μs slots 2 - Do not sync to packets with an AoD Constant Tone Extension with 2 μs slots 3 - Do not sync to packets with a type 3 Constant Tone Extension
Returns
wiced_bt_dev_status_t WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_bt_ble_set_ext_adv_data ( wiced_bt_ble_ext_adv_handle_t  adv_handle,
uint16_t  data_len,
uint8_t *  p_data 
)

Sends HCI command to write the extended adv data.

Note
This API allows sending data formatted with wiced_bt_ble_build_raw_advertisement_data.
This API cannot be used for the advertising handle with the event_properties that doesn't support advertising data; viz., WICED_BT_BLE_EXT_ADV_EVENT_DIRECTED_ADV, WICED_BT_BLE_EXT_ADV_EVENT_HIGH_DUTY_DIRECTED_CONNECTABLE_ADV
Parameters
[in]adv_handle- handle of the advertising set
[in]data_len- length of the adv data to use for this set
[in]p_data- pointer to the adv data to use for this set
Returns
wiced_bt_dev_status_t WICED_BT_SUCCESS : If all extended adv data set successfully
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
wiced_bt_dev_status_t wiced_bt_ble_set_ext_adv_parameters ( wiced_bt_ble_ext_adv_handle_t  adv_handle,
wiced_bt_ble_ext_adv_event_property_t  event_properties,
uint32_t  primary_adv_int_min,
uint32_t  primary_adv_int_max,
wiced_bt_ble_advert_chnl_map_t  primary_adv_channel_map,
wiced_bt_ble_address_type_t  own_addr_type,
wiced_bt_ble_address_type_t  peer_addr_type,
wiced_bt_device_address_t  peer_addr,
wiced_bt_ble_advert_filter_policy_t  adv_filter_policy,
int8_t  adv_tx_power,
wiced_bt_ble_ext_adv_phy_t  primary_adv_phy,
uint8_t  secondary_adv_max_skip,
wiced_bt_ble_ext_adv_phy_t  secondary_adv_phy,
wiced_bt_ble_ext_adv_sid_t  adv_sid,
wiced_bt_ble_ext_adv_scan_req_notification_setting_t  scan_request_not 
)

Sends the HCI command to set the parameters for extended advetisement.

Parameters
[in]adv_handleAdvertisement set handle
[in]event_propertiesBit mask to speicify connectable,scannable,low duty,high duty,directed,legacy adv
[in]primary_adv_int_minRange: 0x000020 to 0xFFFFFF (20 ms to 10,485.759375 s)
[in]primary_adv_int_maxRange: 0x000020 to 0xFFFFFF(20 ms to 10,485.759375 s)
[in]primary_adv_channel_mapLE advertisement channel map (see wiced_bt_ble_advert_chnl_map_e)
[in]own_addr_typeIgnored in case of anonymous adv. See event_properties
[in]peer_addr_typePeer address type
[in]peer_addrpeer address
[in]adv_filter_policyAdv filter policy
[in]adv_tx_power-127 to +126. 127 means host has no preference
[in]primary_adv_phyPhy used to transmit ADV packets on Primary ADV channels
[in]secondary_adv_max_skipValid only in case of extended ADV. Range 0 to FF. Maximum advertising events controller can skip before sending auxiliary adv packets on the secondary adv channel
[in]secondary_adv_phyPhy used to transmit ADV packets on secondary ADV channels. Valid only in case of extended ADV
[in]adv_sidAdvertisement set identifier is the value to be transmitted in extended ADV PDUs
[in]scan_request_notscan request received notification enable/disable
Returns
wiced_bt_dev_status_t

WICED_BT_SUCCESS : If all extended adv params are set successfully
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down

wiced_bt_dev_status_t wiced_bt_ble_set_ext_adv_random_address ( wiced_bt_ble_ext_adv_handle_t  adv_handle,
wiced_bt_device_address_t  random_addr 
)

Sends HCI command to set the random address for an adv set.

Parameters
[in]adv_handle- handle of the advertising set
[in]random_addr- random address to use for this set
Returns
wiced_bt_dev_status_t

WICED_BT_SUCCESS : If random addr is set successfully
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down

wiced_bt_dev_status_t wiced_bt_ble_set_ext_scan_rsp_data ( wiced_bt_ble_ext_adv_handle_t  adv_handle,
uint16_t  data_len,
uint8_t *  p_data 
)

Sends HCI command to write the extended scan rsp data.

Parameters
[in]adv_handle- handle of the advertising set
[in]data_len- length of the scan response data to use for this set
[in]p_data- pointer to the scan response data to use for this set
Returns
wiced_bt_dev_status_t

WICED_BT_SUCCESS : If all extended scan response data set successfully
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down

wiced_bt_dev_status_t wiced_bt_ble_set_legacy_adv_data ( uint16_t  data_len,
uint8_t *  p_data 
)

Sends HCI command to write the legacy adv data.

Note
This API allows sending data formatted with wiced_bt_ble_build_raw_advertisement_data.
Parameters
[in]data_len- length of the adv data to use, max size 31 bytes
[in]p_data- pointer to the adv data to use
Returns
wiced_bt_dev_status_t WICED_BT_SUCCESS : If all extended adv data set successfully
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
wiced_bt_dev_status_t wiced_bt_ble_set_periodic_adv_data ( wiced_bt_ble_ext_adv_handle_t  adv_handle,
uint16_t  adv_data_length,
uint8_t *  p_adv_data 
)

Sends the HCI command to write the periodic adv data.

Parameters
[in]adv_handleadvertisement set handle
[in]adv_data_lengthperiodic data length
[in]p_adv_datapointer to the periodic data
Returns
wiced_bt_dev_status_t WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_bt_ble_set_periodic_adv_params ( wiced_bt_ble_ext_adv_handle_t  adv_handle,
uint16_t  periodic_adv_int_min,
uint16_t  periodic_adv_int_max,
wiced_bt_ble_periodic_adv_prop_t  periodic_adv_properties 
)

Sends the HCI command to set the parameters for periodic advertising.

Parameters
[in]adv_handleadvertisement set handle
[in]periodic_adv_int_minRange N: 0x0006 to 0xFFFF, Time = N * 1.25 ms
[in]periodic_adv_int_maxRange N: 0x0006 to 0xFFFF, Time = N * 1.25 ms
[in]periodic_adv_propertiesperiodic adv property indicates which field should be include in periodic adv
Returns
wiced_bt_dev_status_t

WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful

wiced_bt_dev_status_t wiced_bt_ble_set_periodic_adv_rcv_enable ( wiced_bt_ble_periodic_adv_sync_handle_t  sync_handle,
wiced_bool_t  enable 
)

Sends the HCI command enable or disable receiving periodic ADV data for a sync handle.

Parameters
[in]sync_handle: Sync handle
[in]enable: Boolean for enable/disable.
Returns
wiced_bt_dev_status_t WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If command queued to send down
wiced_bt_dev_status_t wiced_bt_ble_set_periodic_adv_sync_transfer_param ( wiced_bt_device_address_t  peer_bda,
wiced_bt_ble_periodic_adv_sync_transfer_mode_t  mode,
uint16_t  skip,
uint16_t  sync_timeout,
uint8_t  sync_cte_type 
)

Sends the HCI command to set synchronize periodic transfer parameter.

Parameters
[in]peer_bda- Peer Bluetooth Address
[in]mode- ref: wiced_bt_ble_periodic_adv_sync_transfer_mode_t
[in]skip- The number of periodic advertising packets that can be skipped after a successful receive
[in]sync_timeout- timeout value
[in]sync_cte_type- bit 0 - Do not sync to packets with an AoA Constant Tone Extension 1 - Do not sync to packets with an AoD Constant Tone Extension with 1 μs slots 2 - Do not sync to packets with an AoD Constant Tone Extension with 2 μs slots 3 - Do not sync to packets with a type 3 Constant Tone Extension
Returns
wiced_bt_dev_status_t WICED_BT_UNKNOWN_ADDR : If Unknown remote BD address
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_bt_ble_set_privacy_mode ( wiced_bt_device_address_t  remote_bda,
wiced_bt_ble_address_type_t  rem_bda_type,
wiced_bt_ble_privacy_mode_t  privacy_mode 
)

Updates privacy mode if device is already available in controller resolving list.

Parameters
[in]remote_bda-remote device address received during connection up
[in]rem_bda_type-remote device address type received during connection up
[in]privacy_mode- privacy mode (see wiced_bt_ble_privacy_mode_t)
Returns
wiced_bt_dev_status_t
WICED_BT_ILLEGAL_VALUE : if paramer is wrong
WICED_BT_UNSUPPORTED : if command not supported
WICED_BT_UNKNOWN_ADDR : if bd_addr is wrong
WICED_BT_ILLEGAL_ACTION : if device not added to resolving list or peer irk is not valid
WICED_BT_ERROR : error while processing the command
WICED_BT_SUCCESS : if command started
wiced_bt_dev_status_t wiced_bt_ble_start_ext_adv ( uint8_t  enable,
uint8_t  num_sets,
wiced_bt_ble_ext_adv_duration_config_t p_dur 
)

Sends the HCI command to start/stop extended advertisements.

Parameters
[in]enable- true to enable, false to disable
[in]num_sets- number of sets to enable, unused if disabling
[in]p_dur- pointer to adv handle(s) and duration configuration
Returns
wiced_bt_dev_status_t

WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful

wiced_bt_dev_status_t wiced_bt_ble_start_periodic_adv ( wiced_bt_ble_ext_adv_handle_t  adv_handle,
wiced_bool_t  enable 
)

Sends the HCI command to start/stop periodic advertisements.

Parameters
[in]adv_handle- handle of the advertising set
[in]enable- true to enable, false to disable
Returns
wiced_bt_dev_status_t WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_bt_ble_terminate_sync_to_periodic_adv ( uint16_t  sync_handle)

Sends the HCI command to stop reception of periodic advertising identified by the sync_handle.

Parameters
[in]sync_handle- Sync handle received in WICED_BT_BLE_PERIODIC_ADV_SYNC_ESTABLISHED_EVENT.
Returns
wiced_bt_dev_status_t

WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
WICED_BT_SUCCESS : If successful

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 
)

Verify the data signature.

Parameters
[in]bd_addrtarget device the data to be signed for.
[in]p_origoriginal data before signature.
[in]lenlength of the signing data
[in]countercounter used when doing data signing
[in]p_compsignature to be compared against.
Returns
TRUE if signature verified correctly; otherwise FALSE.
wiced_result_t wiced_bt_dev_add_device_to_address_resolution_db ( wiced_bt_device_link_keys_t p_link_keys)

add link key information to internal address resolution db

Parameters
[in]p_link_keys: link keys information stored in application side
Returns
wiced_result_t
void wiced_bt_dev_confirm_req_reply ( wiced_result_t  res,
wiced_bt_device_address_t  bd_addr 
)

Confirm the numeric value for pairing (in response to BTM_USER_CONFIRMATION_REQUEST_EVT of wiced_bt_management_cback_t)

Parameters
[in]res: result of the operation WICED_BT_SUCCESS if success
[in]bd_addr: Address of the peer device
Returns
void
wiced_result_t wiced_bt_dev_delete_bonded_device ( wiced_bt_device_address_t  bd_addr)

remove bonding with remote device with assigned bd_addr Note: This API cannot be used while being connected to the remote bd_addr

Parameters
[in]bd_addr: bd_addr of remote device to be removed from bonding list
Returns
wiced_result_t
uint16_t wiced_bt_dev_get_acl_conn_handle ( wiced_bt_device_address_t  bdaddr,
wiced_bt_transport_t  transport 
)

get the acl connection handle for bdaddr

Parameters
[in]bdaddrdevice identity address
[in]transportconnection transport
Returns
: acl connection handle
wiced_result_t wiced_bt_dev_get_ble_keys ( wiced_bt_device_address_t  bd_addr,
wiced_bt_dev_le_key_type_t p_key_mask 
)

get le key mask from stored key information of nv ram

Parameters
[in]bd_addr: remote bd address
[out]p_key_mask: ble key mask stored
Returns
wiced_result_t
wiced_bool_t wiced_bt_dev_get_security_state ( wiced_bt_device_address_t  bd_addr,
uint8_t *  p_sec_flags 
)

Get security flags for the device.

Parameters
[in]bd_addr: peer address
[out]p_sec_flags: security flags (see wiced_bt_sec_flags_e)
Returns
TRUE if successful
wiced_result_t wiced_bt_dev_remove_device_from_address_resolution_db ( wiced_bt_device_link_keys_t p_link_keys)

remove link key information from internal address resolution db

Parameters
[in]p_link_keys: link keys information stored in application side
Returns
wiced_result_t
wiced_result_t wiced_bt_dev_sec_bond ( wiced_bt_device_address_t  bd_addr,
wiced_bt_ble_address_type_t  bd_addr_type,
wiced_bt_transport_t  transport,
uint8_t  pin_len,
uint8_t *  p_pin 
)

Bluetooth LE Security Functions.

Bond with peer device. If the connection is already up, but not secure, pairing is attempted.

Note
PIN parameters are only needed when bonding with legacy devices (pre-2.1 Core Spec)
Parameters
[in]bd_addr: Peer device bd address to pair with.
[in]bd_addr_type: BLE_ADDR_PUBLIC or BLE_ADDR_RANDOM (applies to LE devices only)
[in]transport: BT_TRANSPORT_BR_EDR or BT_TRANSPORT_LE
[in]pin_len: Length of input parameter p_pin (0 if not used).
[in]p_pin: Pointer to Pin Code to use (NULL if not used).
Returns

WICED_BT_PENDING : if successfully initiated,
WICED_BT_SUCCESS : if already paired to the device, else error code

wiced_result_t wiced_bt_dev_sec_bond_cancel ( wiced_bt_device_address_t  bd_addr)

Cancel an ongoing bonding process with peer device.

Parameters
[in]bd_addr: Peer device bd address to pair with.
Returns

WICED_BT_PENDING : if cancel initiated,
WICED_BT_SUCCESS : if cancel has completed already, else error code.

wiced_result_t wiced_bt_dev_sec_pair_without_bonding ( wiced_bt_device_address_t  bd_addr,
wiced_bt_ble_address_type_t  bd_addr_type,
wiced_bt_transport_t  transport,
uint8_t  pin_len,
uint8_t *  p_pin 
)

Pair with peer device(dont store the keys).

If the connection is already up, but not secure, pairing is attempted.

Note
PIN parameters are only needed when bonding with legacy devices (pre-2.1 Core Spec)
Parameters
[in]bd_addr: Peer device bd address to pair with.
[in]bd_addr_type: BLE_ADDR_PUBLIC or BLE_ADDR_RANDOM (applies to LE devices only)
[in]transport: BT_TRANSPORT_BR_EDR or BT_TRANSPORT_LE
[in]pin_len: Length of input parameter p_pin (0 if not used).
[in]p_pin: Pointer to Pin Code to use (NULL if not used).
Returns

WICED_BT_PENDING : if successfully initiated,
WICED_BT_SUCCESS : if already paired to the device, else error code

void wiced_bt_dev_send_key_press_notif ( wiced_bt_device_address_t  bd_addr,
wiced_bt_dev_passkey_entry_type_t  type 
)

Inform remote device of keypress during pairing.

Used during the passkey entry by a device with KeyboardOnly IO capabilities (typically a HID keyboard device).

Parameters
[in]bd_addr: Address of the peer device
[in]type: notification type
wiced_result_t wiced_bt_dev_set_encryption ( wiced_bt_device_address_t  bd_addr,
wiced_bt_transport_t  transport,
void *  p_ref_data 
)

Encrypt the specified connection.

Status is notified using BTM_ENCRYPTION_STATUS_EVT of wiced_bt_management_cback_t.

Parameters
[in]bd_addr: Address of peer device
[in]transport: BT_TRANSPORT_BR_EDR or BT_TRANSPORT_LE
[in]p_ref_data: Encryption type wiced_bt_ble_sec_action_type_t
Returns

WICED_BT_SUCCESS : already encrypted
WICED_BT_PENDING : command will be returned in the callback
WICED_BT_WRONG_MODE : connection not up.
WICED_BT_BUSY : security procedures are currently active