Other Parts Discussed in Thread: CC2530
如果设置ZIGBEEPRO NWK_MAX_ROUTERS和NWK_MAX_DEVICES 最大值可以设置多少
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.
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 呢?
谢谢!
协议栈默认的就是mesh网络啊,您现在一共有多少节点?