TI中文支持网
TI专业的中文技术问题搜集分享网站

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。

Susan Yang:

绑定表的大小可以通过f8wConfig.cfg中的【NWK_MAX_BINDING_ENTRIES和MAX_BINDING_CLUSTER_IDS】来进行配置

请问您这些参数是怎样配置的?

zixin fan:

回复 Susan Yang:

谢谢回复!

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

zixin fan:

回复 zixin fan:

仔细在第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 ); } }

zixin fan:

回复 zixin fan:

继续分析第5个终端不能正常bind的代码

执行到ZDO_ProcessBindUnbindReq( inMsg, &bindReq );  –>ZDP_NwkAddrReq( pReq->dstAddress.addr.extAddr, ZDP_ADDR_REQTYPE_SINGLE, 0, 0 );

应该是向协调器发送NWKADDr请求,协调器没有反馈。

为什么第5个终端没有像之前4个终端请求NWKADDr有反馈呢

zixin fan:

回复 Susan Yang:

附件中

终端作为第5个要bind失败的终端抓包

zixin fan:

回复 zixin fan:

已经解决了,自己的程序写错了。谢谢 Susan Yang !

Susan Yang:

回复 zixin fan:

很高兴您能解决问题!

user5301288:

回复 zixin fan:

请问你这个最后怎么解决的,我也遇到了和你一样的问题,有3个端点,其中一个绑定不成功,状态时table full.

YiKai Chen:

回复 user5301288:

把NWK_MAX_BINDING_ENTRIES加大試試

user5301288:

回复 YiKai Chen:

您好!

我把原先  NWK_MAX_BINDING_ENTRIES=4 改成 NWK_MAX_BINDING_ENTRIES=12,我开关的3个endpoint都绑定成功了。但是有时候会碰到状态同步不了,或是很慢。以前绑定2个还没有这样的情况。

赞(0)
未经允许不得转载:TI中文支持网 » MT_ZDO_BIND_REQ 不能成功的问题
分享到: 更多 (0)