Tool/software: Code Composer Studio
Hello.
I try to use multiply read GATT values.
project - multirole
stack - 1_40
function like this:
//read CRP device initial characteristics (CAR_CORNER, HW_VERS and BATT_STATUS) //@dev_index - device connection index bStatus_t USRFdev_GATT_ReadInit(uint8_t dev_index) { uint8 initHandles[4] = { LO_UINT16(discInfo[dev_index].charHdl[D_CAR_CORNER]), HI_UINT16(discInfo[dev_index].charHdl[D_CAR_CORNER]), LO_UINT16(discInfo[dev_index].charHdl[D_BAT_STAT]), HI_UINT16(discInfo[dev_index].charHdl[D_BAT_STAT]) }; attReadMultiReq_t req; req.pHandles = initHandles; req.numHandles = 2; bStatus_t status = GATT_ReadMultiCharValues(connHandleMap[dev_index].connHandle, &req, selfEntity); Display_print1(dispHandle, MR_ROW_STATUS10, 0, "Read multi char status - %d", status); return status; }
Responce handle like this:
else if ((pMsg->method == ATT_READ_MULTI_RSP) || ((pMsg->method == ATT_ERROR_RSP) && (pMsg->msg.errorRsp.reqOpcode == ATT_READ_MULTI_REQ))) { Display_print0(dispHandle, MR_ROW_STATUS10, 0, "Multi read resp. OK"); if (pMsg->method == ATT_ERROR_RSP) { Display_print2(dispHandle, MR_ROW_STATUS10, 0, "USRF dev. %d Multi Read Error %d", pMsg->connHandle, pMsg->msg.errorRsp.errCode); } else { // After a successful read, display the read value uint8 *pData = pMsg->msg.readMultiRsp.pValues; uint8_t dataLen = pMsg->msg.readMultiRsp.len; Display_print3(dispHandle, MR_ROW_STATUS10, 0, "Car corner - %d, len of vals - %d", pMsg->connHandle, *pData, dataLen); } }
But actually I get no responce.
Read multi char status in request function returns 0, which seems OK.
What's wrong and what I can do?
P.S.
Yes, app is running after that request with no crash.