Functions | |
uint16_t | ble_sec_params_set (ble_sec_param_t *p_sec_param) |
Set security parameter. More... | |
uint16_t | ble_sec_params_set_with_role (ble_sec_param_t *p_sec_param, uint8_t role) |
Set security parameter for specific role. More... | |
uint16_t | ble_sec_enc_start (uint8_t conn_idx) |
Start security encryption, this interface is used by both slave and master. More... | |
uint16_t | ble_sec_enc_cfm (uint8_t conn_idx, const ble_sec_cfm_enc_t *p_cfm_enc) |
Send the encrypt confirm information. More... | |
uint16_t | ble_sec_get_pair_info (uint8_t *p_iden_addr, uint8_t iden_addr_type, uint8_t *p_irk, uint8_t *p_ltk) |
Get the pair info by peer identity address. More... | |
uint16_t | ble_sec_get_pair_info_by_conn_idx (uint8_t conn_idx, uint8_t *p_iden_addr, uint8_t *p_iden_addr_type, uint8_t *p_irk, uint8_t *p_ltk) |
Get the pair info by connection index. More... | |
bool | ble_sec_check_bonded (uint8_t conn_idx) |
Check bonded state by connection index. More... | |
bool | ble_sec_check_bonded_by_addr (ble_gap_bdaddr_t *p_peer_iden_addr) |
Check bonded state by peer address. More... | |
void | ble_sec_ccc_sc_oob_pair_init (oob_info_cb_t p_cb) |
Init oob info for ccc sc pair. More... | |
void ble_sec_ccc_sc_oob_pair_init | ( | oob_info_cb_t | p_cb | ) |
Init oob info for ccc sc pair.
[in] | p_cb | Pointer to the callback for oob info. |
bool ble_sec_check_bonded | ( | uint8_t | conn_idx | ) |
Check bonded state by connection index.
[in] | conn_idx | ACL connection index. |
::true | Connection is bonded. |
::false | Connection is not bonded. |
bool ble_sec_check_bonded_by_addr | ( | ble_gap_bdaddr_t * | p_peer_iden_addr | ) |
Check bonded state by peer address.
[in] | p_peer_iden_addr | Pointer to the peer identity address. |
::true | Peer address is bonded. |
::false | Peer address is not bonded. |
uint16_t ble_sec_enc_cfm | ( | uint8_t | conn_idx, |
const ble_sec_cfm_enc_t * | p_cfm_enc | ||
) |
Send the encrypt confirm information.
[in] | conn_idx | ACL connection index, the first ACL connection index is 0, and increased one by one. |
[in] | p_cfm_enc | Pointer to the confirm encryption structure, see ble_sec_cfm_enc_t. |
SDK_SUCCESS | The confirm encryption is successfully set to the BLE stack. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_NO_RESOURCES | Not enough resources. |
uint16_t ble_sec_enc_start | ( | uint8_t | conn_idx | ) |
Start security encryption, this interface is used by both slave and master.
[in] | conn_idx | ACL connection index, the first ACL connection index is 0, and increased one by one. |
SDK_SUCCESS | The security encryption is successfully set to the BLE stack. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
uint16_t ble_sec_get_pair_info | ( | uint8_t * | p_iden_addr, |
uint8_t | iden_addr_type, | ||
uint8_t * | p_irk, | ||
uint8_t * | p_ltk | ||
) |
Get the pair info by peer identity address.
[in] | p_iden_addr | Pointer to the identity address. |
[in] | iden_addr_type | Identity address type. |
[out] | p_irk | Pointer to the irk. |
[out] | p_ltk | Pointer to the ltk. |
SDK_SUCCESS | Success to find the pair info. |
SDK_ERR_LIST_ITEM_NOT_FOUND | Fail to get the pair info. |
uint16_t ble_sec_get_pair_info_by_conn_idx | ( | uint8_t | conn_idx, |
uint8_t * | p_iden_addr, | ||
uint8_t * | p_iden_addr_type, | ||
uint8_t * | p_irk, | ||
uint8_t * | p_ltk | ||
) |
Get the pair info by connection index.
[in] | conn_idx | Connection index. |
[out] | p_iden_addr | Pointer to the identity address. |
[out] | p_iden_addr_type | Pointer to the identity address type. |
[out] | p_irk | Pointer to the irk. |
[out] | p_ltk | Pointer to the ltk. |
SDK_SUCCESS | Success to find the pair info. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_CONN_IDX | Invalid connection index supplied. |
SDK_ERR_LIST_ITEM_NOT_FOUND | Item not found in the bond list. |
uint16_t ble_sec_params_set | ( | ble_sec_param_t * | p_sec_param | ) |
Set security parameter.
[in] | p_sec_param | Pointer to the security parameter structure, ble_sec_param_t. |
SDK_SUCCESS | The security parameter is successfully set to the BLE stack. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |
uint16_t ble_sec_params_set_with_role | ( | ble_sec_param_t * | p_sec_param, |
uint8_t | role | ||
) |
Set security parameter for specific role.
[in] | p_sec_param | Pointer to the security parameter structure, ble_sec_param_t. |
[in] | role | 0: master role, 1: slave role, ble_gap_ll_role_type_t. |
SDK_SUCCESS | The security parameter is successfully set to the BLE stack. |
SDK_ERR_POINTER_NULL | Invalid pointer supplied. |
SDK_ERR_INVALID_PARAM | Invalid parameter supplied. |