www.servomagazine.com/index.php?/magazine/article/
january2013_Titus \
Discuss this article in the SERVO Magazine forums at
http://forum.servomagazine.com
Example 1: How You Use
the X-CTU Software
Before you start the X-CTU software, always place an
XBee module in a USB adapter and connect the adapter to
your PC. I found the X-CTU software will not recognize an
XBee-to-USB adapter unless you plug it in first. The X-CTU
program opens a window similar to that shown in Figure 2.
If you see the error message “Invalid class string” when
you start the X-CTU software, just click on OK. Note the
four tabs: PC Settings, Range Test, Terminal, and Modem
Configuration. For whatever reason, Digi calls the XBee
modules “modems.” Click on the PC Settings tab and in the
Select Com Port window, choose the USB Serial Port (x)
that represents your XBee-to-USB adapter. (My lab PC set
the USB adapter at COM3 as shown in Figure 2.)
Next, check the settings along the right side of the
window to ensure you have the following: Baud 9600, Flow
Control NONE, Data Bits 8, Parity NONE, and Stop Bits 1. If
not, change these settings to match those above. With your
XBee module connected, click on Test/Query. You should
see another window of information as shown in Figure 3.
If you do not see this result, click on Retry. If you still don’t
see this information, check your USB-to-XBee adapter, USB
cable, and COM port assignment.
Write down the serial number for your module and
then click on OK. (Your serial number won’t match mine.)
Click on the X-CTU Terminal tab to open a window for
communications with the attached XBee module. The
Terminal can send AT-type modem commands to a module
and display any responses. To start the command mode,
you will type three plus signs (+++) and wait for the module
to respond with OK. Do not press the keyboard [Enter] key
after the +++.
After you see the OK reply, you have 10 seconds in
which to type a command — and data, if any — followed by
the [Enter] key. If you wait more than 10 seconds, you must
type +++ again and wait for OK. Go ahead
and type +++, wait for the OK, and then
type ATSL and then [Enter]. This command
causes the module in the USB adapter to
reply with the lower four bytes (SL) of your
module’s eight-byte serial number which you
saw during the Test/Query operation. My
XBee module showed the hexadecimal value
4049E028.
Type +++ again, wait for the OK, and
type ATSH followed by [Enter]. This
command retrieves the high four bytes (SH)
of the module’s serial number. For my
module, it is 13A200. The ATSH response
FIGURE 2. X-CTU display at software start-up.
suppresses leading zeros, so the module actually has SH =
0013A200. The manual referred to earlier lists all the two-letter AT-type commands and any data they might need.
These AT commands provide an easy way to test an XBee
module attached to your computer and perform basic
operations.
Next, click on the Modem Configuration tab to open a
window that will show all settings available in an XBee
module. When you first use X-CTU, this window will appear
blank. In the small section labeled Modem Parameter and
Firmware, click on Read to get the current settings from an
attached XBee module. Under the Networking & Security
FIGURE 3. Testing communications with an
XBee module provides information about the
module attached via a USB-to-XBee adapter.
SERVO 01.2013 45