The pair of XBees alone won’t get you very far. In most cases you’ll want a separate module to interface with the XBee. You can use an XBee Shield to connect an XBee to your Arduino.
Selecting an Explorer
The first step to communicate with your XBee is picking an interface board that allows you to interface with your XBee module. XBee Explorers act as a gateway between your computer and your XBee.
XBee Explorer USB
The XBee Explorer Regulated is the most popular of the Explorers. It’s equipped with a 3.3V regulator; you’ll also need the prolific cable to connect it to your computer. The cable is easiest way ever to connect to your XBee. Inside the big USB plug is a USB<->Serial conversion chip and at the end of the cable are four wire – red power, black ground, white RX into USB port, and green TX out of the USB port. The power pin provides the 5V @ 500mA direct from the USB port and the RX/TX pins are 3.3V level for interfacing with the most common 3.3V logic level chipsets.
Starting With X-CTU
X-CTU is free software, provided by Digi (the manufacturer of XBee), which we use to configure and manage XBees, and test XBee networks.
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 using a USB XBee board. If you’re using a Serial Explorer instead, pick the “Communications Port” option. If the Serial Explorer is not showing up, make sure the switch onboard is set to “On”!
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.
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.
- The PAN ID’s of both the XBees must be same
- The Serial number High must be copied to DH of the same Xbee do it for the other Xbee also
- The Serial number Low must be copied to DL of the Other Xbee and vice versa
- Each time you change something you have to write the setting to the module
- If not written any changes that has been made to the module it will appear has shown below which will appear in green colour
- JV channel verification must be Enabled in both the XBees
- Name one of the Xbee as the Coordinator and other one as Router
- After doing the changes to settings, click on Update firmware and it asks for whether to make it as coordinator or router select as your wish, once clicked on update firmware, follow the images steps as shown below
- Select the product family as XB24-ZB and function set as ZigBee router AT and firmware version to 22A7 newest and click on finish and once clicked it will display firmware upgrading successfully completed.
- Repeat the Same for coordinator but here you have to select as ZigBee coordinator AT and click on finish and once clicked, it will display firmware upgrading successfully completed
- 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 XBees console. As long as it was open, you should see that same character, but red. Try typing a different character into the second XBees console, and you should see it work the other way
- If that worked, then your XBees are configured to talk to each other!