如何在 XBee PRO 系列 2 上设置频道?

发布于 2024-10-25 03:37:41 字数 649 浏览 2 评论 0原文

我有 3 个 XBees。 2x PRO 和一个标准,所有系列 2。 我已将一个 PRO 和一个标准配置为通道 0 和 PAN 234 上的路由器/端点(这是选择“XBP24-B”/“XB24-B”“ZNET2.5 ROUTER/END”时的默认通道和 PAN ID) DEVICE AT”配置文件(两者的版本都是 1247)。

但是,我使用“ZNET 2.5 COORDINATOR AT”配置文件设置的一个 PRO 具有 E 通道(尽管如果我继续使用相同的配置文件刷新设备,则此值会从 12 更改) -F)。

显然,如果协调器没有相同的通道,则任何操作都不起作用,但我看不到任何手动设置通道的方法..?

X-CTU 中的 CH 设置是只读的,我可以查看任何其他 UI 元素来更改频道:readonly CH 设置!啊!

我什至已经进入终端并键入(括号中的单词是终端返回的内容):

+++(OK) 附加 (E) ATCH0(错误) ATCH 0(错误) ATCH00(错误) ATCH 00(错误) 注意 E(错误) ATCHE(错误)

我用谷歌搜索了又谷歌没有结果。非常令人沮丧,有人可以帮忙吗?! 我之前让它们工作只是侥幸,因为我不断刷新硬件直到通道号匹配,但这显然是荒谬的!

I've got three XBees. 2x PROs and a standard, all series 2s.
I've configured one PRO and one standard to be router/endpoints on channel 0 and PAN 234 (this is the default channel and PAN ID when selecting the "XBP24-B"/"XB24-B" "ZNET2.5 ROUTER/END DEVICE AT" profile (version 1247 for both).

However the one PRO I've set with the "ZNET 2.5 COORDINATOR AT" profile has a channel of E (though if I keep flashing the device with the same profile, this changes from 12-F).

Obviously if the coordinator doesn't have the same channel, nothing will work, but I can't see any way of setting the channel manually..?

The CH setting in X-CTU is read only, and I can see any other UI element to change the channel:readonly CH setting! AHH!

I've even been into the terminal and typed (words in brackets are what the terminal returns):

+++ (OK)
ATCH (E)
ATCH0 (ERROR)
ATCH 0 (ERROR)
ATCH00 (ERROR)
ATCH 00 (ERROR)
ATCH E (ERROR)
ATCHE (ERROR)

I've Googled and Googled to no avail. incredibly frustrating, can anyone help?!
I've had them working previous as a matter of fluke as I kept flashing the hardware until the channel numbers match up, but this is obviously ridiculous!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

春风十里 2024-11-01 03:37:41

XBee ZB(S2、S2B、S2C)系列模块的通道选择工作方式与 XBee 802.15.4 (S1) 模块不同。 ZB 的信道选择是自动的(与 802.15.4 模块的手动选择相反)。

通常,您永远不需要使用 ZB 操作通道选择参数。如果可以的话,模块会相互查找并相互关联。

如果您的模块似乎无法找到彼此,通常会归结为协调器 (NJ) 上的 PAN 设置 (ID)、安全设置 (LK) 或网络加入权限设置不匹配。

除了 Digi 的 XBee ZB OEM 手册之外,网络上没有太多信息。作为参考,使用 ZB 进行通道选择的工作方式如下:

  1. XBee ZB 协调器通电
  2. XBee ZB 协调器读取其 SC 参数并构建要扫描的候选通道列表
  3. XBee ZB 协调器然后对每个候选通道执行能量扫描
  4. XBee然后,ZB 协调器选择能量最少的信道。

此过程旨在选择噪声最少的信道,无论是微波炉、WiFi 网络还是任何其他可能在 2.4GHz 频率上传输的东西乐队。

任何加入网络的路由器或终端设备都会首先咨询其 SC 参数,然后它们将尝试搜索可以加入的与其 PAN 和安全参数相匹配的网络。他们将加入并保持加入他们能加入的第一个网络,但有一些小的例外(例如,请参阅 JV 和 NW 参数)。

如果要强制选择通道,则必须设置 SC 参数以仅启用单个通道。 SC 参数是一个位掩码1。掩码中设置的每一位将启用一个额外的通道。该参数的棘手之处在于第一位(位 0)不是通道 0,而是通道 11 (0x0B)。为了便于使用,如果您想将 XBee ZB 锁定到单个通道,则此处的值如下:

