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.

终端发送AF_DataRequest,协调器无法收到

  描述:终端通过zcl_SendReportCmd发送cmd,协调器可以正常收到,但是通过AF_DataRequest发送自身设备类型以及端地址数据就无法收到

   1.终端发送例子

     

zclZHAtest_epDesc1.endPoint = 1;
zclZHAtest_epDesc1.task_id = &zclGenericApp_TaskID;
zclZHAtest_epDesc1.simpleDesc
= (SimpleDescriptionFormat_t *)&zclZHAtest_SimpleDesc1;
zclZHAtest_epDesc1.latencyReq = noLatencyReqs;
zclHA_Init(&zclZHAtest_SimpleDesc1);
afRegister( &zclZHAtest_epDesc1 );

uint8 code;
uint16 nwkAddr;
uint16 parentNwkAddr;
char buff[12] = {0};
afAddrType_t SerialApp_TxAddr;

nwkAddr = NLME_GetShortAddr();

SerialApp_TxAddr.addrMode = (afAddrMode_t)Addr16Bit;
SerialApp_TxAddr.endPoint = GENERICAPP_ENDPOINT;
SerialApp_TxAddr.addr.shortAddr = 0x0;

buff[0] = devicetype;
buff[1] = HI_UINT16( nwkAddr );
buff[2] = LO_UINT16( nwkAddr );
// osal_memcpy(&buff[3], NLME_GetExtAddr(), 8);

if ( (code=AF_DataRequest( &SerialApp_TxAddr, &zclZHAtest_epDesc1,
ZCL_CLUSTER_ID_SS_IAS_ZONE,
3,
buff,
&SampleApp_TransID,
AF_DISCV_ROUTE,
AF_DEFAULT_RADIUS )) == afStatus_SUCCESS )
{
}

2.协调器接收处理

         zclHA_Init( &zha_project_SimpleDesc );   

static void zclGenericApp_ProcessIncomingMsg( zclIncomingMsg_t *pInMsg )
{
SendDatatoComputer("ProcessIncomingMsg\r\n");

       3.协调器和终端都有定义ZCL_CLUSTER_ID_SS_IAS_ZONE

            AF_DataRequest_capture.psd