Having trouble on receive signal with XBee S1

Hi guys,
I’m trying to measure the RSSI of the frame transmission between two XBee. However, the receiver XBee controlled by Arduino stops accepting message when ‘Serial.begin(9600);’ is compiled. The communication can be happened on XCTU and I send frame from transmitter by using XCTU. Below is the code I wrote for receiver, can anyone check if it’s right?

#include <Printers.h>
#include <XBee.h>

#include <SoftwareSerial.h>
SoftwareSerial seriall(8, 9);
XBee xbee = XBee();
XBeeResponse response = XBeeResponse();
Rx16Response rx16 = Rx16Response();

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
seriall.begin(9600);
xbee.setSerial(seriall);
}

void loop() {
// put your main code here, to run repeatedly:
xbee.readPacket(100);
if (xbee.getResponse().isAvailable())
{
if (xbee.getResponse().getApiId() == RX_16_RESPONSE)
{
xbee.getResponse().getRx16Response(rx16);
Serial.print( rx16.getRssi() );
}
}

}

For addition information, I'm using arduino uno and XBee shield with API 2.

CH and ID are same. DH: other XBee's Serial Number High SL: other XBee's Serial Number Low MY: both are FFFF (and the frame is sent to 16-bit address FFFF)

Hi guys, I’m having same issue here. I’m using XBee connected to Arduino, but the XBee stopped receiving signal when Serial.begin(9600) is compiled. Does that means only one serial can be working at a time? How do I solve this? Here is my code:

#include <Printers.h>
#include <XBee.h>
#include <SoftwareSerial.h>
SoftwareSerial seriall(8, 9);
XBee xbee = XBee();
XBeeResponse response = XBeeResponse();
Rx16Response rx16 = Rx16Response();
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
seriall.begin(9600);
xbee.setSerial(seriall);
}

void loop() {
// put your main code here, to run repeatedly:
xbee.readPacket(100);
if (xbee.getResponse().isAvailable())
{
if (xbee.getResponse().getApiId() == RX_16_RESPONSE)
{
xbee.getResponse().getRx16Response(rx16);
Serial.print( rx16.getRssi() );
}
}

}

Your program gives no clue about how the XBee is connected.

It is not practical to have two instances of SoftwareSerial working at the same time.

It is also not practical to have two devices communicating over HardwareSerial at the same time.

...R

I'm using XBee connected to Arduino, but the XBee stopped receiving signal when Serial.begin(9600) is compiled.

That statement is rubbish. The XBee has NO clue what code is on the Arduino. It did NOT stop receiving data because you changed the code on the Arduino.

What might have changed is that the data it receives is not properly handled by the Arduino. But, without Serial.begin() in the code, you have no idea what the XBee was receiving, if anything. So, how do you "know" that anything changed?

Moderator: it is not nice to "hijack" other person discussion ==> deleted other posts