Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Bond Management Service Client

This is the client for the Bond Management Service Service. More...

Detailed Description

This is the client for the Bond Management Service Service.

Data Structures

struct  st_ble_bmc_cp_t
 Bond Management Control Point value structure. More...
 
struct  st_ble_bmc_cp_attr_hdl_t
 Bond Management Control Point attribute handle value. More...
 
struct  st_ble_bmc_feat_t
 Bond Management Features value structure. More...
 
struct  st_ble_bmc_feat_attr_hdl_t
 Bond Management Features attribute handle value. More...
 
struct  st_ble_bmc_evt_data_t
 Bond Management Service client event data. More...
 

Macros

#define BLE_BMC_CP_UUID   (0x2AA4)
 
#define BLE_BMC_CP_LEN   (100)
 
#define BLE_BMC_FEAT_UUID   (0x2AA5)
 
#define BLE_BMC_FEAT_LEN   (3)
 
#define BLE_BMC_OP_CODE_NOT_SUPPORTED_ERROR   (BLE_ERR_GROUP_GATT | 0x80)
 Response if unsupported Op Code is received. More...
 
#define BLE_BMC_OPERATION_FAILED_ERROR   (BLE_ERR_GROUP_GATT | 0x81)
 Response if unable to complete a procedure for any reason. More...
 

Enumerations

enum  e_ble_bmc_cp_op_code_t {
  BLE_BMC_CP_OP_CODE_DELETE_BOND_OF_REQUESTING_DEVICE_LE_TRANSPORT_ONLY = 3,
  BLE_BMC_CP_OP_CODE_DELETE_ALL_BONDS_ON_SERVER_LE_TRANSPORT_ONLY = 6,
  BLE_BMC_CP_OP_CODE_DELETE_ALL_BUT_THE_ACTIVE_BOND_ON_SERVER_LE_TRANSPORT_ONLY = 9
}
 Bond Management Control Point Op Code enumeration. More...
 
enum  e_ble_bmc_char_idx_t {
  BLE_BMC_CP_IDX,
  BLE_BMC_FEAT_IDX
}
 Bond Management Service characteristic ID. More...
 
enum  e_ble_bmc_event_t {
  BLE_BMC_EVENT_CP_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_BMC_CP_IDX, BLE_SERVC_WRITE_RSP),
  BLE_BMC_EVENT_FEAT_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_BMC_FEAT_IDX, BLE_SERVC_READ_RSP)
}
 Bond Management Service client event type. More...
 

Functions

ble_status_t R_BLE_BMC_WriteCp (uint16_t conn_hdl, const st_ble_bmc_cp_t *p_value)
 Write Bond Management Control Point characteristic value to remote GATT database. More...
 
void R_BLE_BMC_GetCpAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_bmc_cp_attr_hdl_t *p_hdl)
 Get Bond Management Control Point attribute handles. More...
 
ble_status_t R_BLE_BMC_ReadFeat (uint16_t conn_hdl)
 Read Bond Management Features characteristic value from the remote GATT database. More...
 
void R_BLE_BMC_GetFeatAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_bmc_feat_attr_hdl_t *p_hdl)
 Get Bond Management Features attribute handles. More...
 
ble_status_t R_BLE_BMC_Init (ble_servc_app_cb_t cb)
 Initialize Bond Management Service client. More...
 
void R_BLE_BMC_ServDiscCb (uint16_t conn_hdl, uint8_t serv_idx, uint16_t type, void *p_param)
 Bond Management Service client discovery callback. More...
 
void R_BLE_BMC_GetServAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatt_hdl_range_t *p_hdl)
 Get Bond Management Service client attribute handle. More...
 

Macro Definition Documentation

◆ BLE_BMC_OP_CODE_NOT_SUPPORTED_ERROR

#define BLE_BMC_OP_CODE_NOT_SUPPORTED_ERROR   (BLE_ERR_GROUP_GATT | 0x80)

Response if unsupported Op Code is received.

◆ BLE_BMC_OPERATION_FAILED_ERROR

#define BLE_BMC_OPERATION_FAILED_ERROR   (BLE_ERR_GROUP_GATT | 0x81)

Response if unable to complete a procedure for any reason.

Enumeration Type Documentation

◆ e_ble_bmc_cp_op_code_t

Bond Management Control Point Op Code enumeration.

Enumerator
BLE_BMC_CP_OP_CODE_DELETE_BOND_OF_REQUESTING_DEVICE_LE_TRANSPORT_ONLY 

Delete bond of requesting device (LE transport only)

BLE_BMC_CP_OP_CODE_DELETE_ALL_BONDS_ON_SERVER_LE_TRANSPORT_ONLY 

Delete all bonds on server (LE transport only)

BLE_BMC_CP_OP_CODE_DELETE_ALL_BUT_THE_ACTIVE_BOND_ON_SERVER_LE_TRANSPORT_ONLY 

Delete all but the active bond on server (LE transport only)

◆ e_ble_bmc_char_idx_t

Bond Management Service characteristic ID.

◆ e_ble_bmc_event_t

Bond Management Service client event type.

Function Documentation

◆ R_BLE_BMC_WriteCp()

ble_status_t R_BLE_BMC_WriteCp ( uint16_t  conn_hdl,
const st_ble_bmc_cp_t p_value 
)

Write Bond Management Control Point characteristic value to remote GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueBond Management Control Point characteristic value to write.
Returns
ble_status_t

◆ R_BLE_BMC_GetCpAttrHdl()

void R_BLE_BMC_GetCpAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_bmc_cp_attr_hdl_t p_hdl 
)

Get Bond Management Control Point attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_BMC_ReadFeat()

ble_status_t R_BLE_BMC_ReadFeat ( uint16_t  conn_hdl)

Read Bond Management Features characteristic value from the remote GATT database.

Parameters
[in]conn_hdlConnection handle.
Returns
ble_status_t

◆ R_BLE_BMC_GetFeatAttrHdl()

void R_BLE_BMC_GetFeatAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_bmc_feat_attr_hdl_t p_hdl 
)

Get Bond Management Features attribute handles.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.
Returns
ble_status_t

◆ R_BLE_BMC_Init()

ble_status_t R_BLE_BMC_Init ( ble_servc_app_cb_t  cb)

Initialize Bond Management Service client.

Parameters
[in]cbClient callback.
Returns
ble_status_t

◆ R_BLE_BMC_ServDiscCb()

void R_BLE_BMC_ServDiscCb ( uint16_t  conn_hdl,
uint8_t  serv_idx,
uint16_t  type,
void *  p_param 
)

Bond Management Service client discovery callback.

Parameters
[in]conn_hdlConnection handle
[in]serv_idxService instance index.
[in]typeService discovery event type.
[in]p_paramService discovery event parameter.
Returns
ble_status_t

◆ R_BLE_BMC_GetServAttrHdl()

void R_BLE_BMC_GetServAttrHdl ( const st_ble_dev_addr_t p_addr,
st_ble_gatt_hdl_range_t p_hdl 
)

Get Bond Management Service client attribute handle.

Parameters
[in]p_addrBluetooth device address for the attribute handles.
[out]p_hdlThe pointer to store the retrieved attribute handles.