I have the hardware set up and communication between two Arduino UNO each with a Sparkfun Xbee Shield. All radios are XBee Series One. The radios were not reconfigured, just used right out of the box. A third radio is connected to a PC (Sparkfun XBee Explorer) running X-CTU to monitor that the Tx is really sending data (and it is).
Both Tx and Rx are using sketches and the Xbee library from GitHub - andrewrapp/xbee-arduino: Arduino library for communicating with XBee radios in API mode by Andrew Rapp.
The issue is that the Rx ignores the incoming messages. I have modified the Rx code to trap this error. I discovered that this works:
void loop() {
xbee.readPacket();
if (xbee.getResponse().isAvailable()) {
// got something
flashLed(LED_0, 1, 100);
...
}
}
LED_0 blinks on every Tx
But the next line of code does not make the LED blink at anytime.
void loop() {
xbee.readPacket();
if (xbee.getResponse().isAvailable()) {
// got something
//flashLed(LED_0, 1, 100);
if (xbee.getResponse().getApiId() == RX_16_RESPONSE || xbee.getResponse().getApiId() == RX_64_RESPONSE) {
// got a rx packet
flashLed(LED_0, 1, 100);
...
}
}
}
Any hints on why the Rx can't find an "rx package"?
Thanks In Advance,