static void connection_msg_remote_name_complete(const CL_DM_REMOTE_NAME_COMPLETE_T *cfm)
{
if (cfm->status == hci_success)
{
/* store the local friendly name of the device with this address */
ps_write_device_name(&cfm->bd_addr, cfm->size_remote_name, cfm->remote_name);
CL_MSG_DEBUG(("cfm->remote_name = %s\n",cfm->remote_name));
}
}
2. 编译完成以后,连接蓝牙音箱测试,这里只是查看debug输出
CL IO Capability Response Accept
CL_SM_REMOTE_IO_CAPABILITY_IND
CL_SM_AUTHENTICATE_CFM
Auth success
CL_DM_REMOTE_NAME_COMPLETE status = 0
cfm->remote_name = BT Speaker
CL MSG Unhandled[0x502f]
bdaddr [0x18:0x16:0x10001d]
STATE: new state [Connected]
CL_DM_ROLE_CFM role : 0
CL_DM_INQUIRE_RESULT
CL_DM_REMOTE_VERSION_CFM 0
LMP:0x9 LMPsub:0x3261 mfr:0xA
CL_SM_AUTHORISE_IND
bdaddr [0x18:0x16:0x10001d]