Xbee PRO -- Without any shield

Hi everyone! :slight_smile:

I'm trying to send data between two Xbee PRO S1, so far without success.

I'm using:

Details:

  • I configured both Xbees using X-CTU and following the library's guide (GitHub - andrewrapp/xbee-api: Java library for communicating with XBee radios)
  • Both Xbees are powered by 3.3V pin in each Arduino.
  • Only 4 pins are connected between each Arduino and each Xbee (+3.3V,GND,TX,RX)
  • Using code examples of Beta0.4, just changing setSerial(X) for the one corresponding and adding a few lines to print to serial monitor in PC.

What happens so far:

  • When sending from End Xbee to Coordinator Xbee, End Xbee gets back the signal meaning that Coordinator Xbee has received the data, but when trying to read that data from Coordinator Xbee, I can't. Function xbee.getResponse().isAvailable() will not activate.
  • When sending from Coordinator to End, I doesnt work at all, not even gets the success message of comunication. (I must check this in more detail).

What I think could be the error:

  • Seems like Serial communication between Coordinator Xbee and arduino is not working.
  • Xbee broken?
  • Bad configuration of Xbees?
  • Need to connect any more pins? Anything that the shield does that I am not doing?

Is it possible to check that both Xbee work fine using X-CTU software? Connecting Xbee directly to PC using FTDI USB (as I did when configuring them). If so, how?

How could I check if serial communication between Xbees and arduinos is working?

Any idea? Am I missing something? Many thanks! :slight_smile:

PD: If code is of any help, tell me and I will upload it, but it is the one from the examples, but putting my Serial port and sending constant data.

I am using arduino due with xbee module.
You said that you had changed software serial lines in the code to the correspondant ones.
What did you meant ??
In fact verifying xbee example i have an error : "/arduino-1.5.2/libraries/SoftwareSerial/SoftwareSerial.cpp:41: fatal error: avr/interrupt.h: No such file or directory
and i don't know how to make my xbee communicate! :frowning:

Would you help me if you have an idea about it.
I'll be very grateful !!!!!!!!!

Thank you !!!

luis, S1 modules do not use coordinators as far as I know, so maybe you are looking at
the wrong datasheet.

nuss, I have not used the DUE, but looking at the schematic, it appears to have 3 RS232
"hardware" UARTs, so you should not be using SoftSerial, but rather defining multiple
Serial objects, for instance, as shown in the IDE "File > Examples > 04. Communications

MultiSerialMega" sketch,

void setup() {
  // initialize both serial ports:
  Serial.begin(9600);
  Serial1.begin(9600);
}

I am so sorry for my late answer... I thought I would get notified as soon somebody answered... that did not happen.

@nuss
If you are using the new version of Xbee library (beta 0.4), they added an option to declare what serial object you are using to communicate with the xbee, it doesn't matter if it is a hard serial or soft serial, and you have to initialize it first like oric_dan said.

@oric_dan
I haven't had time to look more into this thing with the xbees, but I understand that, in order to use the Xbee library, I have to set my xbees to "coordinator" and "end". The library says in works with S1 at the top of its website: GitHub - andrewrapp/xbee-arduino: Arduino library for communicating with XBee radios in API mode

Thank you for your answer and I will post something as soon as I figure it out.

S1 modules don’t need a coordinator, they just work right out of the box, defaulting to
9600 bps. If hooked up properly, they instantly communicate.