协调器a.节点b/c都预编译REFLECTOR,都开启了 #define ZDO_BIND_UNBIND_REQUEST
协调器a,向节点b发送ZDP_BindReq,节点b收到请求并进入到
#if defined ( REFLECTOR )
case Bind_req:
case Unbind_req:
{
ZDO_BindUnbindReq_t bindReq;
ZDO_ParseBindUnbindReq( inMsg, &bindReq );
ZDO_ProcessBindUnbindReq( inMsg, &bindReq );
}
break;
然后ZDO_ProcessBindUnbindReq( inMsg, &bindReq )里面
if ( APSME_BindRequest( pReq->srcEndpoint, pReq->clusterID,
&(pReq->dstAddress), pReq->dstEndpoint ) == ZSuccess )
{
uint16 nwkAddr;
// valid entry
bindStat = ZDP_SUCCESS;
// Notify to save info into NV
ZDApp_NVUpdate();
// Check for the destination address
if ( pReq->dstAddress.addrMode == Addr64Bit )
{
//osal_cpyExtAddr(RouterC,pReq->dstAddress.addr.extAddr);
if ( APSME_LookupNwkAddr( pReq->dstAddress.addr.extAddr, &nwkAddr ) == FALSE )
{
ZDP_NwkAddrReq( pReq->dstAddress.addr.extAddr, ZDP_ADDR_REQTYPE_SINGLE, 0, 0 );
}
}
}
第一次显示是进入到ZDP_NwkAddrReq命令,然后发送信息给节点c,节点c回一个rsp信号后返回到b。(这里是否已经确认绑定成功?)
节点b、c中的简单描述符
const cId_t SampleApp_ClusterList[SAMPLEAPP_MAX_CLUSTERS] =
{
SAMPLEAPP_PERIODIC_CLUSTERID,
SAMPLEAPP_FLASH_CLUSTERID
};
const SimpleDescriptionFormat_t SampleApp_SimpleDesc =
{
SAMPLEAPP_ENDPOINT, // int Endpoint;
SAMPLEAPP_PROFID, // uint16 AppProfId[2];
SAMPLEAPP_DEVICEID, // uint16 AppDeviceId[2];
SAMPLEAPP_DEVICE_VERSION, // int AppDevVer:4;
SAMPLEAPP_FLAGS, // int AppFlags:4;
SAMPLEAPP_MAX_CLUSTERS, // uint8 AppNumInClusters;
(cId_t *)SampleApp_ClusterList, // uint8 *pAppInClusterList;
SAMPLEAPP_MAX_CLUSTERS, // uint8 AppNumoutClusters;
(cId_t *)SampleApp_ClusterList // uint8 *pAppoutClusterList;
};
发送配置
SampleApp_Periodic_DstAddr.addrMode = (afAddrMode_t)AddrNotPresent;
SampleApp_Periodic_DstAddr.endPoint = SAMPLEAPP_ENDPOINT;
SampleApp_Periodic_DstAddr.addr.shortAddr= 0xfffe;
if ( AF_DataRequest( &SampleApp_Periodic_DstAddr, &SampleApp_epDesc,
SAMPLEAPP_COM_CLUSTERID,//自己定义一个
len,
num,
&SampleApp_TransID,
AF_DISCV_ROUTE,
AF_DEFAULT_RADIUS ) == afStatus_SUCCESS )
{
}
但是c还是收不到b发的信息,请问问题出自哪里?