MT_ZDO_BIND_REQ 不能成功的问题
A是协调器
B、C、D、E、F 是终端
使用Z-Tool通过串口连接协调器A发送MT_ZDO_BIND_REQ命令
希望终端B、C、D、E、F控制协调器A
实际只能头4个终端可以bind。
绑定表的大小可以通过f8wConfig.cfg中的【NWK_MAX_BINDING_ENTRIES和MAX_BINDING_CLUSTER_IDS】来进行配置
请问您这些参数是怎样配置的?
谢谢回复!
1、 单独 -DNWK_MAX_BINDING_ENTRIES=8
还是bind不上
2、单独 -DMAX_BINDING_CLUSTER_IDS=8
编译出错
Linking
Warning[w6]: Type conflict for external/entry "GetBindingTableEntry", in module APS against external/entry in module BindingTable; function return types are
different; class/struct/union types have different sizes
Warning[w6]: Type conflict for external/entry "bindFind", in module APS against external/entry in module BindingTable; function return types are different;
class/struct/union types have different sizes
Warning[w6]: Type conflict for external/entry "bindFindExisting", in module APS against external/entry in module BindingTable; function return types are different;
class/struct/union types have different sizes
Warning[w6]: Type conflict for external/entry "bindIsClusterIDinList", in module APS against external/entry in module BindingTable; function types differ in parameter
1; class/struct/union types have different sizes
Warning[w6]: Type conflict for external/entry "bindRemoveClusterIdFromList", in module APS against external/entry in module BindingTable; function types differ in
parameter 1; class/struct/union types have different sizes
Warning[w6]: Type conflict for external/entry "bindRemoveEntry", in module APS against external/entry in module BindingTable; function types differ in parameter 1;
class/struct/union types have different sizes
Warning[w6]: Type conflict for external/entry "pbindAddEntry", in module APS against external/entry in module BindingTable; function return types are different;
class/struct/union types have different sizes
仔细在第5个终端分析发现:
协调器执行ZDO_BIND_REQ之后
第5终端会执行
clusterID:0x0021
case Bind_req:
case Unbind_req:
{
ZDO_BindUnbindReq_t bindReq;
ZDO_ParseBindUnbindReq( inMsg, &bindReq );
ZDO_ProcessBindUnbindReq( inMsg, &bindReq );
}
之后就没有了。
----------------------------------
而之前4个终端正常bind的时候会执行
clusterID:0x0021
case Bind_req:
case Unbind_req:
{
ZDO_BindUnbindReq_t bindReq;
ZDO_ParseBindUnbindReq( inMsg, &bindReq );
ZDO_ProcessBindUnbindReq( inMsg, &bindReq );
}
之后还会执行
clusterID:0x8000
case NWK_addr_rsp:
case IEEE_addr_rsp:
{
。
。
。
。
if ( inMsg->clusterID == NWK_addr_rsp )
{
#if defined ( REFLECTOR )
ZDApp_ProcessPendingBindReq( pAddrRsp->extAddr );
#endif
}
#endif
osal_mem_free( pAddrRsp );
}
}
继续分析第5个终端不能正常bind的代码
执行到ZDO_ProcessBindUnbindReq( inMsg, &bindReq ); -->ZDP_NwkAddrReq( pReq->dstAddress.addr.extAddr, ZDP_ADDR_REQTYPE_SINGLE, 0, 0 );
应该是向协调器发送NWKADDr请求,协调器没有反馈。
为什么第5个终端没有像之前4个终端请求NWKADDr有反馈呢
附件中
终端作为第5个要bind失败的终端抓包
已经解决了,自己的程序写错了。谢谢 Susan Yang !
很高兴您能解决问题!