Skip to content
bzbhorizon edited this page Sep 14, 2010 · 7 revisions

Xbee are wireless (ZigBee RF) radios made by Digi that are compatible with Arduino (allow communication over serial port). They are low power, pair quickly and have a variety of ranges from 100m to 10km. To use an Xbee radio with an Arduino board either an Xbee shield or Xbee Explorer are required.

Preparing Xbees

Xbee shields have a pair of jumpers: different combinations of the positions of these jumpers and whether or not the chip is in the Arduino board determine how the Xbee, Arduino and computer (or other devices attached to the Arduino) communicate:

Jumper/chip setup Possible communications Use
J=Xbee, Arduino in XBee < – > Arduino – > USB Only way for Xbee and Arduino to communicate hence only way to use Xbee in sketches
N.B. Seems that I can monitor Xbee via Arduino IDE serial monitor but not XCTU terminal in this config
J=USB, Arduino in Arduino < – > USB Only way for computer to transmit to Arduino hence only way to upload sketches
J=USB, Arduino out XBee < – > USB Only way for 2-way communication between Xbee and computer hence best way to test Xbees via terminal
N.B. Taking the Arduino chip out to do this starts to damage the chip pretty quickly

E.g. in the Homeworkduino scenario where a computer needs to communicate wirelessly with an Arduino via Xbee:

  • One Xbee needs to be connected to the computer via USB: this might be an Xbee in an Xbee shield on an Arduino board with the chip removed (as this bypasses the Arduino, simply allowing the computer to pass data to and receive data from the Xbee)
  • One Xbee needs to be connected to the target Arduino: this Xbee needs to be in an Xbee shield on the Arduino and needs to have its jumpers set to Xbee

If these are the only Xbees around then they will automatically communicate.

Gotchas

  1. A sketch cannot be uploaded to an Arduino with an Xbee shield is present with jumpers set to Xbee (as they would be while the Arduino is using the Xbee). To upload a sketch either the jumpers need to be switched to USB or the shield needs to be removed.
  2. From http://www.humboldt.edu/~cm19/XBee%20setup.pdf:

If you will be using more than two XBee modules and you want two routers/end devices to talk to one-another, you’ll need to set the Destination Nodes for each module. You can easily do this by entering command mode (typing “+++”) and then sending “ATDNxxxxxx” where xxxxxx is the Node Identifier (NI) you’ve set-up for the Destination Node XBee such as “router2”. This essentially replaces the “ATMYxxxx” command that is commonly used with XBee Series 1 modules.

  • To flash firmware or to monitor serial ports use XCTU
Clone this wiki locally