Pages

21 October 2012

Arduino UNO - XBee Setup

There are many XBee tutorials out there, but I could not find one that I could apply to my specific Arduino/Shield/Xbee configuration. While this particular configuration may not apply to you, perhaps it will send you in the right direction, so please read on.
Please note, that your XBee shield may require you to perform extra steps, so please do further reading before jumping in head first. I am not an expert, so don't blame me if you fry your board.

Step 2: Upload the bare-minimum script on your Arduino controller

I perform this step to prevent any previous projects from interfering. This may not be necessary, but I tend to do this before wiring up any of my new projects. This is the script I load onto the Arduino:

Bare Minimum Arduino Sketch:

1
2
3
4
5
6
7

void setup() {
}
void loop() {
}

Step 3: Connect the Shield to Arduino, and XBee to Shield.

Disconnect the Arduino UNO from the computer.

Insert the XBee module into the Shield.

This is the XBee Shield and XBee module side by side

This is the XBee module on the XBee Shield

The pins from the XBee module should slot into the respective headers on the Shield.

Connect the XBee shield to the Arduino

The pins from the XBee shield should slot into the respective headers on the Arduino board.

Move the little white switch in the corner to USB.

There are 2 options - USB mode and XBee mode.

We want USB mode which will allow the computer to communicate with the XBee module

Step 4: Connect Arduino to computer, and run the X-CTU Software

With the XBee module and Shield connected to the Arduino, and the Shield's white switch in USB mode; connect the Arduino to the computer using a USB cable.

This Arduino board appears as COM7 on my computer.

Here is what the X-CTU software looks like when it loads up

Press the Test / Query button to see if the computer can talk to the XBee module.

If successful, you should see something like this:

If you accidentally leave the XBee shield in XBee mode, or if your computer fails to communicate with the XBee module, you may encounter these screens.

If you get a successful Test / Query, then move onto the next step.

Step 5: Read XBee Firmware settings:

We can now try to read the XBee firmware settings by

Selecting the Modem Configuration Tab

Select the Read button to read the XBee firmware settings

Step 6: Download older version of firmware if necessary

If you did not have any issues with the previous step, then continue to step 7, otherwise read on.

In my case, the software could not find the firmware file necessary to read the firmware settings.

In step 4, I could see that I had the XB24 Modem type, and 10E8 firmware version,

I tried downloading new versions, but this did not seem to work, as the computer could not detect any newer updates available. The problem I had, was that I needed an "older version" of firmware to communicate with the XBee module in order to read/write new settings to it.

I could not select the firmware version from the drop down boxes, which indicated that this particular firmware version was not installed on my computer. So here is what I did.

I went back to the Digi site and selected the Firmware update section.

This provided a link to an FTP site with "previous versions" of firmware.

I then selected the relevant firmware version from the list, and downloaded the zip file to a logical folder on my hard-drive.
There is no need to unzip the file, because the X-CTU software will look for a zipped file.

In the X-CTU software, in the Modem Configurations tab, select the "Download new versions button", and select File. Navigate to the zip-file just downloaded and select it.

The software should tell you that it has updated successfully or something to that effect.

The modem type and version should now be an available option in the drop down boxes, however, we will continue where we left off (in step 5) and try an read the firmware settings from the XBee module, by pressing the Read button in the Modem Configurations tab on the X-CTU software.

I don't know the reason why i still cant find the xbee when it is on the arduino shield for the xbee. And I try to use your way to update the firmware. And it doesn't work. I use the xbee S2 zigbee radio. Can you give me some suggestions?

I don't have any code for Arduino XBee communication at the moment,But these sites may be useful:http://arduino.cc/en/Guide/ArduinoXbeeShieldhttp://www.jeremyblum.com/2011/02/27/arduino-tutorial-9-wireless-communication/But - worth looking up info specific to the shield and XBee module you are using.

Unfortunately, I don't have an XBee explorer - and this type of help is best served within a forum.This blog does lend itself very well for that kind of stuff... please post your issue within the Arduino forum and you are likely to get better help than I could ever give.