BR/EDR Security Function

group br_edr_sec_api_functions

This module provided various Bluetooth BR/EDR security functionality such as authorisation, authentication and encryption.

note

General Security APIs are listed in Generic Security API section.

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)

PIN code reply (use in response to BTM_PIN_REQUEST_EVT in wiced_bt_management_cback_t)

note

BR/EDR Only

Parameters
  • bd_addr[in] : Address of the device for which PIN was requested

  • res[in] : result of the operation WICED_BT_SUCCESS if success

  • pin_len[in] : length in bytes of the PIN Code

  • p_pin[in] : pointer to array with the PIN Code

Returns

void

void wiced_bt_dev_pass_key_req_reply(wiced_result_t res, wiced_bt_device_address_t bd_addr, uint32_t passkey)

Provide the pairing passkey (in response to BTM_PASSKEY_REQUEST_EVT of wiced_bt_management_cback_t)

note

BR/EDR only

Parameters
  • res[in] : result of the operation WICED_BT_SUCCESS if success

  • bd_addr[in] : Address of the peer device

  • passkey[in] : numeric value in the range of 0 - 999999(0xF423F).

Returns

void

wiced_result_t wiced_bt_dev_read_local_oob_data(void)

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.

note

BR/EDR Only

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)

Provide the remote OOB extended data for Simple Pairing in response to BTM_REMOTE_OOB_DATA_REQUEST_EVT.

note

BR/EDR Only

Parameters
  • res[in] : response reply

  • bd_addr[in] : Address of the peer device

  • is_extended_oob_data[in] : TRUE if extended OOB data (set according to BTM_REMOTE_OOB_DATA_REQUEST_EVT request)

  • c_192[in] : simple pairing Hash C derived from the P-192 public key.

  • r_192[in] : simple pairing Randomizer R associated with the P-192 public key.

  • c_256[in] : simple pairing Hash C derived from the P-256 public key (if is_extended_oob_data=TRUE)

  • r_256[in] : simple pairing Randomizer R associated with the P-256 public key (if is_extended_oob_data=TRUE)

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)

Build the OOB data block to be used to send OOB extended data over OOB (non-Bluetooth) link.

note

BR/EDR Only

Parameters
  • p_data[out] : OOB data block location

  • max_len[in] : OOB data block size

  • is_extended_oob_data[in] : TRUE if extended OOB data (for Secure Connections)

  • c_192[in] : simple pairing Hash C derived from the P-192 public key.

  • r_192[in] : simple pairing Randomizer R associated with the P-192 public key.

  • c_256[in] : simple pairing Hash C derived from the P-256 public key (if is_extended_oob_data=TRUE)

  • r_256[in] : simple pairing Randomizer R associated with the P-256 public key (if is_extended_oob_data=TRUE)

Returns

Number of bytes put into OOB data block.

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)

This function is called to provide the OOB data for SMP in response to BTM_SMP_REMOTE_OOB_DATA_REQUEST_EVT.

note

BR/EDR Only

Parameters
  • bd_addr[in] - Address of the peer device

  • res[in] - result of the operation WICED_BT_SUCCESS if success

  • len[in] - oob data length

  • p_data[in] - oob data

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)

Create local BLE SC (secure connection) OOB data.

When operation is completed, local OOB data will be provided via BTM_SMP_SC_LOCAL_OOB_DATA_NOTIFICATION_EVT.

note

BR/EDR Only

Parameters
  • bd_addr[in] : intended remote address for the OOB data

  • bd_addr_type[in] : BLE_ADDR_PUBLIC or BLE_ADDR_PUBLIC

Returns

TRUE: creation of local SC OOB data set started.

void wiced_bt_smp_sc_oob_reply(wiced_bt_smp_sc_oob_data_t *p_oob_data)

Provide the SC OOB data for SMP in response to BTM_SMP_SC_REMOTE_OOB_DATA_REQUEST_EVT.

Parameters

p_oob_data[in] : oob data

uint8_t *wiced_bt_dev_read_oob_data(uint8_t *p_data, uint8_t eir_tag, uint8_t *p_len)

This function is called to parse the OOB data payload received over OOB (non-Bluetooth) link.

note

BR/EDR Only

Parameters
  • p_data[in] : oob data

  • eir_tag[in] : EIR Data type( version5.0, Volume 3, Part C Section 5.2.2.7 )

  • p_len[out] : the length of the data with the given EIR Data type

Returns

The beginning of the data with the given EIR Data type. NULL, if the tag is not found.

void wiced_bt_dev_lrac_disable_secure_connection(void)

Disable BT secure connection.

note

This utility is used for LRAC application to disable the BT secure connection only. If the interference issue is fixed, this utility may be removed This utility shall be called before the bt stack is initialized (by calling app_bt_init()).