+---------------+---------------+------------------+-------------------------+
| Channel (Dec) | Channel (Hex) | XBee ZB SC Value |    XBee Availability    |
+---------------+---------------+------------------+-------------------------+
|            11 | 0xB           | 0x1              | All                     |
|            12 | 0xC           | 0x2              | All                     |
|            13 | 0xD           | 0x4              | All                     |
|            14 | 0xE           | 0x8              | All                     |
|            15 | 0xF           | 0x10             | All                     |
|            16 | 0x10          | 0x20             | All                     |
|            17 | 0x11          | 0x40             | All                     |
|            18 | 0x12          | 0x80             | All                     |
|            19 | 0x13          | 0x100            | All                     |
|            20 | 0x14          | 0x200            | All                     |
|            21 | 0x15          | 0x400            | All                     |
|            22 | 0x16          | 0x800            | All                     |
|            23 | 0x17          | 0x1000           | All                     |
|            24 | 0x18          | 0x2000           | All                     |
|            25 | 0x19          | 0x4000           | S1, S2B, S2C (not S2)   |
|            26 | 0x1A          | 0x8000           | S1 only                 |
+---------------+---------------+------------------+-------------------------+

Channel selection with the XBee ZB (S2, S2B, S2C) series of modules works differently than with the XBee 802.15.4 (S1) modules. Channel selection is automatic with ZB (as opposed to it being manual with the 802.15.4 modules).

You normally never need to manipulate the channel selection parameters with ZB. Modules find each other and associate with each other if they can.

If your modules just can't seem to find each other it usually comes down to a mismatch in the PAN settings (ID), security settings (LK), or network joining permission settings on the coordinator (NJ).

Not a lot of information exists on the web outside of the Digi's XBee ZB OEM manual. For reference sake, channel selection with ZB works like this:

  1. XBee ZB Coordinator is powered up
  2. The XBee ZB Coordinator reads its SC parameter and builds a list of candidate channels to scan
  3. The XBee ZB Coordinator then performs an energy scan on each candidate channel
  4. The XBee ZB Coordinator then chooses the channel with the least amount of energy on it

This procedure aims to pick a channel with the least amount of noise on it be it from microwave ovens, WiFi networks, or anything else that might be transmitting on the 2.4GHz frequency band.

Any router or end devices joining a network with consult their SC parameters first, then they will try and search for networks they can join which match their PAN and security parameters. They will join and stay joined to the first network they can--with some minor exceptions (see the JV and NW parameters, for example).

If you want to force a channel selection you must set the SC parameter to enable only a single channel. The SC parameter is a bitmask1. Each bit set in the mask will enable one additional channel. What's tricky about this parameter is that the first bit (bit 0) is not channel 0, it's channel 11 (0x0B). For ease of use, if you wanted to lock an XBee ZB to a single channel here would be the values:

+---------------+---------------+------------------+-------------------------+
| Channel (Dec) | Channel (Hex) | XBee ZB SC Value |    XBee Availability    |
+---------------+---------------+------------------+-------------------------+
|            11 | 0xB           | 0x1              | All                     |
|            12 | 0xC           | 0x2              | All                     |
|            13 | 0xD           | 0x4              | All                     |
|            14 | 0xE           | 0x8              | All                     |
|            15 | 0xF           | 0x10             | All                     |
|            16 | 0x10          | 0x20             | All                     |
|            17 | 0x11          | 0x40             | All                     |
|            18 | 0x12          | 0x80             | All                     |
|            19 | 0x13          | 0x100            | All                     |
|            20 | 0x14          | 0x200            | All                     |
|            21 | 0x15          | 0x400            | All                     |
|            22 | 0x16          | 0x800            | All                     |
|            23 | 0x17          | 0x1000           | All                     |
|            24 | 0x18          | 0x2000           | All                     |
|            25 | 0x19          | 0x4000           | S1, S2B, S2C (not S2)   |
|            26 | 0x1A          | 0x8000           | S1 only                 |
+---------------+---------------+------------------+-------------------------+
甜心小果奶 2024-11-01 03:37:41

显然,如果协调员不这样做
有相同的频道,什么都不会
工作,但我看不到任何方法
手动设置频道..?

我不确定你上面说的是否正确。来自http://ftp1.digi.com/support/documentation/90000976_C.pdf(不过,您应该查看适合您的硬件的正确版本),看起来协调器的目的是自动确定通道:

协调器操作

形成网络

