# Newbie Xbee communication issue

**URL:** <https://forum.arduino.cc/t/newbie-xbee-communication-issue/581199>\
**Category:** Networking, Protocols, and Devices\
**Created:** [March 21, 2019, 6:04pm UTC](https://forum.arduino.cc/t/newbie-xbee-communication-issue/581199 "2019-03-21T18:04:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bisctboy](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@bisctboy](https://forum.arduino.cc/u/bisctboy)\
**Post date:** [March 21, 2019, 6:04pm UTC](https://forum.arduino.cc/t/newbie-xbee-communication-issue/581199/1 "2019-03-21T18:04:53Z")

</div>

I just received 2 Xbee series 1 units yesterday. I downloaded the XCTU software and followed the Sparkfun tutorial ( [XBee Shield Hookup Guide - SparkFun Learn](https://learn.sparkfun.com/tutorials/xbee-shield-hookup-guide) ) for setting up the Xbee shield and Xbee Explorer. Everything worked correctly and whatever I typed in the Arduino serial monitor gets sent to the XCTU monitor. The same is true from the XCTU monitor to the Arduino serial monitor.

I now want to take it a step further and have 2 Arduino's talk to each other over the Xbee modules. This is where I am having the issue and can't get it to work. I spent last night and this morning researching and trying to get it to work with no luck. My setup is this:

Arduino #1 hooked up to my computer with the below code:

#include \<SoftwareSerial.h\> // SoftwareSerial to communicate with the XBee's

SoftwareSerial XBee(2, 3); // RX, TX

void setup()  
{  
XBee.begin(9600);  
Serial.begin(9600);  
}

void loop()  
{  
if (Serial.available())  
{  
XBee.write(Serial.read()); // Data comes in from serial monitor, send it out to XBee  
}  
if (XBee.available())  
{  
Serial.write(XBee.read()); // Data comes in from XBee, send it out to serial monitor  
}  
}

Arduino #2 hooked up to a 9V battery with the below code:

#include \<SoftwareSerial.h\> // SoftwareSerial to communicate with the XBee's

SoftwareSerial XBee(2, 3); // RX, TX

void setup()  
{  
XBee.begin(9600);  
Serial.begin(9600);  
}

void loop()  
{  
if (Serial.available())  
{  
XBee.write(Serial.read()); // Data comes in from serial monitor, send it out to XBee  
}  
if (XBee.available())  
{  
Serial.write(XBee.read()); // Data comes in from XBee, send it out to serial monitor  
}  
Serial.println("Xbee");  
delay(500);  
Serial.println("Communicating");  
delay(500);  
}

Obviously the setup has the remote Arduino #2 sending data that should be able to be read over the local Arduino #1 serial monitor.

On both Xbee's the settings are identical...CH = C, ID = 3332, DH = 0, DL = 0, MY = 0. I did not change anything else on the configurations in XCTU.

What am I doing incorrectly?

Marshall

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 11:14am UTC](https://forum.arduino.cc/t/newbie-xbee-communication-issue/581199/2 "2021-05-06T11:14:56Z")

</div>

Closed on May 6, 2021, 11:14am UTC


