nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches
Bluetooth LE connection state functions

Functions

void ble_conn_state_init (void)
 Initialize or reset the module.
 
bool ble_conn_state_valid (uint16_t conn_handle)
 Check whether a connection handle represents a valid connection.
 
uint8_t ble_conn_state_role (uint16_t conn_handle)
 Get the role of the local device in a connection.
 
enum ble_conn_state_status ble_conn_state_status (uint16_t conn_handle)
 Get the status of a connection.
 
bool ble_conn_state_encrypted (uint16_t conn_handle)
 Check whether a connection is encrypted.
 
bool ble_conn_state_mitm_protected (uint16_t conn_handle)
 Check whether a connection encryption is protected from Man in the Middle (MITM) attacks.
 
bool ble_conn_state_lesc (uint16_t conn_handle)
 Check whether a connection was bonded using LE Secure Connections (LESC).
 
uint32_t ble_conn_state_conn_count (void)
 Get the total number of connections.
 
uint32_t ble_conn_state_central_conn_count (void)
 Get the total number of connections in which the role of the local device is BLE_GAP_ROLE_CENTRAL.
 
uint32_t ble_conn_state_peripheral_conn_count (void)
 Get the total number of connections in which the role of the local device is BLE_GAP_ROLE_PERIPH.
 
struct ble_conn_state_conn_handle_list ble_conn_state_conn_handles (void)
 Get a list of all connection handles for which the module has a record.
 
struct ble_conn_state_conn_handle_list ble_conn_state_central_handles (void)
 Get a list of connection handles in which the role of the local device is BLE_GAP_ROLE_CENTRAL.
 
struct ble_conn_state_conn_handle_list ble_conn_state_periph_handles (void)
 Get the handle for the connection in which the role of the local device is BLE_GAP_ROLE_PERIPH.
 
uint16_t ble_conn_state_conn_idx (uint16_t conn_handle)
 Translate a connection handle to a value that can be used as an array index.
 
int ble_conn_state_user_flag_acquire (void)
 Obtain exclusive access to one of the user flag collections.
 
bool ble_conn_state_user_flag_get (uint16_t conn_handle, uint16_t flag_index)
 Read the value of a user flag.
 
void ble_conn_state_user_flag_set (uint16_t conn_handle, uint16_t flag_index, bool value)
 Set the value of a user flag.
 
uint32_t ble_conn_state_for_each_connected (ble_conn_state_user_function_t user_function, void *ctx)
 Run a function for each active connection.
 
uint32_t ble_conn_state_for_each_set_user_flag (uint16_t flag_index, ble_conn_state_user_function_t user_function, void *ctx)
 Run a function for each connection that has a user flag set.
 

Detailed Description