![]() |
Airoha M0 BLE API
1.0.5.4
|
Data Structures | |
struct | ble_sm_security_param_t |
Parameters for BLE_gap_sm_set_security_param function. More... | |
Enumerations | |
enum | ble_sm_keypress_type { bt_sm_passkey_started = 0, bt_sm_passkey_digit_entered, bt_sm_passkey_digit_erased, bt_sm_passkey_cleared, bt_sm_passkey_complete } |
Functions | |
bool | BLE_gap_sm_authenticate (uint16_t conn_handle, ble_sm_security_param_t *param) |
To start authentication procedure. More... | |
bool | BLE_gap_sm_set_security_param (uint16_t conn_handle, uint8_t status, ble_sm_security_param_t *param) |
To set security parameter for pairing information exchange. More... | |
bool | BLE_gap_sm_delete_paired_record (ble_addr_t *addr) |
To delete bonded device information in flash. More... | |
bool | BLE_gap_sm_is_device_bonded (ble_addr_t *addr, uint8_t *flashIdx) |
To check if device information exists in flash. More... | |
bool | BLE_gap_sm_get_last_paired_device (ble_addr_t *addr) |
To obtain last paired device information in flash. More... | |
bool | BLE_gap_sm_set_passkey_for_display (uint32_t passkey) |
To set passkey for display, security manager will use 000000 as default if passkey is not set. More... | |
bool | BLE_gap_sm_passkey_response (uint16_t conn_handle, uint32_t passkey) |
To send passkey input to security manager. More... | |
bool | BLE_gap_sm_send_keypress_notification_request (uint16_t conn_handle, ble_sm_keypress_type type) |
To send a key notification command. More... | |
bool | BLE_gap_sm_get_ltk (uint8_t *peerAddr, uint8_t *ltk) |
Get LTK in flash by peer address. More... | |
bool | BLE_gap_sm_get_peer_ltk (uint8_t *peerAddr, uint8_t *peerLtk) |
Get peer LTK in flash by peer address. More... | |
SM_OOB_DATA_FLAG | |
Out of band data flag used to assign ble_sm_security_param_t::oobData . | |
#define | SM_OOB_DATA_NOT_PRESENT 0x00 |
#define | SM_OOB_DATA_FROM_REMOTE 0x01 |
SM_BONDING_FLAG | |
Bonding flag used to assign ble_sm_security_param_t::authReq . | |
#define | SM_NO_BONDING 0x00 |
#define | SM_BONDING 0x01 |
SM_MITM_FLAG | |
Man in the middle protection flag used to assign ble_sm_security_param_t::authReq . | |
#define | SM_NO_MITM_PROTECTION 0x00 |
#define | SM_MITM_PROTECTION 0x04 |
SM_SC_FLAG | |
Secure connection flag used to assign ble_sm_security_param_t::authReq . | |
#define | SM_SC_DISABLE 0x00 |
#define | SM_SC_ENABLE 0x08 |
SM_KEYPRESS_FLAG | |
Keypress notifications flag used to assign ble_sm_security_param_t::authReq . | |
#define | SM_KEY_PRESS_NOTI_DISABLE 0x00 |
#define | SM_KEY_PRESS_NOTI_ENABLE 0x10 |
enum ble_sm_keypress_type |
bool BLE_gap_sm_authenticate | ( | uint16_t | conn_handle, |
ble_sm_security_param_t * | param | ||
) |
To start authentication procedure.
conn_handle | connection handle. |
param | security parameter format ble_sm_security_param_t. |
bool BLE_gap_sm_set_security_param | ( | uint16_t | conn_handle, |
uint8_t | status, | ||
ble_sm_security_param_t * | param | ||
) |
To set security parameter for pairing information exchange.
conn_handle | connection handle. |
status | security status. |
param | security parameter format ble_sm_security_param_t. |
bool BLE_gap_sm_delete_paired_record | ( | ble_addr_t * | addr | ) |
To delete bonded device information in flash.
addr | BD addr to be deleted or NULL for all record. |
bool BLE_gap_sm_is_device_bonded | ( | ble_addr_t * | addr, |
uint8_t * | flashIdx | ||
) |
To check if device information exists in flash.
addr | BD addr to be checked or NULL for any record. |
flashIdx | flash index. |
bool BLE_gap_sm_get_last_paired_device | ( | ble_addr_t * | addr | ) |
To obtain last paired device information in flash.
addr | BD addr of last paired device. |
bool BLE_gap_sm_set_passkey_for_display | ( | uint32_t | passkey | ) |
To set passkey for display, security manager will use 000000 as default if passkey is not set.
passkey | Passkey display value |
bool BLE_gap_sm_passkey_response | ( | uint16_t | conn_handle, |
uint32_t | passkey | ||
) |
To send passkey input to security manager.
conn_handle | connection handle. |
passkey | Passkey input value |
bool BLE_gap_sm_send_keypress_notification_request | ( | uint16_t | conn_handle, |
ble_sm_keypress_type | type | ||
) |
To send a key notification command.
conn_handle | connection handle. |
type | key type ble_sm_keypress_type. |
bool BLE_gap_sm_get_ltk | ( | uint8_t * | peerAddr, |
uint8_t * | ltk | ||
) |
Get LTK in flash by peer address.
peerAddr | peer address. |
ltk | 16-byte long term key. |
bool BLE_gap_sm_get_peer_ltk | ( | uint8_t * | peerAddr, |
uint8_t * | peerLtk | ||
) |
Get peer LTK in flash by peer address.
peerAddr | peer address. |
peerLtk | 16-byte peer long term key. |