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.

怎样让协调器只接受router的入网请求?

Genius 3030 points

Other Parts Discussed in Thread: Z-STACK

我现在遇到的一个问题是这样的:一个网络有EndDevice100个,Router20个,同时上电,这样有时会出现coor下的节点都是EndDevice,导致Router不能入网,最后整个网络只有coor和21个EndDevice.

1、请问怎样才可以只允许Router连接到Coor?

2、有没有什么方法让EndDevic入网的时候只挑选Router作父节点?

  • 关于Zigbee 大规模组网,TI有一份专门的文档  http://www.ti.com/lit/an/swra427c/swra427c.pdf

    建议您开启并使用MTO route

    另外强烈不建议您同时给所有节点上电,建议随机上电

  • 你好,请问networkDesc_t这个结构体是作什么用的?

    typedef struct
    {
    uint16 panId;
    byte logicalChannel;
    byte routerCapacity;
    byte deviceCapacity;
    byte version;
    byte stackProfile;
    uint16 chosenRouter;
    uint8 chosenRouterLinkQuality;
    uint8 chosenRouterDepth;
    uint8 extendedPANID[Z_EXTADDR_LEN];
    byte updateId;
    void *nextDesc;
    } networkDesc_t;

    我在NLMEDE.h中和z-stack API中都没有找到解释。 特别是chosenRouter这个参数是什么意思,是路由地址?

  • 找到方法解决问题了,虽然有点不一样。

    在void ZDO_beaconNotifyIndCB( NLME_beaconInd_t *pBeacon )中按照以下方法修改就可以了

    //MSM:
    #if defined ( RTR_NWK )
    if ( (capacity) && (selected) ) //原代码
    #else //添加的代码,禁止EndDevice保存Coor作为父节点入网
    if ( (capacity) && (selected)&&( pBeacon->sourceAddr != 0x0000) )
    #endif
    //MSM

    {
    // this is the new chosen router for joining...
    pNwkDesc->chosenRouter = pBeacon->sourceAddr;
    pNwkDesc->chosenRouterLinkQuality = pBeacon->LQI;
    pNwkDesc->chosenRouterDepth = pBeacon->depth;
    }