Cannot communicate thru XBees, any help please???

Hi,

I am a newbie to Arduino and Xbee modules.

I'm trying to make my PC talk to my Arduino thru Xbees but not having any luck so far.

Here is the connection and code details.

One XBee is connected to PC using 'USB Explorer Board'.
Sparkfun - sku: WRL-08687

The other XBee is connected Arduino thru a breakout board.
XBee Explorer Regulated - Sparkfun - sku: WRL-09132

Here are my breakout board/Arduino connections
5V (breakout board) --> 5V (Arduino)
GND (breakout board) --> GND (Arduino)
DIN (breakout board) --> TX (Arduino)
DOUT (breakout board) --> RX (Arduino)

Both XBees are configured thru X-CTU as follows.

First Xbee ----- Second XBee

MY = 1A0C ----- MY=1A0D
DL=1A0D ----- DL=1A0C
DH=0 ----- DH=0
PAN=3332 ----- PAN=3332

Then I burnt the following code to the Arduino.

void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("testing...");
delay(1000);
}

Theoretically, I should get "testing..." in the terminal window of X-CTU where the other XBee is connected.
But I'm not getting anything. What I am doing wrong?

Your help will be greatly appreciated. Thanx

A couple of questions.

Are the XBees series 1 models?
What version of the firmware is installed on the XBees?

Thanx Pauls,

I'm using 60mW Pro series and i manage to burn the latest firmware ver 1084 in both thru X-CTU.

for more info about the modues, you can check sparkfun-dot-com with sku: WRL-08742

Should you require any more info, please let me know. your help is truly appreciated.

1084 is nowhere near the latest firmware. I'm running 10CD.

Dear Pauls,

I see following in the firmware version dropdown.

10A1
10A2
10A4
10A5
10CD
10E6 (is this the latest one)?

will changing the version number work in my case?
could there be any other cause?
ya, forgot to mention I am using 9600 baud.

Version numbers are in HEX, so, 10E6 is the latest version.

I'm running 10CD and communicating happily.

I use MY=8001, DL=8002, and PAN=8000 on one and MY=8002, DL=8001, and PAN=8000 on the other.

Try the 10CD version. See if it helps.

Bro, I tried the new version upgrade 10E6 and also used the values you mentioned, but still no luck. here is the pic to show how i connected the Xbee with Arduino. smartlogix-dot-com-dot-sg/xbee.jpg

Please help me out, i am really so puzzled now.

In the picture, the Arduino is clearly powered up. It isn't clear whether any of the lights on the XBee breakout board are on. There should be 4 of them. There is a red LED that should light up when the board is powered. Is that one lighting up?

There are 2 more LEDs that should flash when the board sends or receives anything. There is a red one that flashes when sending and a green on that flashes when receiving. Do those work?

The 4th one flashes on and off at 1/2 second intervals when the XBee makes contact with another XBee. Does that one ever come on?

Dear PaulS,

I've reconnected everything and here is the whole scenario including answers to your questions.

Xbee connected to PC http://www.smartlogix.com.sg/xbee/Xbee-usb.jpg

Xbee connected to Arduino http://www.smartlogix.com.sg/xbee/Xbee-arduino.jpg

Xbee/Arduino connections, code and behavior upon Send/Receive
http://www.smartlogix.com.sg/xbee/Xbee-connections.jpg

Xbee-PC firmware settings http://www.smartlogix.com.sg/xbee/XBee-with-PC.jpg

Xbee-Arduino firmware settings http://www.smartlogix.com.sg/xbee/XBee-with-Arduino.jpg

I think that explains the whole scenario at my end :slight_smile:
Am I still doing anything wrong?

one more question, if i swap RX/TX connections between breakout board and Arduino, may it harm Xbee or breakout or arduino?

Swapping the TX/RX connections will not harm anything. It would be like trying to listen to a microphone while talking into a speaker, but no harm will results.

I'd set SH/SL on both XBees to 0.

SH/SL is Serial number, may it also have an effect on the communication?

btw, all the details i gave you in my previous post, all seem to be the way they should be right? plz comment.

will anybody help me??? or i will have never have my Xbees talk?

The only differences between my configuration and yours is that I'm using firmware version 10CD on the lower power XBees (the non-Pro versions).

It might be worthwhile getting a second WRL-08687, so that you can rule out a wiring problem as a reason why the XBees don't communicate.

Once the two XBees on explorer USB boards communicate, they should still talk to each other when one is on the non-USB board.

PaulS,

Thanx for your advice, I was thinking the same as the last resort. Just that I don't have it available locally, so wanted to save on importing from Sparkfun as the shipment cost is higher than the product cost :slight_smile:

ok, one last question, have you had a look at my connection & behavioural diagram? http://www.smartlogix.com.sg/xbee/Xbee-connections.jpg
I've explained 3 things in this diagram.

  1. Connection between breakout and Arduino
  2. Behaviour of breakout LEDs
  3. Send/Receive code

Does it all seem OK to you?

The code is correct.

If this is connected to the receiver, then some of the lights don't make sense. The DOUT light is the one that should not be lighting up. The DIN light should flash every time the other XBee (the sender that X-CTU is talking to) should be one that flashes.

Swap the roles of the XBees. Make the one that this device is attached to the sender. Since the sender will then not rely on X-CTU for input, the DOUT light should come on pretty steady, since loop is called very fast, and data will be streamed out continuously.

DIN would not light, because nothing is responding to the data being sent.

Dear Paul,

Thanx a lot for your contineous support. I finally managed to get my XBees working. Tried so many things, don't know which one clicked but they are talking to each other now :slight_smile:

Here the changes I tried (may be helpful for someone else)

  • Downgrade the firmware to 10CD
  • gave 200ms delay in each send/receive
  • change baude rate to 19200 from 9600
  • Set Node Discover Option (ND) to '1'
  • Set a Node Identifier (NI) for each Xbee

My guess would be this one:

  • Downgrade the firmware to 10CD

But, it's great that they are now talking. Time to move on to the next phase.