您好!
收集器/传感器节点示例代码中的默认设置似乎表明、我们应该将 FH_ASYNC_CHANNEL_MASK 中的所有通道都包括在内 、如下代码所示:
// subg/config.h
/*!
Channel mask used when CONFIG_FH_ENABLE is true.
Represents the list of channels on which the device can hop.
The actual sequence used shall be based on DH1CF function.
It is represented as a bit string with LSB representing Ch0.
e.g., 0x01 0x10 represents Ch0 and Ch12 are included.
*/
#define CONFIG_FH_CHANNEL_MASK { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
/*!
List of channels to target the Async frames
It is represented as a bit string with LSB representing Ch0
e.g., 0x01 0x10 represents Ch0 and Ch12 are included
It should cover all channels that could be used by a target device in its
hopping sequence. Channels marked beyond number of channels supported by
PHY Config will be excluded by stack. To avoid interference on a channel,
it should be removed from Async Mask and added to exclude channels
(CONFIG_CHANNEL_MASK).
*/
#define FH_ASYNC_CHANNEL_MASK { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \
0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
在测试过程中、我发现、如果我们按照 CONFIG_FH_CHANNEL_MASK 中的定义减少实际使用的通道数量、如下所示:
#define CONFIG_FH_CHANNEL_MASK { 0x55,0x55,0x55,0x55,0x55,0x55, \
0x55,0x55,0x55,0x55,0x55,0x55, \
0x55,0x00,0x00,0x00,0x00 }
传感器节点加入网络所需的时间将显著减少、大致与实际使用的通道数成正比。 理论上、如果我们对不同网络使用不同的信道、即使这些网络在附近共存也是如此。 它们不会相互干扰。 我们还可以避免来自其他系统的干扰。
我的问题是:如何为不同的网络动态设置不同的信道? 是否应该将所有通道都包含在 FH_ASYNC_CHANNEL_MASK 中、即使我们实际上没有将所有通道用于跳频?
请提供建议。
提前感谢。

