Xbee using xbee arduino shield cant talk to xbee dongle

Hello everyone,

I am facing a problem of not being able to send out information from xbee arduino shield to the xbee plugged into the laptop using the xbee dongle. Both xbee is not able to send and receive information from both sides. The program that i tried is the one that can be found in https://learn.sparkfun.com/tutorials/xb … ation-test.

Any help will be greatly appreciated.

The codes is as shown below.

/*****************************************************************

XBee_Serial_Passthrough.ino

Set up a software serial port to pass data between an XBee Shield

and the serial monitor.

Hardware Hookup:

The XBee Shield makes all of the connections you’ll need

between Arduino and XBee. If you have the shield make

sure the SWITCH IS IN THE “DLINE” POSITION. That will connect

the XBee’s DOUT and DIN pins to Arduino pins 2 and 3.

*****************************************************************/

// We’ll use SoftwareSerial to communicate with the XBee:

#include <SoftwareSerial.h>

// XBee’s DOUT (TX) is connected to pin 2 (Arduino’s Software RX)

// XBee’s DIN (RX) is connected to pin 3 (Arduino’s Software TX)

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

void setup()

{

// Set up both ports at 9600 baud. This value is most important

// for the XBee. Make sure the baud rate matches the config

// setting of your XBee.

XBee.begin(9600);

Serial.begin(9600);

}

void loop()

{

if (Serial.available())

{ // If data comes in from serial monitor, send it out to XBee

XBee.write(Serial.read());

}

if (XBee.available())

{ // If data comes in from XBee, send it out to serial monitor

Serial.write(XBee.read());

}

}

Exactly which Arduino Xbee shield do you have? There are lot’s of variants of various cloners. This one seems to be deprecated, meaning not on the market anymore. https://www.arduino.cc/en/Main/ArduinoXbeeShield Unfortunately it doesn’t have a picture on the page to identify it.

If it is not this one then please show pictures of it, or post links to the product description page for more details.

If it is this one, then please notice the text in bold from the code you posted. How did you have this set?

Hardware Hookup:

The XBee Shield makes all of the connections you’ll need

between Arduino and XBee. If you have the shield make
sure the SWITCH IS IN THE “DLINE” POSITION.
That will connect

the XBee’s DOUT and DIN pins to Arduino pins 2 and 3.

Can you plug each Xbee module in the USB explorer and have it communicate with the XCTU program on the computer? Can you send AT commands to the one connected to the computer from the Serial monitor of Arduino or XCTU? That is the first step to make it working. Communicating localy.

Did you mess around with the configuration at some point? If so, load the configs of the Xbees to a file and upload it in your next message.