I'm very new with this devices so I'm a bit confused. I've got two Xbee modules series 1 and an Arduino UNO. I want to make like a chat between the two Xbee modules, one of them connected to the PC through a Xbee Explorer USB and the other one assembled in the Arduino Board through a shield.
I've configured the two Xbee modules with the same PAN ID and Channel, and the Xbee module 1 has MY = 0 and DL = 1 and the Xbee module 2 has MY = 1 and DL =0.
I've connected the Xbee module 1 to the PC through the Explorer and the Xbee module 2 connected to the PC through Ardunino+Shield. I've uploaded the following code to Arduino:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(4, 5); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
mySerial.println("Hello, world?");
}
void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
In my shield the jumper of the RX digital is the 4th pin and the TX jumper in the 5th pin.
When I open the serial monitor window I get the message "Goodnight moon!" but when I send a message from the XCTU console or from the serial window I don't get that message in the other interface (XCTU console or serial monitor window).
In the shield (this one http://www.seeedstudio.com/wiki/XBee_Shield_V2.0) I've 4 leds: first one (power) is on, the second one (signal strength) is off, the third one (association) blinks all the time, and the fourth one (on/sleep) is on.
Why I don't get the messages like a chat? What am I missing?
Thank you!!