用z-stack 3.0 sampleSwich 写了一个router 和 coord .让router 定时发给coord数据来测试通讯,router显示发送成功但coord并没有触发case ZCL_INCOMING_MSG:
用sniffer看到:
另: 首次烧写router ,sniffer显示如图1
router 复位后,sniffer显示变成下面这样了, coord也是一样没有触发case ZCL_INCOMING_MSG:
router 代码:
zclSampleSw_DstAddr.addrMode = (afAddrMode_t)Addr16Bit;
zclSampleSw_DstAddr.endPoint = SAMPLEAPP_ENDPOINT;
zclSampleSw_DstAddr.addr.shortAddr = 0x0000;
SampleApp_epDesc.endPoint = SAMPLEAPP_ENDPOINT;
SampleApp_epDesc.task_id = &zclSampleSw_TaskID;
SampleApp_epDesc.simpleDesc
= (SimpleDescriptionFormat_t *)&SampleApp_SimpleDesc;
SampleApp_epDesc.latencyReq = noLatencyReqs;
afRegister( &SampleApp_epDesc );
if ( AF_DataRequest( &zclSampleSw_DstAddr, &SampleApp_epDesc,
ZCL_CMD_DISCOVER_ATTRS_EXT,
10,
data,
&CoordApp_TaskID,
AF_ACK_REQUEST,
AF_DEFAULT_RADIUS ) == afStatus_SUCCESS )
{
P1_1 = ~P1_1;
}
else P1_1 = 1;
P1_1是高低电平交替的.