Home/Support/Support Forum/XCTU does not send to remote Xbee

XCTU does not send to remote Xbee

0 votes
Hey Everyone I hope you are all well.

I am trying to establish communication between xctu/xbee/arduino.I have 2 XBEE PRO S2C.In AT mode.First xbee connected to the pc via usb and the remote one connected to the arduino.

I can receive message from arduino but I can not send from xctu to arduino.(DH/DL values set properly in both xbee's)

Here is my code
char letter;

void setup() {
Serial.begin(9600);

}

void loop() {
Serial.write('a'); //received by xctu
delay(400);

if(Serial.available())
{
letter=Serial.read();
Serial.print(letter);
}
else{
Serial.println("Serial not available");//Alwaysappears.
}
}
Thank you
asked Dec 8, 2016 in RF Solutions and XBee by YusufTopal New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

0 votes
I have no experience with Arduinos, but shouldn't the code be something like this instead?

while(Serial.available())
{
letter=Serial.read();
Serial.print(letter);
}

Also, make sure that the data lines are connected properly.
http://www.digi.com/resources/documentation/DigiDocs/90002002/default.htm#reference/r_zb_pin_signals_th.htm
answered Dec 8, 2016 by DystopianFerret Veteran of the Digi Community (368 points)
Thank you for your interest,unfortunately it is same with while(Serial.available()).

I did data line connections properly.I double checked.
Have you checked the github library already?

https://github.com/digidotcom/XBeeArduinoCodingPlatform
What I would suggest is that you try two things.  

First, run a range test on the two radios to the loop back cluster ID.  This will verify that the two radios talk to each other.

Assuming that works, then remove the radios and just run jumper wires from the PC to the processor.  Then use XCTU's terminal to send data to the processor via the port. This will allow you to verify that your code works.
...