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.

如果设置ZIGBEEPRO NWK_MAX_ROUTERS和NWK_MAX_DEVICES 最大值可以设置多少

Other Parts Discussed in Thread: CC2530

如果设置ZIGBEEPRO NWK_MAX_ROUTERS和NWK_MAX_DEVICES 最大值可以设置多少

  • 新协议栈已经去掉了NWK_MAX_ROUTERS的要求,只与NWK_MAX_DEVICE有关

    // Don't change this value to set the number of devices. Change
    // NWK_MAX_DEVICE_LIST above
    #define NWK_MAX_DEVICES ( NWK_MAX_DEVICE_LIST + 1 ) // One extra space for parent

    您需要修改NWK_MAX_DEVICE_LIST


  • Hi Susan

             协议栈中默认 是20 ,  那是不是意味着,  无论是路由或者协调器  的子设备 最多只能是21 个 ?????

    // Maximum number in tables
    #if !defined( NWK_MAX_DEVICE_LIST )
      #define NWK_MAX_DEVICE_LIST     20  // Maximum number of devices in the
                                        // Assoc/Device list.
    #endif

    // Don't change this value to set the number of devices.  Change
    //  NWK_MAX_DEVICE_LIST above
    #define NWK_MAX_DEVICES   ( NWK_MAX_DEVICE_LIST + 1 )    // One extra space for parent

             另外, 默认为20 的话,  路由设备 发送parent announce  时,

            

    afStatus_t ZDP_ParentAnnce( uint8 *TransSeq,
                                zAddrType_t *dstAddr,
                                uint8 numberOfChildren,
                                uint8 *childInfo,
                                cId_t clusterID,
                                uint8 SecurityEnable )
    {
      uint8 *pBuf = ZDP_TmpBuf;
      ZDO_ChildInfo_t *pChildInfo;
      uint8 i, len;
    
      (void)SecurityEnable;  // Intentionally unreferenced parameter
    
      // NumberOfChildren + ( numberOfChildren * ChildInfo).
      len = 1 + ( numberOfChildren * sizeof(ZDO_ChildInfo_t) );
    
      if ( len >= ZDP_BUF_SZ-1 )
      {
        return afStatus_MEM_FAIL;
      }

          又限制了 ZDP_BUF_SZ 为80, 这样的话  如果路由设备 的子节点多与  6个 ,   那么路由设备 就不会 发送parent announce。。。

          请问 解决这个问题 到底  是降低  NWK_MAX_DEVICE_LIST 呢 还是  提高 ZDP_BUF_SZ  呢?

       

    谢谢!

           

  • 因为CC2530的RAM有限,不能连接太多的子节点。请问您现在是想要怎样的网络拓扑呢?

  • 宏定义ZIGBEEPRO  采用的MESH拓扑

  • 树形。

    目前遇到一个情况就是,  协调器 有时不知道 终端节点 切换了 路由,导致协调器发送给终端节点的 消息 发到了旧的路由上面。

    其中一个原因就是, 路由在重新上电时 没有发送 parent announce! 

    那如果按照你的说法,  唯一的做法就是  减少路由 设备的 带载能力 是吗? 

    路由最多带 6 个设备,  len =  6*12=72  < ZDP_BUF_SZ  

    是这样吗?

    谢谢!

  • 协议栈本身默认不就是 MESH 吗?

  • 协议栈默认的就是mesh网络啊,您现在一共有多少节点?

  • 我认为 上面这个问题 和 多少个节点  是没有关系的

    我目前试验 就10个节点, 10个节点 入网的时候 都 自动加到了路由下面  再连到 协调器。。

    此时 路由断电重启 的时候  是不会 发 parent announce 的!!!