CC2530 节点数量

本人参考了:http://blog.sina.com.cn/s/blog_3fb7f7270102v8tg.html

CC2530作为协调器最大可以带的子节点数量主要由以下参数决定:

NWK_MAX_ROUTERS,NWK_MAX_DEVICES,和MAX_NODE_DEPTH

这些参数在nwk_globals.h里

MAX_DEPTH决定了网络的最大深度。协调器(Coordinator)位于深度0,MAX_DEPTH
参数限制了网络在物理上的长度,这个值默认是5,最大不能超过15。


MAX_CHILDREN决定了一个路由(Router)或者一个协调器节点可以处理的儿子节
点的最大个数。


 MAX_ROUTER 决定了一个路由(Router)或者一个协调器(Coordinator)节点可以
处理的具有路由功能的儿子节点的最大个数。这个参数是 MAX_CHILDREN的一个子
集,终端节点使用(MAX_CHILDREN – MAX_ROUTER)剩下的地址空间。


一般的应用几十上百个应该够了,如果对节点有高要求,TI有个文档论述了>400节点的方案,具体请参考这边:www.ti.com/lit/pdf/swra427

1) The maximum number of devices that can be supported by one router or coordinator (i.e. associated devices) is 32. This is because we use a 32-bit bitmask to keep track of assigned addresses. Therefore, the NWK_MAX_DEVICE_LIST should be set to 32 maximum.


2) The setting for MAX_CHILDREN MUST match the setting for NWK_MAX_DEVICE_LIST. e.g. see here that by default NWK_MAX_DEVICE_LIST is set to 20 by default and matches the value in this cskip array in nwk_globals.c:
byte CskipChldrn[MAX_NODE_DEPTH+1] = {20,20,20,20,20,0};


3) MAX_CHILDREN must always be greater than MAX_ROUTERS. Therefore, a setting of 1, and 1 is not valid.


4) An example Cskip array setting for the configuration MAX_CHILDREN = 2, MAX_ROUTERS = 1, and MAX_DEPTH = 15. This provides an total of 31 addressable nodes. If you think of the number of available addresses as a pyramid, this pyramid is REALLY, REALLY skinny. :) So then:


#elif ( STACK_PROFILE_ID == NETWORK_SPECIFIC )
    byte CskipRtrs[MAX_NODE_DEPTH+1] = {5,5,5,5,5,0};
    byte CskipChldrn[MAX_NODE_DEPTH+1] = {5,5,5,5,5,0};
#endif


becomes


#elif ( STACK_PROFILE_ID == NETWORK_SPECIFIC )
    byte CskipRtrs[MAX_NODE_DEPTH+1] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0};
    byte CskipChldrn[MAX_NODE_DEPTH+1] = {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0};
#endif


and then MAX_NODE_DEPTH should be set to 15. NWK_MAX_DEVICE_LIST should be set to 2.


5) Last but not least, DO NOT mix and match Cskip settings as it will mess up the tree addressing. Using a network specific configuration means that you greatly reduce the chance of interoperability with another network that has a different network configuration (such as Zigbee Home Automation).

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值