Guide.ArduinoXbeeShield History

Show minor edits - Show changes to markup

February 27, 2012, at 06:18 AM by Scott Fitzgerald -
Added lines 3-4:

NB: this page is deprecated, and refers to a discontinued product. For the Getting Started Guide for the current Wireless Shield, visit here.

Deleted line 103:
August 30, 2010, at 02:05 PM by David A. Mellis -
Changed lines 3-4 from:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium. This documentation describes the use of the shield with the XBee 802.15.4 module. For the XBee ZNet 2.5 ("Series 2") modules, see this configuration guide.

to:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium. This documentation describes the use of the shield with the XBee 802.15.4 module (sometimes called "Series 1" to distinguish them from the Series 2 modules, although "Series 1" doesn't appear in the official name or product description). For the XBee ZNet 2.5 ("Series 2") modules, see this configuration guide.

Changed lines 101-102 from:

For more information, see: the hardware page for the Xbee shield, the Libelium SquidBee wiki, and the MaxStream Xbee page.

to:

For more information, see: the hardware page for the Xbee shield, the Libelium SquidBee wiki, and the MaxStream Xbee page.

August 15, 2009, at 01:51 PM by David A. Mellis -
Changed lines 1-4 from:

Arduino Xbee Shield

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium.

to:

Arduino XBee Shield

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium. This documentation describes the use of the shield with the XBee 802.15.4 module. For the XBee ZNet 2.5 ("Series 2") modules, see this configuration guide.

August 16, 2007, at 12:47 AM by David A. Mellis -
Changed lines 3-4 from:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium, a spin-off from the University of Zaragoza in Spain.

to:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium.

August 16, 2007, at 12:42 AM by David A. Mellis -
Changed lines 3-4 from:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee.

to:

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee. It was developed in collaboration with Libelium, a spin-off from the University of Zaragoza in Spain.

August 16, 2007, at 12:41 AM by David A. Mellis -
Changed lines 97-101 from:

Note that like the other commands, the reset will not be permanent unless you follow it with the ATWR comamand.

to:

Note that like the other commands, the reset will not be permanent unless you follow it with the ATWR comamand.

References

For more information, see: the hardware page for the Xbee shield, the Libelium SquidBee wiki, and the MaxStream Xbee page.

August 15, 2007, at 09:12 PM by David A. Mellis -
Changed lines 52-53 from:

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with):

to:

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), use the 'ATID command:

Changed lines 79-80 from:

Unless you tell the module to write the changes to non-volatile (long-term) memory, they will only be in effect until the module loses power. To save the changes permanently (until you explicitly modify them again):

to:

Unless you tell the module to write the changes to non-volatile (long-term) memory, they will only be in effect until the module loses power. To save the changes permanently (until you explicitly modify them again), use the ATWR command:

Changed lines 88-97 from:
to:
August 15, 2007, at 09:02 PM by David A. Mellis -
Changed lines 43-44 from:

To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

to:

To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least one second before and after during which you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

August 15, 2007, at 09:02 PM by David A. Mellis -
Changed lines 43-44 from:

To get the module into configuration mode, you need to send it three plus signs: + and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

to:

To get the module into configuration mode, you need to send it three plus signs: +++ and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

August 15, 2007, at 09:01 PM by David A. Mellis -
Changed lines 39-40 from:

Configuration the Xbee Module

to:

Configuring the Xbee Module

August 15, 2007, at 09:00 PM by David A. Mellis -
Added lines 78-88:
August 15, 2007, at 08:58 PM by David A. Mellis -
Changed line 45 from:
to:
Changed line 54 from:
to:
Changed line 63 from:
to:
Changed line 72 from:
to:
August 15, 2007, at 08:57 PM by David A. Mellis -
Changed line 49 from:
to:
Changed lines 54-57 from:
Send CommandExpected Response
ATID<enter>3332
to:
Changed lines 63-66 from:
Send CommandExpected Response
ATID3331<enter>OK
to:
Changed lines 72-75 from:
Send CommandExpected Response
ATID<enter>3331
to:
August 15, 2007, at 08:56 PM by David A. Mellis -
Changed lines 46-53 from:
to:
August 15, 2007, at 08:55 PM by David A. Mellis -
Added lines 45-57:
Deleted lines 59-64:
+++OK

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with):

