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.

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失败的终端抓包

    bindFail.psd
  • 已经解决了,自己的程序写错了。谢谢 

  • 很高兴您能解决问题!

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

  • 把NWK_MAX_BINDING_ENTRIES加大試試
  • 您好!

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

  • 抓包看看問題