MT2523 API Reference  LinkIt SDK v4
BLE Device Manager

This section provides API to manage the bonded peers and API to get and set security and connection between the bonded peers in LE. More...

Overview

This section provides API to manage the bonded peers and API to get and set security and connection between the bonded peers in LE.

The bonded peer management includes the bookkeeping of contextual information, such as the security keys and any application specific information.

Terms and Acronyms

Terms Details
GAP Generic Access Profile. This profile defines the generic procedures related to discovery of Bluetooth enabled devices and link management aspects of connecting to the Bluetooth enabled devices. It also defines procedures related to the use of different security levels.

How to use this module

Functions

void bt_device_manager_le_init (void)
 This function initializes the LE Device Manager service. More...
 
void bt_device_manager_le_remove_bonded_device (bt_addr_t *peer_addr)
 This function removes the bonded device information specified by the peer_addr from this device. More...
 
void bt_device_manager_le_clear_all_bonded_info (void)
 This function clears all bonded information stored in this device. More...
 
bt_device_manager_le_connection_param_tbt_device_manager_le_get_current_connection_param (bt_handle_t connection_handle)
 This function gets the connection parameter of the current link specified by the connection handle. More...
 
bt_status_t bt_device_manager_le_gap_set_local_configuration (bt_gap_le_local_key_t *local_key, bool sc_only_mode)
 This function sets the local configuration of this device. More...
 
bt_status_t bt_device_manager_le_gap_set_pairing_configuration (bt_gap_le_smp_pairing_config_t *pairing_config)
 This function sets the preferred pairing configuration of this device. More...
 
void bt_device_manager_le_get_bonded_list (bt_bd_addr_t *list, uint32_t *count)
 This function gets the list of bonded LE devices. More...
 
bool bt_device_manager_le_is_bonded (bt_addr_t *address)
 This function gets the bonded status of the LE device specified by the address. More...
 
uint8_t bt_device_manager_le_get_bonded_number (void)
 This function gets the count of the bonded LE devices. More...
 
bt_bd_addr_ptr_t bt_device_manager_le_get_public_address (void)
 This function gets the public address of the device. More...
 

Modules

 Struct
 This section defines structures for the LE Device Manager.
 

Function Documentation

void bt_device_manager_le_clear_all_bonded_info ( void  )

This function clears all bonded information stored in this device.

Parameters
[in]void.
Returns
void.
bt_status_t bt_device_manager_le_gap_set_local_configuration ( bt_gap_le_local_key_t local_key,
bool  sc_only_mode 
)

This function sets the local configuration of this device.

Parameters
[in]local_keyis a pointer to the bt_gap_le_local_config_req_ind_t structure.
[in]sc_only_modeis a flag to enable or disable the secure connection pairing mode.
Returns
BT_STATUS_SUCCESS, the local configuration is successfully set. BT_STATUS_FAIL, the local configuration failed to set. Please call bt_device_manager_le_init() first.
bt_status_t bt_device_manager_le_gap_set_pairing_configuration ( bt_gap_le_smp_pairing_config_t pairing_config)

This function sets the preferred pairing configuration of this device.

Parameters
[in]pairing_configis a pointer to the bt_gap_le_smp_pairing_config_t structure.
Returns
BT_STATUS_SUCCESS, the pairing configuration is successfully set. BT_STATUS_FAIL, the pairing configuration failed to set. Please call bt_device_manager_le_init() first.
void bt_device_manager_le_get_bonded_list ( bt_bd_addr_t list,
uint32_t *  count 
)

This function gets the list of bonded LE devices.

Parameters
[out]listis the list of bonded LE devices.
[in,out]countis the input and output parameter. As an input parameter, it is the length of the list and the maximum number of bonded LE devices that the list can hold. As an output parameter, it is the actual number of the bonded LE devices stored in the list upon the return of this function, which cannot exceed the length of the list.
Returns
void.
uint8_t bt_device_manager_le_get_bonded_number ( void  )

This function gets the count of the bonded LE devices.

Returns
The count of the bonded LE devices.
bt_device_manager_le_connection_param_t* bt_device_manager_le_get_current_connection_param ( bt_handle_t  connection_handle)

This function gets the connection parameter of the current link specified by the connection handle.

Parameters
[in]connection_handleis the connection handle.
Returns
connection_param_t is a pointer to the current connection parameter.
bt_bd_addr_ptr_t bt_device_manager_le_get_public_address ( void  )

This function gets the public address of the device.

Returns
The public address of the device.
void bt_device_manager_le_init ( void  )

This function initializes the LE Device Manager service.

It is recommended to call this API once during the bootup.

Parameters
[in]void.
Returns
void.
bool bt_device_manager_le_is_bonded ( bt_addr_t address)

This function gets the bonded status of the LE device specified by the address.

Parameters
[in]addressis the address of the LE device to check.
Returns
True, bonded. False, unbonded.
void bt_device_manager_le_remove_bonded_device ( bt_addr_t peer_addr)

This function removes the bonded device information specified by the peer_addr from this device.

Parameters
[in]peer_addris the address of the bonded device.
Returns
void.