协调员负责
选择通道、PAN ID(16 位
和 64 位)、安全策略,以及
网络的堆栈配置文件。自从一个
协调器是唯一的设备类型
可以启动网络,每个 ZigBee
网络必须有一名协调员。
协调员启动后
网络,它可以允许新设备
加入网络。还可以路由
数据包并与
网络上的其他设备。到
确保协调器开始
良好的信道和未使用的 PAN ID,
协调器执行一系列扫描
发现任何 RF 活动
不同的通道(能量扫描)和
发现附近任何正在运行的 PAN
(PAN 扫描)。选择的过程
描述了通道和 PAN ID
在以下部分中。

频道选择

开始时
网络中,协调器必须选择一个
网络的“好”渠道
进行操作。为此,它执行
多通道能量扫描
(频率)检测能量水平
在每个频道上。频道有
多余的能量水平被去除
从潜在渠道列表到
开始吧。

实际上,我从未使用过 Digi XBee 无线电(只是他们的一些其他无线电),所以我对协调器了解不多。我认为他们的用户界面通常会公开所有有效命令,因此尝试手动发送它们可能不起作用(正如您所发现的)。

您可以在Digi 论坛上找到更多专家。

Obviously if the coordinator doesn't
have the same channel, nothing will
work, but I can't see any way of
setting the channel manually..?

I'm not sure if what you say above is right. From http://ftp1.digi.com/support/documentation/90000976_C.pdf (you should look at the correct version for your hardware, though), it looks like the purpose of a coordinator is to automatically determine the channel:

Coordinator Operation

Forming a Network

The coordinator is responsible for
selecting the channel, PAN ID (16-bit
and 64-bit), security policy, and
stack profile for a network. Since a
coordinator is the only device type
that can start a network, each ZigBee
network must have one coordinator.
After the coordinator has started a
network, it can allow new devices to
join the network. It can also route
data packets and communicate with
other devices on the network. To
ensure the coordinator starts on a
good channel and unused PAN ID, the
coordinator performs a series of scans
to discover any RF activity on
different channels (energy scan) and
to discover any nearby operating PANs
(PAN scan). The process for selecting
the channel and PAN ID are described
in the following sections.

Channel Selection

When starting a
network, the coordinator must select a
"good" channel for the network to
operate on. To do this, it performs an
energy scan on multiple channels
(frequencies) to detect energy levels
on each channel. Channels with
excessive energy levels are removed
from its list of potential channels to
start on.

I've actually never used the Digi XBee radios (just some of their other radios), so I don't know much about coordinators. I think that their user interface typically does expose all of the valid commands, so it probably won't work to try sending them manually (as you discovered).

You may find more experts on the Digi forums.

傾旎 2024-11-01 03:37:41

唔。奇怪,再次检查设置并最终让它与 2 路通信一起工作?! :S

  1. 设置一个协调器
  2. 将另外两个设置为路由器/终端设备
  3. 将设备高位 (DH) 设置为 0,将设备低位 (DL) 设置为 FFFF(这意味着从该模块发送的所有内容都应该被每个人接收)
  4. 将协商通道设置为1(启用),这意味着路由器/终端设备唯一可以设置自己的通道的时间是在同一通道上找到协调器时(在我的情况下显然没有发生这种情况)

其他所有内容均保留为默认值。

配置路由器/终端设备时,让协调器保持开机状态,以便您可以检查它们是否正确配对。

正如我所说,我以前使用过这个配置,但它不起作用,所以我不知道这次是什么让它发挥作用,但它起作用了?!

Hmm. strange, keep going over the settings again and finally got it working with 2-way comms?! :S

  1. Setup one a coordinator
  2. Setup other two as router/end devices
  3. Set the Device High (DH) to 0 and the Device Low (DL) to FFFF (this means everything sent from this module should be received by everyone)
  4. Set Negotiate Channel to 1 (Enabled), which means the only time a router/end device can set it's own channel is when it finds a coordinator on the same channel (this clearly wasn't happening in my case)

Everything else was left as default.

Leave coordinator powered on when configuring router/end devices so you can check they pair correctly.

As I said, I've used this configuration before and it just didn't work, so I don't know what kicked it into life this time, but it worked?!

旧人 2024-11-01 03:37:41

需要考虑的一件事是 ZigBee 通道从 11 扩展到 26,零不是一个有效的选项。

既然是这种情况,您可以尝试命令 ATCH11 吗?

如果该命令成功,那么 ATCH 命令可能需要 11 到 26 之间的十进制输入?

One thing to take into account is that ZigBee channels extend from 11 to 26, zero is not a valid option.

Since that's the case, are you able to try the command ATCH11 ?

If that command succeeds, then perhaps the ATCH command wants a decimal input between 11 and 26?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文