Exploring XBees and XCTU
Starting With X-CTU
If you haven’t already, head over to their website and download the latest release and follow their instructions to install the software.
Before continuing on, make sure you’ve plugged an XBee (correctly) into your Explorer, and have the Explorer plugged into your computer. When you installed the drivers for your Explorer it should have been assigned port number. You’ll need that shortly.
After initially opening X-CTU, you’ll be presented with a window like this:
To add your XBee(s), click the “Add device” icon – – in the upper-left part of the window. That will prompt this screen to show up:
Select your communication port. If you’re lucky (or just don’t have a lot of stuff connected to your computer) you may only have one option here. Otherwise Windows users should look for the entry that says “USB Serial Port” and Mac users should look for something like “usbserial-XXXXXXXX”. (If you’re using a USB board, that is. If you’re using a Serial Explorer, pick the “Communications Port” option.)
This window also allows you to specify more specific serial characteristics like baud rate, data bits, and stop bits. Assuming this is the first time you’ve used your XBee, you can leave those settings alone. So make sure those values look just as they do in the image above and click Finish.
A “Discovering radio modules…” window will briefly scroll by, after which you should be presented with the original window, but with an addition to the “Radio Modules” section on the left. (If X-CTU failed to find a module, check out our troubleshooting page.)
Click that new module, and wait a few seconds as X-CTU reads the configuration settings of your XBee. You should then be presented with the entire configuration of your XBee.
As you can see by scrolling down the right half, there are a lot of configuration settings available. We’ll get to some of those later. For now, though, verify that the configurable settings visible in the screenshot above match those of your XBee (channel=C, PAN ID=3332, DH=0, DL=0, MY=0).
Do It Again
To test communication between your XBee’s you’ll need to connect your second XBee to a computer as well. That means doing the “Add device” dance one more time.
If you have another computer available, you can install X-CTU on that as well and perform the same set up. You can certainly perform this test with both XBees connected to the same computer as well, just make sure you select the correct port number when you’re adding the second XBee.
If you add a second XBee to the same computer, a second entry will be added to the “Radio Modules” list. Selecting either of those entries will show the configuration settings for that, specific XBee.
Note that there are two XBees in the list on the left. The configuration values shown are for the highlighted XBee.
If you’re ever unsure which XBee is which, try to match up the MAC numbers. These numbers are printed on a sticker on the bottom side of your XBee, and they’re also listed in XCTU. (It’s listed as the “Serial Number” high and low, and is un-modifiable.)
Each XBee has a unique MAC address, printed on a sticker in the highlighted area.
As with the last module, make sure all settings are defaulted (channel=C, PAN ID=3332, DH=0, DL=0, MY=0). That’ll make the next step possible.
Quick and Easy Test
Click the “Switch to Consoles” icon – – in the upper-right part of the window. This will switch from the configuration tab to the console. We can use the console to send characters to an XBee, which will route that character over-the-air to any other XBee it’s connected to.
If you have two XBees connected to your computer, you can switch between each radio’s console by selecting the device on the left.
First, open a serial connection on each device by clicking the connect icon – . The icon will change, and the border of the console will turn green.
Next, click into the left half of the console, and type a letter or number. You should notice that character echoed in a blue font (the hexadecimal digits on the right represent the ASCII value). Now click into the other XBee’s console. As long as it was open, you should see that same character, but red. Try typing a different character into the second XBee’s console, and you should see it work the other way.
If that worked, then your XBees are configured to talk to each other! If not, check out the troubleshooting page.
That your XBees can talk to each other out of the box is no real surprise. They’re all configured to, by default, be on the same network with the same addresses. That might be OK, but what if your neighbor is running an XBee-based robot control network, while you’re trying to automate your house? Every time they try to roll a bot forward, your garage door might open! To be safe, you should configure your XBees to operate on a unique network. Fortunately, that, and most other XBee settings are easy to change. On to the next page!