Send CommandExpected Response
August 15, 2007, at 08:54 PM by David A. Mellis -
Added line 45:
Added line 51:
Added line 57:
Added line 63:
August 15, 2007, at 08:53 PM by David A. Mellis -
Changed lines 45-47 from:
Send CommandExpected Response
+++OK
to:
Send CommandExpected Response
+++OK
Changed lines 50-52 from:
Send CommandExpected Response
ATID<enter>3332
to:
Send CommandExpected Response
ATID<enter>3332
Changed lines 55-57 from:
Send CommandExpected Response
ATID3331<enter>OK
to:
Send CommandExpected Response
ATID3331<enter>OK
Changed lines 60-62 from:
Send CommandExpected Response
ATID<enter>3331
to:
Send CommandExpected Response
ATID<enter>3331
August 15, 2007, at 08:49 PM by David A. Mellis -
Changed line 45 from:
Command SentResponse Received
to:
Send CommandExpected Response
Changed lines 48-73 from:

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), go into command mode and then type:

ATID

followed by a carriage return (i.e. pressing enter from within a terminal program). You should see:

3332

(the default ID of the module) or whatever value the ID was last set to.

To change the network ID of the module, type:

ATID3331

and press enter. You should get back:

OK

Now, check that the setting has taken effect by again asking for the ID:

ATID

(and pressing enter). You should see:

3331

to:

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with):

Send CommandExpected Response
ATID<enter>3332

To change the network ID of the module:

Send CommandExpected Response
ATID3331<enter>OK

Now, check that the setting has taken effect:

Send CommandExpected Response
ATID<enter>3331
August 15, 2007, at 08:47 PM by David A. Mellis -
Changed lines 46-47 from:
+++OK@@
to:
+++OK
August 15, 2007, at 08:47 PM by David A. Mellis -
Changed lines 43-46 from:

To get the module into configuration mode, you need to send it three plus signs: + and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return. In a terminal, this will look like this (where the +++ was typed by you, and the OK returned by the module):

+++OK

to:

To get the module into configuration mode, you need to send it three plus signs: + and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return.

Command SentResponse Received
+++OK@@
August 15, 2007, at 08:45 PM by David A. Mellis -
Changed lines 41-42 from:

You can configure the Xbee module from the code running on the Arduino board or from software on the computer. To configure it from the Arduino board, you'll need to have the jumpers in the Xbee position. To configure it from the computer, you'll need to have the jumpers in the USB configuration and have removed the microncontroller from your Arduino board.

to:

You can configure the Xbee module from code running on the Arduino board or from software on the computer. To configure it from the Arduino board, you'll need to have the jumpers in the Xbee position. To configure it from the computer, you'll need to have the jumpers in the USB configuration and have removed the microncontroller from your Arduino board.

August 15, 2007, at 08:44 PM by David A. Mellis -
Changed lines 37-72 from:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program. This allows you, for example, to see the data that the module is receiving from other Xbee shields (e.g. to collect sensor data wirelessly from a number of locations).

to:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program. This allows you, for example, to see the data that the module is receiving from other Xbee shields (e.g. to collect sensor data wirelessly from a number of locations).

Configuration the Xbee Module

You can configure the Xbee module from the code running on the Arduino board or from software on the computer. To configure it from the Arduino board, you'll need to have the jumpers in the Xbee position. To configure it from the computer, you'll need to have the jumpers in the USB configuration and have removed the microncontroller from your Arduino board.

To get the module into configuration mode, you need to send it three plus signs: + and there needs to be at least a second before and after when you send no other character to the module. Note that this includes newlines or carriage return characters. Thus, if you're trying to configure the module from the computer, you need to make sure your terminal software is configured to send characters as you type them, without waiting for you to press enter. Otherwise, it will send the plus signs immediately followed by a newline (i.e. you won't get the needed one second delay after the +++). If you successfully enter configuration mode, the module will send back the two characters 'OK', followed by a carriage return. In a terminal, this will look like this (where the +++ was typed by you, and the OK returned by the module):

+++OK

Once in configuration mode, you can send AT commands to the module. Command strings have the form ATxx (where xx is the name of a setting). To read the current value of the setting, send the command string followed by a carriage return. To write a new value to the setting, send the command string, immediately followed by the new setting (with no spaces or newlines in-between), followed by a carriage return. For example, to read the network ID of the module (which determines which other Xbee modules it will communicate with), go into command mode and then type:

ATID

followed by a carriage return (i.e. pressing enter from within a terminal program). You should see:

3332

(the default ID of the module) or whatever value the ID was last set to.

To change the network ID of the module, type:

ATID3331

and press enter. You should get back:

OK

Now, check that the setting has taken effect by again asking for the ID:

ATID

(and pressing enter). You should see:

3331

August 13, 2007, at 02:05 AM by David A. Mellis -
Changed line 37 from:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program.

to:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program. This allows you, for example, to see the data that the module is receiving from other Xbee shields (e.g. to collect sensor data wirelessly from a number of locations).

August 13, 2007, at 01:59 AM by David A. Mellis -
Changed lines 33-34 from:

You can use any of the standard Arduino serial commands with the Xbee shield. With the shield's jumpers in the Xbee position, the print and println commands will send data over the Xbee shield and the USB connection (i.e. to other Xbee shields and to the computer at the same time). The Xbee module on the shield, however, is set up to work at 9600 baud by default, so unless you reconfigure it, you'll need to make sure you're passing 9600 to the Serial.begin() command in your sketch.

to:

You can use any of the standard Arduino serial commands with the Xbee shield. With the shield's jumpers in the Xbee position, the print and println commands will send data over the Xbee shield and the USB connection (i.e. to other Xbee shields and to the computer at the same time). In this configuration, however, the board will only receive data from the Xbee shield not from the USB connection (you'll need to switch the jumpers to allow the board to receive data from the computer).

The Xbee module on the shield is set up to work at 9600 baud by default, so unless you reconfigure it, you'll need to make sure you're passing 9600 to the Serial.begin() command in your sketch.

August 13, 2007, at 01:54 AM by David A. Mellis -
Changed line 35 from:
to:

To allow your computer to communicate directly with the Xbee shield, connect it to an Arduino board whose microcontroller has been removed and place its jumpers in the USB configuration. Then you can send data to and receive data from the Xbee module from any terminal program.

August 13, 2007, at 01:40 AM by David A. Mellis -
Added lines 31-35:

A Few Notes

You can use any of the standard Arduino serial commands with the Xbee shield. With the shield's jumpers in the Xbee position, the print and println commands will send data over the Xbee shield and the USB connection (i.e. to other Xbee shields and to the computer at the same time). The Xbee module on the shield, however, is set up to work at 9600 baud by default, so unless you reconfigure it, you'll need to make sure you're passing 9600 to the Serial.begin() command in your sketch.

August 13, 2007, at 01:32 AM by David A. Mellis -
Changed lines 28-30 from:

When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Switch the jumpers to the Xbee setting. Now connect both boards to the computer. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly.

to:

When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Switch the jumpers to the Xbee setting. Now connect both boards to the computer. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly. This may not seem that exciting when both boards are connected to the same computer, but if you connect them to different computers (or power them with an external power supply - being sure to switch the power jumper on the Arduino board), they should still be able to communicate.

August 13, 2007, at 01:30 AM by David A. Mellis -
Added lines 1-28:

Arduino Xbee Shield

The Arduino Xbee shield allows your Arduino board to communicate wirelessly using Zigbee.

A Simple Example

You should be able to get two Arduino boards with Xbee shields talking to each other without any configuration, using just the standard Arduino serial commands (described in the reference).

To upload a sketch to an Arduino board with a Xbee shield, you'll need to put both jumpers on the shield to the "USB" setting (i.e. place them on the two pins closest to the edge of the board) or remove them completely (but be sure not to lose them!). Then, you can upload a sketch normally from the Arduino environment. In this case, upload the Communication | Physical Pixel sketch to one of the boards. This sketch instructs the board to turn on the LED attached to pin 13 whenever it receives an 'H' over its serial connection, and turn the LED off when it gets an 'L'. You can test it by connecting to the board with the Arduino serial monitor (be sure it's set at 9600 baud), typing an H, and pressing enter (or clicking send). The LED should turn on. Send an L and the LED should turn off. If nothing happens, you may have an Arduino board that doesn't have a built-in LED on pin 13 (see the board index to check for sure), in this case you'll need to supply your own.

Once you've uploaded the Physical Pixel sketch and made sure that it's working, unplug the first Arduino board from the computer. Switch the jumpers to the Xbee setting (i.e. place each on the center pin and the pin farthest from the edge of the board). Now, you need to upload a sketch to the other board. Make sure its jumpers are in the USB setting. Then upload the following sketch to the board:

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.print('H');
  delay(1000);
  Serial.print('L');
  delay(1000);
}

When it's finished uploading, you can check that it's working with the Arduino serial monitor. You should see H's and L's arriving one a second. Turn off the serial monitor and unplug the board. Switch the jumpers to the Xbee setting. Now connect both boards to the computer. After a few seconds, you should see the LED on the first board turn on and off, once a second. (This is the LED on the Arduino board itself, not the one on the Xbee shield, which conveys information about the state of the Xbee module.) If so, congratulations, your Arduino boards are communicating wirelessly.

Share