AIROC™ BTSDK v4.7 - Documentation | ||||
This section talks about the various API's necessary to incorporate Bluetooth Security Functions to an application. More...
Functions | |
void | wiced_bt_dev_pin_code_reply (wiced_bt_device_address_t bd_addr, wiced_result_t res, uint8_t pin_len, uint8_t *p_pin) |
Function wiced_bt_dev_pin_code_reply. 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) |
Function wiced_bt_dev_sec_bond. More... | |
wiced_result_t | wiced_bt_dev_sec_bond_cancel (wiced_bt_device_address_t bd_addr) |
Function wiced_bt_dev_sec_bond_cancel. 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) |
Function wiced_bt_dev_set_encryption. More... | |
void | wiced_bt_dev_confirm_req_reply (wiced_result_t res, wiced_bt_device_address_t bd_addr) |
Function wiced_bt_dev_confirm_req_reply. More... | |
void | wiced_bt_dev_pass_key_req_reply (wiced_result_t res, wiced_bt_device_address_t bd_addr, uint32_t passkey) |
Function wiced_bt_dev_pass_key_req_reply. More... | |
void | wiced_bt_dev_send_key_press_notif (wiced_bt_device_address_t bd_addr, wiced_bt_dev_passkey_entry_type_t type) |
Function wiced_bt_dev_send_key_press_notif. More... | |
wiced_result_t | wiced_bt_dev_read_local_oob_data (void) |
Function wiced_bt_dev_read_local_oob_data. More... | |
void | wiced_bt_dev_remote_oob_data_reply (wiced_result_t res, wiced_bt_device_address_t bd_addr, wiced_bool_t is_extended_oob_data, BT_OCTET16 c_192, BT_OCTET16 r_192, BT_OCTET16 c_256, BT_OCTET16 r_256) |
Function wiced_bt_dev_remote_oob_data_reply. More... | |
uint16_t | wiced_bt_dev_build_oob_data (uint8_t *p_data, uint16_t max_len, wiced_bool_t is_extended_oob_data, BT_OCTET16 c_192, BT_OCTET16 r_192, BT_OCTET16 c_256, BT_OCTET16 r_256) |
Function wiced_bt_dev_build_oob_data. More... | |
void | wiced_bt_smp_oob_data_reply (wiced_bt_device_address_t bd_addr, wiced_result_t res, uint8_t len, uint8_t *p_data) |
Function wiced_bt_smp_oob_data_reply. More... | |
wiced_bool_t | wiced_bt_smp_create_local_sc_oob_data (wiced_bt_device_address_t bd_addr, wiced_bt_ble_address_type_t bd_addr_type) |
Function wiced_bt_smp_create_local_sc_oob_data. More... | |
void | wiced_bt_smp_sc_oob_reply (uint8_t *p_oob_data) |
Function wiced_bt_smp_sc_oob_reply. More... | |
This section talks about the various API's necessary to incorporate Bluetooth Security Functions to an application.
Please refer to the "Part H" of the Bluetooth specification for further details.
uint16_t wiced_bt_dev_build_oob_data | ( | uint8_t * | p_data, |
uint16_t | max_len, | ||
wiced_bool_t | is_extended_oob_data, | ||
BT_OCTET16 | c_192, | ||
BT_OCTET16 | r_192, | ||
BT_OCTET16 | c_256, | ||
BT_OCTET16 | r_256 | ||
) |
Function wiced_bt_dev_build_oob_data.
Build the OOB data block to be used to send OOB extended data over OOB (non-Bluetooth) link.
[out] | p_data | : OOB data block location |
[in] | max_len | : OOB data block size |
[in] | is_extended_oob_data | : TRUE if extended OOB data (for Secure Connections) |
[in] | c_192 | : simple pairing Hash C derived from the P-192 public key. |
[in] | r_192 | : simple pairing Randomizer R associated with the P-192 public key. |
[in] | c_256 | : simple pairing Hash C derived from the P-256 public key (if is_extended_oob_data=TRUE) |
[in] | r_256 | : simple pairing Randomizer R associated with the P-256 public key (if is_extended_oob_data=TRUE) |
void wiced_bt_dev_confirm_req_reply | ( | wiced_result_t | res, |
wiced_bt_device_address_t | bd_addr | ||
) |
Function wiced_bt_dev_confirm_req_reply.
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 |
Note BD_Address must be in Big Endian format
void wiced_bt_dev_pass_key_req_reply | ( | wiced_result_t | res, |
wiced_bt_device_address_t | bd_addr, | ||
uint32_t | passkey | ||
) |
Function wiced_bt_dev_pass_key_req_reply.
Provide the pairing passkey (in response to BTM_PASSKEY_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 |
[in] | passkey | : numeric value in the range of 0 - 999999(0xF423F). |
Note BD_Address must be in Big Endian format
void wiced_bt_dev_pin_code_reply | ( | wiced_bt_device_address_t | bd_addr, |
wiced_result_t | res, | ||
uint8_t | pin_len, | ||
uint8_t * | p_pin | ||
) |
Function wiced_bt_dev_pin_code_reply.
PIN code reply (use in response to BTM_PIN_REQUEST_EVT in wiced_bt_management_cback_t)
[in] | bd_addr | : Address of the device for which PIN was requested |
[in] | res | : result of the operation WICED_BT_SUCCESS if success |
[in] | pin_len | : length in bytes of the PIN Code |
[in] | p_pin | : pointer to array with the PIN Code |
Note BD_Address must be in Big Endian format
wiced_result_t wiced_bt_dev_read_local_oob_data | ( | void | ) |
Function wiced_bt_dev_read_local_oob_data.
Read the local OOB data from controller (for sending to peer device over oob message). When operation is completed, local OOB data will be provided via BTM_READ_LOCAL_OOB_DATA_COMPLETE_EVT.
void wiced_bt_dev_remote_oob_data_reply | ( | wiced_result_t | res, |
wiced_bt_device_address_t | bd_addr, | ||
wiced_bool_t | is_extended_oob_data, | ||
BT_OCTET16 | c_192, | ||
BT_OCTET16 | r_192, | ||
BT_OCTET16 | c_256, | ||
BT_OCTET16 | r_256 | ||
) |
Function wiced_bt_dev_remote_oob_data_reply.
Provide the remote OOB extended data for Simple Pairing in response to BTM_REMOTE_OOB_DATA_REQUEST_EVT
[in] | bd_addr | : Address of the peer device |
[in] | is_extended_oob_data | : TRUE if extended OOB data (set according to BTM_REMOTE_OOB_DATA_REQUEST_EVT request) |
[in] | c_192 | : simple pairing Hash C derived from the P-192 public key. |
[in] | r_192 | : simple pairing Randomizer R associated with the P-192 public key. |
[in] | c_256 | : simple pairing Hash C derived from the P-256 public key (if is_extended_oob_data=TRUE) |
[in] | r_256 | : simple pairing Randomizer R associated with the P-256 public key (if is_extended_oob_data=TRUE) |
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 | ||
) |
Function wiced_bt_dev_sec_bond.
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
Note BD_Address must be in Big Endian format
wiced_result_t wiced_bt_dev_sec_bond_cancel | ( | wiced_bt_device_address_t | bd_addr | ) |
Function wiced_bt_dev_sec_bond_cancel.
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.
Note BD_Address must be in Big Endian format
void wiced_bt_dev_send_key_press_notif | ( | wiced_bt_device_address_t | bd_addr, |
wiced_bt_dev_passkey_entry_type_t | type | ||
) |
Function wiced_bt_dev_send_key_press_notif.
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 |
Note BD_Address must be in Big Endian format
wiced_result_t wiced_bt_dev_set_encryption | ( | wiced_bt_device_address_t | bd_addr, |
wiced_bt_transport_t | transport, | ||
void * | p_ref_data | ||
) |
Function wiced_bt_dev_set_encryption.
Encrypt the specified connection. Status is notified using BTM_ENCRYPTION_STATUS_EVT of wiced_bt_management_cback_t.
[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 : command will be returned in the callback WICED_BT_WRONG_MODE : connection not up. WICED_BT_BUSY : security procedures are currently active
Note BD_Address must be in Big Endian format
wiced_bool_t wiced_bt_smp_create_local_sc_oob_data | ( | wiced_bt_device_address_t | bd_addr, |
wiced_bt_ble_address_type_t | bd_addr_type | ||
) |
Function wiced_bt_smp_create_local_sc_oob_data.
Create local LE SC (secure connection) OOB data. When operation is completed, local OOB data will be provided via BTM_SMP_SC_LOCAL_OOB_DATA_NOTIFICATION_EVT.
[in] | bd_addr | : intended remote address for the OOB data |
[in] | bd_addr_type | : BLE_ADDR_PUBLIC or BLE_ADDR_PUBLIC |
void wiced_bt_smp_oob_data_reply | ( | wiced_bt_device_address_t | bd_addr, |
wiced_result_t | res, | ||
uint8_t | len, | ||
uint8_t * | p_data | ||
) |
Function wiced_bt_smp_oob_data_reply.
This function is called to provide the OOB data for SMP in response to BTM_SMP_REMOTE_OOB_DATA_REQUEST_EVT
[in] | bd_addr | - Address of the peer device |
[in] | res | - result of the operation WICED_BT_SUCCESS if success |
[in] | len | - oob data length |
[in] | p_data | - oob data |
void wiced_bt_smp_sc_oob_reply | ( | uint8_t * | p_oob_data | ) |
Function wiced_bt_smp_sc_oob_reply.
Description Provide the SC OOB data for SMP in response to BTM_SMP_SC_REMOTE_OOB_DATA_REQUEST_EVT
[in] | p_oob_data | : oob data |