简体   繁体   English

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

[英]How do you set the channel on a XBee PRO series 2?

I've got three XBees. 我有三个XBees。 2x PROs and a standard, all series 2s. 2x PROs和标准,所有系列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). 我在通道0和PAN 234上配置了一个PRO和一个标准作为路由器/端点(这是选择“XBP24-B”/“XB24-B”时的默认通道和PAN ID“ZNET2.5 ROUTER / END设备在“配置文件(两者的版本1247)。

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). 然而,我设置了“ZNET 2.5 COORDINATOR AT”配置文件的PRO有一个E通道(尽管如果我继续使用相同的配置文件闪烁设备,这会从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: X-CTU中的CH设置是只读的,我可以看到任何其他UI元素来更改频道: 只读CH设置! 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) +++(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. 我用Google搜索并用谷歌搜索无济于事。 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! 我让他们以前的工作作为一个侥幸的问题,因为我一直闪烁硬件,直到频道数匹配,但这显然是荒谬的!

Channel selection with the XBee ZB (S2, S2B, S2C) series of modules works differently than with the XBee 802.15.4 (S1) modules. 使用XBee ZB(S2,S2B,S2C)系列模块进行的通道选择与使用XBee 802.15.4(S1)模块的方式不同。 Channel selection is automatic with ZB (as opposed to it being manual with the 802.15.4 modules). 使用ZB自动选择通道(而不是使用802.15.4模块进行手动)。

You normally never need to manipulate the channel selection parameters with ZB. 通常你永远需要操作与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). 如果您的模块似乎无法找到彼此,则通常会导致协调器(NJ)上的PAN设置(ID),安全设置(LK)或网络加入权限设置不匹配。

Not a lot of information exists on the web outside of the Digi's XBee ZB OEM manual. 在Digi的XBee ZB OEM手册之外,Web上不存在大量信息。 For reference sake, channel selection with ZB works like this: 为了便于参考,使用ZB进行频道选择的方式如下:

  1. XBee ZB Coordinator is powered up XBee ZB协调器已启动
  2. The XBee ZB Coordinator reads its SC parameter and builds a list of candidate channels to scan XBee ZB协调器读取其SC参数并构建要扫描的候选通道列表
  3. The XBee ZB Coordinator then performs an energy scan on each candidate channel 然后,XBee ZB协调器对每个候选信道执行能量扫描
  4. The XBee ZB Coordinator then chooses the channel with the least amount of energy on it 然后,XBee ZB协调器选择能量最少的通道

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. 此程序旨在从微波炉,WiFi网络或可能在2.4GHz频段上传输的任何其他信息中选择噪声最小的信道。

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. 加入网络的任何路由器或终端设备首先查询其SC参数,然后他们将尝试搜索他们可以加入的网络,这些网络匹配其PAN和安全参数。 They will join and stay joined to the first network they can--with some minor exceptions (see the JV and NW parameters, for example). 他们将加入并保持与第一个网络的连接 - 除了一些小的例外(例如,参见JV和NW参数)。

If you want to force a channel selection you must set the SC parameter to enable only a single channel. 如果要强制选择通道,则必须将SC参数设置为仅启用单个通道。 The SC parameter is a bitmask 1 . SC参数是位掩码1 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). 这个参数的棘手之处在于第一位(位0)不是通道0,它是通道11(0x0B)。 For ease of use, if you wanted to lock an XBee ZB to a single channel here would be the values: 为了便于使用,如果您想将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                 |
+---------------+---------------+------------------+-------------------------+

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: http://ftp1.digi.com/support/documentation/90000976_C.pdf (您应该查看硬件的正确版本),看起来协调器的目的是自动确定通道:

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. 协调器负责为网络选择信道,PAN ID(16位和64位),安全策略和堆栈配置文件。 Since a coordinator is the only device type that can start a network, each ZigBee network must have one coordinator. 由于协调器是唯一可以启动网络的设备类型,因此每个ZigBee网络必须具有一个协调器。 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). 为了确保协调器在良好的信道和未使用的PAN ID上启动,协调器执行一系列扫描以发现不同信道上的任何RF活动(能量扫描)并发现任何附近的操作PAN(PAN扫描)。 The process for selecting the channel and PAN ID are described in the following sections. 以下各节介绍了选择通道和PAN ID的过程。

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. 我实际上从未使用过Digi XBee无线电(只是其他一些无线电),所以我对协调员了解不多。 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 . 您可以在Digi论坛上找到更多专家。

Hmm. 嗯。 strange, keep going over the settings again and finally got it working with 2-way comms?! 奇怪的是,再次继续设置,最后让它与双向通信一起工作?! :S :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) 将设备高(DH)设置为0,设备低(DL)设置为FFFF(这意味着每个人都应该收到从该模块发送的所有内容)
  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) 将Negotiate Channel设置为1(启用),这意味着路由器/终端设备唯一可以设置自己的通道的时间是在同一个通道上找到协调器(这在我的情况下显然不会发生)

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?! 正如我所说,我之前使用过这种配置而且它不起作用,所以我不知道这次是什么把它带入了生活,但它有效吗?!

One thing to take into account is that ZigBee channels extend from 11 to 26 , zero is not a valid option. 需要考虑的一件事是ZigBee通道从11扩展到26 ,零不是有效选项。

Since that's the case, are you able to try the command ATCH11 ? 既然如此,你能尝试命令ATCH11吗?

If that command succeeds, then perhaps the ATCH command wants a decimal input between 11 and 26? 如果该命令成功,那么ATCH命令可能需要11到26之间的小数输入?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM