MT2523 API Reference  LinkIt SDK v4
Device Manager

This section provides APIs to get Bluetooth device information and handle the bonding procedures. More...

Overview

This section provides APIs to get Bluetooth device information and handle the bonding procedures.

How to use this module

Functions

void bt_device_manager_init (void)
 This function initializes the Bluetooth device manager. More...
 
uint32_t bt_device_manager_get_paired_number (void)
 This function gets the number of the paired devices. More...
 
void bt_device_manager_get_paired_list (bt_device_manager_paired_infomation_t *info, uint32_t *read_number)
 This function gets the paired device list. More...
 
bool bt_device_manager_is_paired (bt_bd_addr_ptr_t address)
 This function gets the status of a device. More...
 
bt_status_t bt_device_manager_delete_paired_device (bt_bd_addr_ptr_t address)
 This function unpairs an already paired device. More...
 
bt_status_t bt_device_manager_unpair_all (void)
 This function unpairs all paired devices. More...
 

Modules

 Define
 Define Bluetooth device manager service data types and values.
 
 Struct
 This section defines structures for the Bluetooth device manager service.
 

Function Documentation

bt_status_t bt_device_manager_delete_paired_device ( bt_bd_addr_ptr_t  address)

This function unpairs an already paired device.

If the specified device is unpaired, the return status is BT_STATUS_FAIL.

Parameters
[in]addressis the address of the already paired device.
Returns
BT_STATUS_SUCCESS, if the device is unpaired successfully. BT_STATUS_FAIL, if an error occurred.
void bt_device_manager_get_paired_list ( bt_device_manager_paired_infomation_t info,
uint32_t *  read_number 
)

This function gets the paired device list.

Parameters
[out]infois a list containing the information of paired devices.
[in,out]read_numberspecifies the length of the #info list when calling this function. Upon the return of this function call, the #read_number contains the actual number of paired devices in the #info list.
Returns
None.
uint32_t bt_device_manager_get_paired_number ( void  )

This function gets the number of the paired devices.

Returns
The number of the paired devices.
void bt_device_manager_init ( void  )

This function initializes the Bluetooth device manager.

It's recommended to call this function at the boot up.

Returns
None.
bool bt_device_manager_is_paired ( bt_bd_addr_ptr_t  address)

This function gets the status of a device.

Parameters
[in]addressis the address of the device.
Returns
true, if the device is paired. false, if the device is not paired.
bt_status_t bt_device_manager_unpair_all ( void  )

This function unpairs all paired devices.

Returns
BT_STATUS_SUCCESS, if the function executed successfully. BT_STATUS_FAIL, if an error occurred.