You are on page 1of 5

7

The Hands-on XBee Lab Manual.


2012 Elsevier Inc. All rights reserved.
How to Change XBee
Module Congurations
REQUIREMENTS
1 XBee module
1 USB-to-XBee adapter
1 USB cabletype-A to mini-B
Digi X-CTU software running on a Windows PC, with an open USB port
INTRODUCTION
In this experiment you will learn how to use the X-CTU software to program
an XBee module for specic actions. You will make changes in experiments
that will follow, so please do not go on to the next experiment until you under-
stand how to change settings and conrm them.
Step 1. You must have an XBee module plugged into a USB-XBee adapter
and the adapter must connect to a Windows PC USB port. You also must run
the X-CTU software. If you do not have this equipment set up and the X-CTU
software running, please complete Experiment 1 before you proceed.
Step 2. Check the connection between your PC and the XBee module:
Within the X-CTU window, click on the PC Settings tab and ensure you have
the communications set for Baud: 9600, Flow Control: NONE, Data Bits: 8,
Parity: NONE, and Stop Bits: 1. Click on the Test/Query button and the Com
test/Query Modem window should open and display Communication with
modem..OK and other information. (If you do not see this message, go back
and repeat Experiment 1 and see the Troubleshooting section in Appendix H.)
Click on OK in the message window.
Step 3. Click on the Modem Conguration tab. This window lets you
observe and change all of the operating information internal to an XBee
module. At this point the conguration window could be blank (white) or
it might contain information as shown in Figure 2.1. It does not matter.
Exper i ment | 2
8 How to Change XBee Module Congurations
(Digi International often uses modem to describe its XBee modules. To me,
modem sounds archaic, so I will avoid using it as much as possible.)
Step 4. Before you proceed, uncheck the small box Always update
rmware on the left side of the Modem Conguration window as shown in
Figure 2.2. If you check this box, or leave it checked, the X-CTU software
will attempt to update the rmware in an attached XBee module. If that update
fails, you could end up with a non-functional module. Do not update rmware.
Step 5. Before you use the X-CTU software to change conguration infor-
mation, you must ensure the software knows the type of module and the func-
tion set you plan to use. When you work with a module, the Modem: XBee
should show XB24 and the Function Set should show XBee 802.15.4, as
shown in Figure 2.3.
FIGURE 2.1 The Modem Conguration window displays settings from an XB24 XBee
module with rmware version 10E6.
FIGURE 2.2 Leave the Always update rmware box unchecked, or uncheck it. You do
not need to update rmware and trying to do so could cause problems.
FIGURE 2.3 If not already set as shown here, change the MODEM: XBee and Function
Set text boxes to the congurations shown here.
Introduction 9
The XBee 802.15.4 setting operates the modules according to a standard
established for the Institute of Electrical and Electronic Engineers (IEEE) to
ensure proper communications between all modules via a xed protocol.
Step 6. In the Modem Parameters and Firmware box in the upper left
section of the X-CTU window, click on Read. This action reads the settings
already programmed in your XBee module. The window should now display
the parameters in a directory-like format typical of Windows and other operat-
ing systems, as shown earlier in the lower part of Figure 2.1.
You should see a folder labeled Networking & Security at the top
of the window and below that, settings for CHChannel, IDPAN ID,
DHDestination Address High, and so on. Under the Networking & Security
heading, move the mouse cursor to DLDestination Address Low and click
on this label. A text box will open to the right of the DLDestination Address
Low label. Disregard any value in this box.
Clear any information in the box and type 4567. The 4567, a hexadeci-
mal value, also appears in the parentheses to the left of the DLDestination
Address Low label, and the label turns olive green (Figure 2.4). That color,
which indicates you changed the information, makes it easy to nd modied
parameters. Unchanged parameters remain bright green, parameters you can-
not change appear in black, and errors turn a parameter label red.
A click on a parameter also displays information about the parameter and
its allowed settings in the text area at the bottom of the Modem Conguration
window (Figure 2.5).
Step 7. Move the cursor to MY16-Bit Source Address, click on it and
in the text box that opens to the right of the label, type 1234. Again, note the
X-CTU program placed 1234 in the parentheses at the left of the MY16-Bit
Source Address label.
Step 8. For now, any changes made in the Modem Conguration window
exist only within the X-CTU software. An attached XBee module has not yet
received them. In the Modem Parameters and Firmware box, click on the Write
FIGURE 2.4 Modifying an XBee conguration setting changes its color so you can
quickly spot modied values or selections.
FIGURE 2.5 The text window provides information about a selected module-congura-
tion setting.
10 How to Change XBee Module Congurations
button. Below the list of settings the X-CTU software displays the message,
Getting modem type and then a bar graph labeled, Setting AT parameters.
When the bar graph disappears, you should see the messages shown in Figure 2.6.
Step 9. These messages indicate the X-CTU program has successfully
saved the two parameters you changed in an attached XBee module. You can
conrm this action in two ways:
l
Click the Read button to obtain the settings from the XBee module you just
programmed. To the left of the labels Destination Address Low and 16-Bit
Source Address you should see the values typed in earlier.
l
In the Modem Conguration window, each label has a 2-letter prex, such
as DL for Destination Address Low and MY for 16-Bit Source Address.
These letters represent the AT command used to read or write a parameter
value or choice. Click on the Terminal tab to get to the terminal view. In
this window, click the Clear Screen button.
To determine the Destination Address Low value, type:

ATDL[Enter]
You should see:
OK
ATDL
4567
To determine the 16-Bit Source Address, type:

ATMY[Enter]
You should see:
OK
ATMY
1234
Step 10. You also can use the AT commands to set parameters. Just follow
the AT command with a new parameter. To change the MY16-Bit Source
Address to 0040, type:

ATMY0040[Enter] (No space between command and a parameter value!)


To query the XBee module, type:

ATMY[Enter]
You should see:
OK
FIGURE 2.6 This message shows the X-CTU program successfully transferred the con-
guration information to an XBee module.
Introduction 11
ATMY
40
The X-CTU software does not display nor does it need leading zeros in
the Modem Conguration window, so the command ATMY0040 and ATMY40
have the same effect. In some cases, described later, commands must include
leading zeros, and instructions will explain those situations.
Step 11. To return an XBee module to its factory-default condition,
click on the Modem Conguration tab and then in the Modem Parameters
and Firmware box, click on Restore. This action resets all parameters to the
factory-default settings and automatically writes them into the XBee modules
ash memory. You do not have to click the Write button.
To conrm the default settings, click on Read and you will see the labels
for all the settings you can modify have returned to green and thus the factory-
set values. Before you go to the next experiment, I recommend you restore the
default values for the attached XBee module.
Step 12. So far, the XBee module does not transfer information wirelessly.
The next experiment takes that step.
Note: Unless specied otherwise, all modem parameters use hexadecimal
values. You will nd a hexadecimal-binary-decimal converter at: http://www.
mathsisfun.com/binary-decimal-hexadecimal-converter.html.

You might also like