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.

设备状态上传协调器,数据返回为ZSuccess,但是使用抓包器抓不到数据,状态上报函数如下。

uint8 zclsamplesw_StatusReport(uint8 epoind, uint8 status)
{
uint8 cmd;
zclReportCmd_t *pReportCmd;
uint8 zclSampleSwOnOff_Status = status;
pReportCmd = osal_mem_alloc( sizeof(zclReportCmd_t) + sizeof(zclReport_t) );
if(pReportCmd!=NULL)
{ pReportCmd->numAttr =1;
pReportCmd->attrList[0].attrID=ATTRID_ON_OFF;
pReportCmd->attrList[0].dataType=ZCL_DATATYPE_BOOLEAN;
pReportCmd->attrList[0].attrData=(void *)(& zclSampleSwOnOff_Status);
cmd=zcl_SendReportCmd(epoind, &zclSampleSw_DstAddr, ZCL_CLUSTER_ID_GEN_ON_OFF, pReportCmd, ZCL_FRAME_SERVER_CLIENT_DIR, rue, zclSampleSwithSendStatusSeqNum++); IO4=zclSampleSwOnOff_Status; }
else { IO4=0; cmd = ZFailure; }
osal_mem_free(pReportCmd);
return cmd; }