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; }
gaoyang9992006:
先用例程测试一下能否抓到包,如果可以,就从代码里找原因。
haiyang lin:
你好,你调试成功没,我也是 同样问题