Problem with Stalker and Arduino Uno communicate through RF XBee S1 Pro Module

I have a problem making Seeduino stalker and Arduino Uno (could be also two Arduino Unos) communicate each other through XBee S1 Pro module. I have made the following setup:

  1. Configure two Xbee modules to communicate (UartSBee with X-CTU software).

Xbee S1 Pro -> Xbee shield V2.2 (Seeedstudio) -> Arduino UNO (Seeeduino-Stalker v3)-> pc -> x-ctu with this configuration :

The program in the arduino should have an empty Setup() method and an empty loop() method.
xbee shield V2.2 have this configuration :

  • jumper between XB_TX and DIGITAL on the line 1
  • jumper between XB_RX and DIGITAL on the line 0

The X-CTU configuration XBee 1 : PAN ID= 3333, DL=2384, MY=86. XBee 2: PAN ID= 3333, DL=86, MY=2384. Made this communication permanent by writing the setting to internal eeprom

Run X-CTU -> it detect xbee and I was will be able to use it through XCTU.

  1. Then, when I want to use my xbee with arduino IDE (in my case Arduino Uno and Seeduino stalker) . I Use UART software to Tx-Rx between Arduino UNO and Seeeduino Stalker with this wire configuration and Software code
  • plug a jumper wire between xbee XB_TX (pin 11 on the Seeedstudio Xbee Shield V2.2) and arduino TX1 (1) and a jumper wire between xbee XB_RX (pin 10 on the Seeedstudio Xbee Shield V2.2) and arduino RX1 (0)

Then, I pushed to code to both arduino and Stalker. Its not working. Here the code

#include <SoftwareSerial.h> 
SoftwareSerial mySerial(10,11); // RX, TX

void setup()
{
    pinMode(0, INPUT);
    pinMode(1, OUTPUT);
    mySerial.begin(9600);         // the Bee baud rate  
    Serial.begin(9600);           // the terminal baud rate  
}

void loop()
{
    if(Serial.available())
    {
       mySerial.print((unsigned char)Serial.read());
     } 
    else  if(mySerial.available())
    {
       Serial.print((unsigned char)mySerial.read());
     }  

}

Any help?

Been ages since I have dealt with Xbee, iirc can you ping them via xtcu? And you have the same code running on both arduino? And the Xbee is expecting that baud rate?

1 Like

@James could you please have a look at this?

Hi.

I played around with two bluetooth modules and two Arduinos to get them talking to each other a while ago and from what I remember I had to connect RX on the bluetooth module to TX on the Arduino and then TX on bluetooth to RX on Arduino.

After I had everything working I replaced the two bluetooth modules with xbee’s and from what I remember everything worked without changes.

Might be worth swapping RX and TX and giving it a go.

Can’t promise it will fix things though.

1 Like