This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello. I am trying to capture some reporting times configurations to efficiently sample sensors and i seem to have troubles parsing these messages.
I have defined ZCL_REPORT, defined a function for ZCL_CMD_CONFIG_REPORT but cannot get a breakpoint to hit zclSampleTemperatureSensor_ProcessInConfigReportCmd and check my implementation of the function. However, the coordinator always issues a message that reporting was successfully configured even though i could not see the message.
static uint8_t zclSampleTemperatureSensor_ProcessIncomingMsg( zclIncoming_t *pInMsg) { uint8_t handled = FALSE; switch (pInMsg->hdr.commandID) { #ifdef ZCL_READ case ZCL_CMD_READ_RSP: zclSampleTemperatureSensor_ProcessInReadRspCmd(pInMsg); handled = TRUE; break; #endif #ifdef ZCL_WRITE case ZCL_CMD_WRITE_RSP: zclSampleTemperatureSensor_ProcessInWriteRspCmd(pInMsg); handled = TRUE; break; #endif #ifdef ZCL_REPORT // See ZCL Test Applicaiton (zcl_testapp.c) for sample code on Attribute Reporting case ZCL_CMD_CONFIG_REPORT: zclSampleTemperatureSensor_ProcessInConfigReportCmd( pInMsg ); break; case ZCL_CMD_READ_REPORT_CFG: //zclSampleTemperatureSensor_ProcessInReadReportCfgCmd( pInMsg ); break; case ZCL_CMD_CONFIG_REPORT_RSP: //zclSampleTemperatureSensor_ProcessInConfigReportRspCmd( pInMsg ); break; case ZCL_CMD_READ_REPORT_CFG_RSP: //zclSampleTemperatureSensor_ProcessInReadReportCfgRspCmd( pInMsg ); break; case ZCL_CMD_REPORT: //zclSampleTemperatureSensor_ProcessInReportCmd( pInMsg ); break; #endif case ZCL_CMD_DEFAULT_RSP: zclSampleTemperatureSensor_ProcessInDefaultRspCmd(pInMsg); handled = TRUE; break; #ifdef ZCL_DISCOVER case ZCL_CMD_DISCOVER_CMDS_RECEIVED_RSP: zclSampleTemperatureSensor_ProcessInDiscCmdsRspCmd(pInMsg); handled = TRUE; break; case ZCL_CMD_DISCOVER_CMDS_GEN_RSP: zclSampleTemperatureSensor_ProcessInDiscCmdsRspCmd(pInMsg); handled = TRUE; break; case ZCL_CMD_DISCOVER_ATTRS_RSP: zclSampleTemperatureSensor_ProcessInDiscAttrsRspCmd(pInMsg); handled = TRUE; break; case ZCL_CMD_DISCOVER_ATTRS_EXT_RSP: zclSampleTemperatureSensor_ProcessInDiscAttrsExtRspCmd(pInMsg); handled = TRUE; break; #endif default: break; } return handled; }
My function to parse reporting times and get the sampling time
static uint8_t zclSampleTemperatureSensor_ProcessInConfigReportCmd(zclIncoming_t* pInMsg ) { zclReportCmd_t *pReportCmd = pInMsg->attrCmd; uint16_t minReportingTime = 1000; for (int i = 0; i < pReportCmd->numAttr; i++) { if (minReportingTime > *(uint16_t*)pReportCmd->attrList[i].attrData) { minReportingTime = *(uint16_t*)pReportCmd->attrList[i].attrData; } } if (minReportingTime) { gMeasurementSleepMS = minReportingTime * 1000; } return (TRUE); }
Hi,
Thanks for reporting your issue.
First let me ask, have you already referred to this resource: https://dev.ti.com/tirex/explore/node?node=A__AcIxv2Qw7sXabthf.2DWZQ__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST
It contains a section on reporting that could help.
Thanks,
Toby