Xbee Communication with my PC


I am currently trying to communicate FROM my laptop TO my arduino uno and have it working backwards. When I type in the serial monitor the text shows up in X-CTU (listening to the Xbee connected via USB to my laptop) but when I type in X-CTU the arduino serial monitor completely ignores the message. I am wondering why this isn't working both ways? My code is quite basic, but is below:

void setup()

void loop()
  while (Serial.available() > 0)
    char serialByte = Serial.read();

In the image above, I typed "Hello World!" in the arduino serial monitor and it showed up in X-CTU just fine, yet when I typed "Goodbye Moon" it does not show up in the serial monitor.

This has been puzzling me for far too long now...hopefully it makes sense to someone out there. Thanks in advance for any help!

What kind of XBees are you using? How are they configured?

The Xbee's we are using are series 1, we ordered two of these: XBee 1mW Wire Antenna - Series 1 (802.15.4) - WRL-08665 - SparkFun Electronics

One is connected via this dongle: SparkFun XBee Explorer Dongle - WRL-11697 - SparkFun Electronics and the other is connected to my arduino uno via this shield: http://www.amazon.com/dp/B006TQ30TW/ref=pe_175190_21431760_cs_sce_dp_2

The PANID they are using is 1111, and ATMY/ATID are 1001 and 1000 (and set up that they are opposite of each other).

Hopefully that paints a clearer picture of this. If not, just let me know what other info you would find useful.

Thanks for the time! :slight_smile:

I edited the first post a bit to hopefully make the wording less confusing (and to make it better match the picture). If anyone has any insight as to why these aren't communicating properly I would greatly appreciate the help. Thanks in advance!

Hello once again everyone.

I am still having trouble getting my laptop to talk to my arduino via serial through the xbees, and I think I have boiled down the problem to one of two areas of concern.

The first is that I have no actual program sending the serial to the arduino. I'm not sure if using PuTTy/X-CTU's terminal feature is enough to send serial to my arduino or if I need to write/implement a C++ program similar to this one: Arduino Playground - CPPWindows

The second area for concern is that my Xbee Shield doesn't allow my Xbee radio to sit flush to the shield as shown below:

However the red light on the shield flashes once I lay the Xbee radio into the shield, as shown here:

I have checked pins 2 & 3 of the radio and they are connected (they are Rx and Tx I believe) yet pin 20 for instance is not connected. Which pins are vital for communication?

Also, here's a pic of the other Xbee connected via USB to my laptop:

It's red light is always on.

I would greatly appreciate any insight as to what I am missing. Thank you!

Do I need to have a C++ program to send serial from my Windows 7 PC to my arduino?
What pins on the Xbee are vital to communication?

Just a comment on the shield. If it came pre-assembled, I'd send it back. The XBee should seat completely. If too much solder is applied to those 2mm sockets, it can wick up into the contact area and prevent the XBee from seating properly.

The antenna is shipped bent down against the board. For the best signal, carefully bend it up until it is perpendicular to the top of the XBee.

Thanks for the tips, I am in the process of contacting the company for a replacement.

Is it possible that because it isn't seated properly the shield will only allow the Xbee to send but not receive serial data?

I've now replaced the shield and the chip fits just fine now: http://i.imgur.com/5L1hP.jpg

However I am still having the same issue. Going to try replacing the board this weekend, unless anyone else has any other suggestions?

Thanks everyone for reading!

After much searching I have solved my problem, it was due to the jumpers on the board being in the wrong position (duh): arduino - Xbee Shield - Turning jumper settings into ON/OFF (XBEE/USB) manual switch - Electrical Engineering Stack Exchange

I had them in the "USB" setting, not the "Xbee" setting. Now it works. I don't know what the "USB" setting is for, but I am avoiding it for now.

I don't know what the "USB" setting is for, but I am avoiding it for now.

The USB setting is so that you can upload sketches to the Arduino without having to remove the XBee shield.