CC2541做主机,配对链接成功后,执行GATT_WriteCharValue写操作,OSALMsg信息提示ATT_ERROR_RSP,信息如下:
1,执行GATT_WriteCharValue操作
{
attWriteReq_t AttReq;
AttReq.handle = (SimpleBLEReadHdl+1)/*0x0036, notify configuration handle */;
AttReq.len = 2;
AttReq.sig = 0;
AttReq.cmd = 0;
AttReq.pValue = GATT_bm_alloc( simpleBLEConnHandle, ATT_WRITE_REQ, 2, NULL );
if (AttReq.pValue != NULL)
{
AttReq.pValue[0] = LO_UINT16(GATT_CLIENT_CFG_NOTIFY);
AttReq.pValue[1] = HI_UINT16(GATT_CLIENT_CFG_NOTIFY);
if (GATT_WriteCharValue( simpleBLEConnHandle, &AttReq, simpleBLETaskId ) != SUCCESS)
{
GATT_bm_free((gattMsg_t *)&AttReq, ATT_WRITE_REQ);
}
}
2, 系统信息OSALMSG 相应ATT_ERROR_RSP错误,打印错误信息如下:
sprintf((char *)pStrbug, ": %x %x %x\r\n", pMsg->msg.errorRsp.errCode,
pMsg->msg.errorRsp.handle,
pMsg->msg.errorRsp.reqOpcode);
--> : 3 31 12
3, errCod: 3 查资料是如下意思
#define INVALID_TASK 0x03
烦请各位大侠分析下原因,知道原因的告知下,多谢!