LE Security API.
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 Bluetooth controller supports extended advertising. More... | |
wiced_bool_t | wiced_bt_ble_is_periodic_adv_supported (void) |
Check if the local Bluetooth 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_parameters_v2 (wiced_bt_ble_ext_adv_handle_t adv_handle, wiced_bt_ble_ext_adv_params_t *p_params) |
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_params_v2 (wiced_bt_ble_ext_adv_handle_t adv_handle, wiced_bt_ble_periodic_adv_params_t *p_adv_params) |
Sends the HCI command V2 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_bt_dev_status_t | wiced_bt_ble_set_pawr_params (wiced_bt_ble_ext_adv_handle_t adv_handle, wiced_bt_ble_periodic_adv_params_t *p_adv_params) |
Function wiced_bt_ble_set_pawr_params. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_set_pawr_subevent_ind_data (wiced_bt_ble_ext_adv_handle_t adv_handle, int num_subevents, wiced_bt_ble_pawr_subevent_ind_data_t *p_se_data) |
Function wiced_bt_ble_set_pawr_subevent_ind_data. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_set_pawr_subevent_rsp_data (uint16_t sync_handle, wiced_bt_ble_pawr_subevent_rsp_data_t *p_rsp_data) |
Function wiced_bt_ble_set_pawr_subevent_rsp_data. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_set_pawr_sync_subevents (uint16_t sync_handle, uint16_t properties, int num_subevents, uint8_t *p_subevents) |
Function wiced_bt_ble_pawr_sync_subevents. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_set_host_features (wiced_bt_ble_feature_bit_t feature, uint8_t bit_value) |
Function wiced_bt_ble_set_host_features. More... | |
uint32_t | wiced_bt_ble_encrypt_adv_packet (uint8_t *p_key, uint8_t *p_iv, uint8_t *p_randomizer, const uint8_t *p_plaintext, uint8_t *p_encrypted, int payload_len) |
Function wiced_bt_ble_encrypt_adv_packet. More... | |
uint32_t | wiced_bt_ble_decrypt_adv_packet (uint8_t *p_key, uint8_t *p_iv, uint8_t *p_randomizer, const uint8_t *p_encrypted, uint8_t *p_plaintext, int coded_len) |
Function wiced_bt_ble_decrypt_adv_packet. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_notify_on_device_address_change (wiced_bool_t enable) |
Function wiced_bt_ble_notify_on_device_address_change. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_set_data_packet_length (wiced_bt_device_address_t bd_addr, uint16_t tx_pdu_length, uint16_t tx_time) |
This API allows to set maximum transmission payload size and maximum packet transmission time to be used for LL DATA PDUs on a given connection. 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... | |
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.
[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 |
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.
[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). |
WICED_BT_PENDING : if successfully initiated,
WICED_BT_SUCCESS : if already paired to the device, else error code
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
[in] | bd_addr | : remote bd address |
[out] | p_key_mask | : LE key mask stored |
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
[in] | p_link_keys | : link keys information stored in application side |
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
[in] | p_link_keys | : link keys information stored in application side |
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
[in] | bdaddr | device identity address |
[in] | transport | connection transport |
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.
[in] | bd_addr | target device the data to be signed for. |
[in] | p_text | signing data |
[in] | len | length of the signing data |
[in] | signature | output parameter where data signature is going to be stored |
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.
[in] | bd_addr | target device the data to be signed for. |
[in] | p_orig | original data before signature. |
[in] | len | length of the signing data |
[in] | counter | counter used when doing data signing |
[in] | p_comp | signature to be compared against. |
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.
[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 |
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.
[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) |
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.
[out] | random_bd_addr | - device random bd address |
wiced_bool_t wiced_bt_ble_is_ext_adv_supported | ( | void | ) |
Check if the local Bluetooth controller supports extended advertising.
wiced_bool_t wiced_bt_ble_is_periodic_adv_supported | ( | void | ) |
Check if the local Bluetooth controller supports periodic advertising.
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.
[in] | adv_handle | - handle of the advertising set |
[in] | random_addr | - random address to use for this set |
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_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.
[in] | adv_handle | Advertisement set handle |
[in] | event_properties | Bit mask to speicify connectable,scannable,low duty,high duty,directed,legacy adv |
[in] | primary_adv_int_min | Range: 0x000020 to 0xFFFFFF (20 ms to 10,485.759375 s) |
[in] | primary_adv_int_max | Range: 0x000020 to 0xFFFFFF(20 ms to 10,485.759375 s) |
[in] | primary_adv_channel_map | LE advertisement channel map (see wiced_bt_ble_advert_chnl_map_e) |
[in] | own_addr_type | Ignored in case of anonymous adv. See event_properties |
[in] | peer_addr_type | Peer address type |
[in] | peer_addr | peer address |
[in] | adv_filter_policy | Adv filter policy |
[in] | adv_tx_power | -127 to +126. 127 means host has no preference |
[in] | primary_adv_phy | Phy used to transmit ADV packets on Primary ADV channels |
[in] | secondary_adv_max_skip | Valid 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_phy | Phy used to transmit ADV packets on secondary ADV channels. Valid only in case of extended ADV |
[in] | adv_sid | Advertisement set identifier is the value to be transmitted in extended ADV PDUs |
[in] | scan_request_not | scan request received notification enable/disable |
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_parameters_v2 | ( | wiced_bt_ble_ext_adv_handle_t | adv_handle, |
wiced_bt_ble_ext_adv_params_t * | p_params | ||
) |
Sends the HCI command to set the parameters for extended advetisement.
[in] | adv_handle | Advertisement set handle |
[in] | p_params | Extended adv parameters |
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_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.
[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 |
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.
[in] | data_len | - length of the adv data to use, max size 31 bytes |
[in] | p_data | - pointer to the adv data to use |
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.
[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 |
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_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.
[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 |
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_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)
[in] | adv_handle | - handle to advertisement set |
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_clear_adv_sets | ( | void | ) |
Sends the HCI command to remove all extended advertisement sets which are currently not advertising.
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successfuly
uint8_t wiced_bt_ble_read_num_ext_adv_sets | ( | void | ) |
Read the number of ADV sets supported by the controller.
uint16_t wiced_bt_ble_read_max_ext_adv_data_len | ( | void | ) |
Read the maximum ADV data length supported by the controller.
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.
[in] | adv_handle | advertisement set handle |
[in] | periodic_adv_int_min | Range N: 0x0006 to 0xFFFF, Time = N * 1.25 ms |
[in] | periodic_adv_int_max | Range N: 0x0006 to 0xFFFF, Time = N * 1.25 ms |
[in] | periodic_adv_properties | periodic adv property indicates which field should be include in periodic adv |
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_v2 | ( | wiced_bt_ble_ext_adv_handle_t | adv_handle, |
wiced_bt_ble_periodic_adv_params_t * | p_adv_params | ||
) |
Sends the HCI command V2 to set the parameters for periodic advertising.
[in] | adv_handle | advertisement set handle |
[in] | p_adv_params | pointer to periodic advertising parameters |
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_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.
[in] | adv_handle | advertisement set handle |
[in] | adv_data_length | periodic data length |
[in] | p_adv_data | pointer to the periodic data |
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.
[in] | adv_handle | - handle of the advertising set |
[in] | enable | - true to enable, false to disable |
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.
[in] | p_ext_scan_cfg | - pointer to scan configuration |
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_conn_config | ( | wiced_bt_ble_ext_conn_cfg_t * | p_ext_conn_cfg | ) |
Stores the extended ADV connection configuration.
[in] | p_ext_conn_cfg | - pointer to connection configuration |
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_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.
[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 |
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.
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.
[in] | sync_handle | - Sync handle received in WICED_BT_BLE_PERIODIC_ADV_SYNC_ESTABLISHED_EVENT. |
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_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.
[in] | advertiser_addr_type | : Periodic advertiser addr type |
[in] | advetiser_addr | : Periodic advertiser addr |
[in] | adv_sid | : Periodic advertiser sid |
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.
[in] | advertiser_addr_type | : Periodic advertiser addr type |
[in] | advetiser_addr | : Periodic advertiser addr |
[in] | adv_sid | : Periodic advertiser sid |
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.
uint8_t wiced_bt_ble_read_periodic_adv_list_size | ( | void | ) |
Read the Periodic Advertisers 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.
[in] | p_app_adv_ext_event_cb | - pointer to function to receive extended adv events. |
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.
[in] | sync_handle | : Sync handle |
[in] | enable | : Boolean for enable/disable. |
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.
[in] | peer_bda | - Peer Bluetooth Address |
[in] | service_data | - Service Data value |
[in] | sync_handle | : Sync handle |
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.
[in] | peer_bda | - Peer Bluetooth Address |
[in] | service_data | - Service Data value |
[in] | adv_handle | - handle of the advertising set |
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.
[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 |
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.
[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 |
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
rpa | LE Resolvable Private Address |
irk | LE IRK |
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 \p bda
[in] | bda | Device address pointer, pass NULL for local device |
[out] | features | Pointer to store the supported features |
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.
wiced_bt_dev_status_t wiced_bt_ble_set_pawr_params | ( | wiced_bt_ble_ext_adv_handle_t | adv_handle, |
wiced_bt_ble_periodic_adv_params_t * | p_adv_params | ||
) |
Function wiced_bt_ble_set_pawr_params.
This API is called on a central to set the PAWR parameters
[in] | adv_handle | Handle of the Advertising Set |
[out] | p_adv_params | Pointer to p_adv_params |
wiced_bt_dev_status_t wiced_bt_ble_set_pawr_subevent_ind_data | ( | wiced_bt_ble_ext_adv_handle_t | adv_handle, |
int | num_subevents, | ||
wiced_bt_ble_pawr_subevent_ind_data_t * | p_se_data | ||
) |
Function wiced_bt_ble_set_pawr_subevent_ind_data.
This API is called on a peripheral to set the subevent indication data
[in] | adv_handle | Handle of the Advertising Set |
[in] | num_subevents | Number of subevent data in the command |
[in] | p_se_data | Pointer to the subevent data |
wiced_bt_dev_status_t wiced_bt_ble_set_pawr_subevent_rsp_data | ( | uint16_t | sync_handle, |
wiced_bt_ble_pawr_subevent_rsp_data_t * | p_rsp_data | ||
) |
Function wiced_bt_ble_set_pawr_subevent_rsp_data.
This API is called on a peripheral to set the subevent response data
[in] | sync_handle | Handle of the synchronized advertising train |
[out] | p_rsp_data | Pointer to p_rsp_data |
wiced_bt_dev_status_t wiced_bt_ble_set_pawr_sync_subevents | ( | uint16_t | sync_handle, |
uint16_t | properties, | ||
int | num_subevents, | ||
uint8_t * | p_subevents | ||
) |
Function wiced_bt_ble_pawr_sync_subevents.
This API is called on a peripheral to set the PAWR sunevents that it wants to sync to.
[in] | sync_handle | Handle of the synchronized periodic ADV train |
[in] | properties | Properties of the synchronized periodic ADV train |
[in] | num_subevents | Number of subevents |
[in] | p_subevents | Pointer to an array of subevents |
wiced_bt_dev_status_t wiced_bt_ble_set_host_features | ( | wiced_bt_ble_feature_bit_t | feature, |
uint8_t | bit_value | ||
) |
Function wiced_bt_ble_set_host_features.
This API is called to set the supported host features
[in] | feature | bit position of required feature |
[in] | bit_value | Value to enable or disable Advertising Coding Selection Host Support feature bit |
uint32_t wiced_bt_ble_encrypt_adv_packet | ( | uint8_t * | p_key, |
uint8_t * | p_iv, | ||
uint8_t * | p_randomizer, | ||
const uint8_t * | p_plaintext, | ||
uint8_t * | p_encrypted, | ||
int | payload_len | ||
) |
Function wiced_bt_ble_encrypt_adv_packet.
This API is called to encrypt advertising data. Encrypts data at p_plaintext
of length payload_len
into p_encrypted
of length payload_len
[in] | p_key | session key |
[in] | p_iv | initialization vector |
[in] | p_randomizer | randomizer |
[in] | p_plaintext | plaintext to be encoded |
[in] | p_encrypted | encrypted output |
[in] | payload_len | plaintext/encrypted data len |
uint32_t wiced_bt_ble_decrypt_adv_packet | ( | uint8_t * | p_key, |
uint8_t * | p_iv, | ||
uint8_t * | p_randomizer, | ||
const uint8_t * | p_encrypted, | ||
uint8_t * | p_plaintext, | ||
int | coded_len | ||
) |
Function wiced_bt_ble_decrypt_adv_packet.
This API is called to decrypt advertising data. Decrypts data at p_encrypted
of length coded_len
into p_plaintext
of length coded_len
[in] | p_key | session key |
[in] | p_iv | initialization vector |
[in] | p_randomizer | randomizer |
[in] | p_encrypted | encrypted data input |
[in] | p_plaintext | plaintext output |
[in] | coded_len | encrypted data len |
wiced_bt_dev_status_t wiced_bt_ble_notify_on_device_address_change | ( | wiced_bool_t | enable | ) |
Function wiced_bt_ble_notify_on_device_address_change.
This API is called to notify the application on device address change
[in] | enable | enable change of address notification |
wiced_bt_dev_status_t wiced_bt_ble_set_data_packet_length | ( | wiced_bt_device_address_t | bd_addr, |
uint16_t | tx_pdu_length, | ||
uint16_t | tx_time | ||
) |
This API allows to set maximum transmission payload size and maximum packet transmission time to be used for LL DATA PDUs on a given connection.
[in] | bd_addr | - bd_Addr for which the LL Data PDU need to set |
[in] | tx_pdu_length | - maximum LL Data PDU on this connection. |
[in] | tx_time | - maximum number of microseconds taken to transmit a packet on this connection(Range 0x0148 to 0x4290). |
WICED_BT_SUCCESS : If command sent successfully
WICED_BT_ERROR : If there is no connection exists
WICED_BT_WRONG_MODE : If command not supported
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.
[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). |
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.
[in] | bd_addr | : Peer device bd address to pair with. |
WICED_BT_PENDING : if cancel initiated,
WICED_BT_SUCCESS : if cancel has completed already, else error code.
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.
[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 |
WICED_BT_SUCCESS : already encrypted
WICED_BT_PENDING : Status is notified using BTM_ENCRYPTION_STATUS_EVT of wiced_bt_management_cback_t.
WICED_BT_WRONG_MODE : connection not up.
WICED_BT_BUSY : security procedures are currently active
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)
[in] | res | : result of the operation WICED_BT_SUCCESS if success |
[in] | bd_addr | : Address of the peer device |
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).
[in] | bd_addr | : Address of the peer device |
[in] | type | : notification type |
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
[in] | bd_addr | : bd_addr of remote device to be removed from bonding list |
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.
[in] | bd_addr | : peer address |
[out] | p_sec_flags | : security flags (see wiced_bt_sec_flags_e) |