How do you set the channel on a XBee PRO series 2?
Asked Answered
F

4

6

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!

Francophobe answered 21/3, 2011 at 19:35 Comment(1)
you should try ATCH10(enter), which this 10 means Hex 0X10 in their datasheet. Just tried it. verified. also, there is an channel range you need to consider.Nectar
M
1

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.

Malposition answered 21/3, 2011 at 19:56 Comment(5)
But I can't set the channel on the end devices either!?! In the documentation it says they MUST be set to the same channel to work. My End devices say channel 13, but my coordinator says 14? AHH!Francophobe
@Francophobe - Yes, they may need to be set to the same channel, but maybe that's not your job? On digi.com/support/kbase/kbaseresultdetl.jsp?kb=186, it says "the Routers will automatically associate themselves to the Coordinator as long as it is the only network in range. The Channel, Operating PAN ID, and the 16 bit Network Address (MY) will be automatically assigned upon successful association."Malposition
Ok so the question is why are they not picking the same channel? They are both powered on at the same timeFrancophobe
@Francophobe - Are you following the steps listed in digi.com/support/kbase/kbaseresultdetl.jsp?kb=186 ? At what point does your response first differ from the expected response?Malposition
that uses the ZIBEE firmware, which I can use as it bricks my modules every time I try to load it on them :(Francophobe
L
9

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                 |
+---------------+---------------+------------------+-------------------------+
Lucrative answered 1/4, 2012 at 18:29 Comment(1)
+1 for the correct answer -- set ATSC! And, channel 26 is available on the non-PRO models of the S2B and S2C (IIRC). I've used it for sure on the S2B. You'll want to limit ATSC on the coordinator to your selected channel, but probably want to keep the router's ATSC set to the full range of channels. That way you only have to update the coordinator if you want to force a new channel, and the router will be able to find it.Illuse
M
1

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.

Malposition answered 21/3, 2011 at 19:56 Comment(5)
But I can't set the channel on the end devices either!?! In the documentation it says they MUST be set to the same channel to work. My End devices say channel 13, but my coordinator says 14? AHH!Francophobe
@Francophobe - Yes, they may need to be set to the same channel, but maybe that's not your job? On digi.com/support/kbase/kbaseresultdetl.jsp?kb=186, it says "the Routers will automatically associate themselves to the Coordinator as long as it is the only network in range. The Channel, Operating PAN ID, and the 16 bit Network Address (MY) will be automatically assigned upon successful association."Malposition
Ok so the question is why are they not picking the same channel? They are both powered on at the same timeFrancophobe
@Francophobe - Are you following the steps listed in digi.com/support/kbase/kbaseresultdetl.jsp?kb=186 ? At what point does your response first differ from the expected response?Malposition
that uses the ZIBEE firmware, which I can use as it bricks my modules every time I try to load it on them :(Francophobe
F
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?!

Francophobe answered 21/3, 2011 at 21:24 Comment(0)
B
0

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?

Brewton answered 4/4, 2011 at 4:51 Comment(1)
Why does ZigBee start at channel 11? o_OPenal

© 2022 - 2024 — McMap. All rights reserved.