XBee S1 communication issue


I have 2 XBee S1 modules configured in API mode 1. XBee module 1 is a transmitter of a signal and XBee module 2 is a receiver of a signal. And the issue is that receiver does not receives anything from transmitter (or so it seems).

Transmitter configuration is this:

AP 1
MY 1
ID 1984
DL 2

Everything else is left by default. Transmitter is attached to XBee Explorer. XBee Explorer is connected to PC via USB.

Following piece of code sends signal each 1 second:

public class Main {

    private Main() {
        XBee xbee = new XBee();
        try {
            xbee.open("/dev/ttyUSB0", 9600);
            final XBeeRequest request = new TxRequest16(new XBeeAddress16(0, 2), new int[] { 1 });

            //noinspection InfiniteLoopStatement
            while (true) {

        } catch (Exception e) {
        } finally {

    public static void main(String[] args) {
        new Main();

Java XBee API library was used: https://code.google.com/p/xbee-api/ And I see TX LED flashing every second.

Receiver configuration is this:

AP 1
MY 2
ID 1984
DL 1

Everything else is left by default. Receiver is attached to the breadboard via XBee Explorer. Continuity test shows that current flows fine between XBee RX and mbed P27, as well as between XBee TX and mbed P28.

And following code on an mbed (LPC1768) runs to receive packets:

Serial terminal(USBTX, USBRX);

while(1) {
    terminal.puts("Reading packet...
    terminal.puts("Packet available

    XBeeResponse response = xbee.getResponse();
    if (response.isAvailable()) {
        char tmp[20];
        sprintf(tmp, "0x%02X", response.getApiId());
        terminal.puts("Response available at API: ");
        uint8_t api = response.getApiId();
        if (api == RX_16_RESPONSE) {
            Rx16Response rx16 = Rx16Response();
            uint8_t len = rx16.getDataLength();
            char l[20];
            sprintf(l, "%d", len);

            terminal.puts("We have data: ");

Popular Arduino/mbed library for an XBee API mode was used. Sources are located here: http://mbed.org/users/okini3939/code/XBee/

And the output of a console is:

Reading packet...

for all times. And RX LED is not flashing on receiver.

The code you are using states that it requires API mode 2 instead of 1. You will need to change your modules AP command accordingly to work.