请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CC2745R10-Q1工具/软件:
您好、TI
*SDK 版本:9.11.00.18、示例: car_node
我目前正在调试连接监视器。 Connection_Conn EventHandler 收到 BLEAPPUTIL_LINK_RESIDEND_EVENT 后、尝试通过 CMS_GetConnData 检索连接数据失败、返回错误代码 0x05 (CM_INVALID_PARAMS)。
static void Connection_ConnEventHandler(uint32 event, BLEAppUtil_msgHdr_t *pMsgData)
{
#ifdef FII_CM
cmsConnDataParams_t cm_data;
uint16_t cm_data_size;
cmErrorCodes_e status;
#endif
if (pMsgData != NULL)
{
switch (event)
{
case BLEAPPUTIL_LINK_ESTABLISHED_EVENT:
{
gapEstLinkReqEvent_t *pGapEstMsg = (gapEstLinkReqEvent_t *)pMsgData;
// Add the connection to the connected device list
Connection_addConnInfo(pGapEstMsg->connectionHandle, pGapEstMsg->devAddr);
PHSCA_ESELOG_PRINTF("%s", "Conn status: Established\r\n");
#if defined(RANGING_CLIENT) && !defined(RANGING_CLIENT_EXTCTRL_APP)
// Call MTU exchange
AppGATT_exchangeMTU(pGapEstMsg->connectionHandle, MAX_PDU_SIZE);
#endif
BLEAppUtil_registerConnNotifHandler(pGapEstMsg->connectionHandle,GAP_CB_CONN_EVENT_ALL);
#ifdef FII_CM
status = CMS_InitConnDataParams(&cm_data);
if(status == CM_SUCCESS)
{
cm_data_size = CMS_GetConnDataSize();
status = CMS_GetConnData(pGapEstMsg->connectionHandle, &cm_data);
if(status == CM_SUCCESS)
{
PHSCA_ESELOG_PRINTF("CMS_GetConnData success! Data size[0x%4x]\r\n", cm_data_size);
}
else
{
PHSCA_ESELOG_PRINTF("CMS_GetConnData fail![0x%2x]\r\n", status);
}
}
else
{
PHSCA_ESELOG_PRINTF("%s\r\n", "CMS_InitConnDataParams fail!");
}
#endif
break;
}
}
Log: 
我的工作流程是否正确? 为什么失败了?
此致!
普雷斯顿