I am starting with this xBee thing and I am very confused.
First I would if someone could share some more comprehensive reading material about this subject.
All that I found is so incomplete and sparse.
I mounted an xBee 802.15.4 in a breakout board and connect RX and TX with TX and RX from the arduino duemilanove.
I plugged the xStick 802.15.4 in the laptop, started xCtu and configured it as coordinator.
I try Remote Configration but it detects nothing, no one node.
How could I be sure the xBee is working or is misconfigured?
I uploaded this program to arduino: #include <NewSoftSerial.h>
// For the electronic wiring , you should :
// Connect pinRx to the Pin2 of XBee(Tx , Dout)
// Connect pinTx to the Pin3 of XBee(Rx , Din)
// Define the pins on Arduino for XBee comminication
uint8_t pinRx = 2 , pinTx = 4; // the pin on Arduino
long BaudRate = 57600 , sysTick = 0;
char GotChar;
// Initialize NewSoftSerial
NewSoftSerial mySerial( pinRx , pinTx );
void setup()
{ // You shall see these messages in Arduino Serial Monitor
// This part is the official library , it will be used for talking to
// PC serial port
Serial.begin(BaudRate);
Serial.println("XBee Communication Test Start !");
Serial.print("BaudRate:");
Serial.println(BaudRate);
Serial.print("NewSoftSerial Rx Pin#");
Serial.println(pinRx,DEC);
Serial.print("NewSoftSerial Tx Pin#");
Serial.println(pinTx,DEC);
// This part is the NewSoftSerial for talking to XBee
mySerial.begin(BaudRate);
mySerial.println("Powered by NewSoftSerial !");
}
void loop()
{
sysTick++ ; // a system timer
/* //for debug
Serial.print("Xbee Timer :");
Serial.println(sysTick);
mySerial.print("Xbee Timer :");
mySerial.println(sysTick);
*/
// Monitor Rx from PC , if the data is available then read
// it to "GotChar". Then ask XBee send the data out
// wirelessly.
if ( Serial.available() ) {
GotChar = Serial.read();
mySerial.print(GotChar);
}
// Monitor data from XBee , if the data is available then
// read it to "GotChar". Then send it back to PC.
if ( mySerial.available() ) {
GotChar = mySerial.read();
Serial.print(GotChar,BYTE);
}
}
According to the Geting Started Guide from Digi, is possible remote configure a xBee.
My problem is that I cant detect the remote xBee and dont how to track what is wrong.
Finally I got comunication between the XBee and XStick.
I have changed the pins from rx (0) and tx (1) to 5 and 6 respectively, just because these are free.
Changed the baudrate in XStick, softserial, com port monitor and XCTU to 9600.
The rest of the setings are default.
It works perfectly, I type ascii into the XCTU terminal and it appears into the Arduino COM port monitor and vice-versa.
By the way I still cant configure the Xbee remotely. Will try again with the correct baudrates.
Thanks everybody.