Using Arduino2009 and XBee module

Hi.
I am pretty new with arduino and already lost !
I have a arduino USB board (2009), the sparkfun USB shield (ref DEV-09063), and a XBee serie 1 module (ref WRL-08665 on sparkfun site).

I can’t manage to get in command mode.

  1. I tried with XCTU software and the XBee module is not detected
  2. I tried with arduino 0017 (code extract below)

Thus I was wondering if the Xbee serie 1 module are compatible with my USB shield. Does any one experimented my problem ?

Or any idea why it doesn’t work with XCTU ?

Do you know any step-by-step tutorial to assemble an arduino2009 + XBEE shield + XBee module Serie 1 ?

Thanks.

Jérémy


Code extract to get command mode with arduino environnement :

#include <XBee.h>

XBee xbee = XBee();
int STATUS_LED = 13;
void setup()
{ xbee.begin(9600);
Serial.begin(9600);
setDestination();
}

void setDestination() {
long count = 0;
// put the radio in command mode:
Serial.print("+++");
// wait for the radio to respond with “OK\r”
char thisByte = 0;
while (thisByte != ‘\r’) {
if (Serial.available() > 0) {
thisByte = Serial.read();
}
if (count++ > 100000){
Serial.print(“Break code”);
break;
}
}
if (count <= 100000) {
Serial.print(“Command Mode OK”);

=> I always get the “Break code” message in the serial display.

Did you remove the microcontroller from your Arduino board when trying to use X-CTU to configure the XBee?

There's some documentation here: http://arduino.cc/en/Guide/ArduinoXbeeShield

Hi. Thanks for your answer, you was right. I had seen the "remove the microcontroller" but was thinking it was the XBEE module.

I just had an issue with the jumpers on the XBEE shield. On the board, it is written XBEE/USB and there is a jumper above and below. For the time being, I still don't know if : - both jumpers have to be moved for switch to USB/XBEE mode - just one jumper is the USB/XBEE switch (but which one ?) And I can't manage to find any reliable documentation on this shield.

If anyone knows more about these jumpers...

Thanks anyway.

Jérémy

First, this tutorial might help:

http://www.humboldt.edu/~cm19/XBee%20setup.pdf

Next, I am also new to the Xbee. I am currently able to send text and digital commands in each direction (Arudino to PC and PC to Arduino) wirelessly.

I am using the shield sold by HVW and Solarbotics (sku51835). This is a common shield and very likely the same one you are using.

Currently I remove both jumpers to program the Arduino and replace them both shifted the "Xbee" side of the header.

Hi jscott.

Well the thing is I am using XBEE Serie 1 module (FCC ID = OUR-XBEE) thus I was thinking these module were easier to set up than the 2.5.

I’ll have a look at your hardware. My real problem with the shield I use is the lack of documentation (or I am too stupid to find it on the web…)

To conclude on the sparkfun usb shield (if it may help someone), here are my tests :

UP JUMPER I DOWN JUMPER I XCTU CONFIGURATION

USB I USB I SUCCESSS

XBEE I XBEE I FAIL

USB I XBEE I FAIL

XBEE I USB I FAIL

NONE I NONE I FAIL (plus a windows
I I usb peripheral recognition
I I problem message)

=> My conclusion : both jumpers have to be switched to either XBEE or USB on the sparkfun XBEE shield.

Thanks.

Jérémy

Mistake with previous message :

Replace "To conclude with the sparkfun usb shield" by "To conclude with the sparkfun XBEE shield"...

Sorry for confusion. :-/

Jérémy,

The Xbee shield sold at Sparkfun:

http://www.sparkfun.com/commerce/product_info.php?products_id=9063

is in fact the very same xbee shield I am using. I am not having any problems sending data in both directions. Admittedly this has only been a string of text from the Arduino to the PC, and a simple led flash respecting the other direction.

As far as difficulty setting up the 2.5 version of the xbee. With X-CTU both xbees were talking PC to PC in five minutes. Arduino to PC took another five minutes.

This is covered in the documentation I linked to http://arduino.cc/en/Guide/ArduinoXbeeShield: "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."

This would be a good time to admit I didn’t know which xbee module I had. In fact I have the series one, not two. :-[

Thank you mellis! I have done more than one search and was not able to find that here on the forum. That is concise, useful and only wish I had sooner.

My apologies for speaking out of turn. I am far too new at all of this to be giving advise. It’s been so exciting to experience these little successes that I got out of hand. :-[