Receive XBee data on Arduino Uno

Hi,
first of all my apologies if an answer to my question has already been given in a previous post. I did a lot of research but didn't quite find an answer for what I'm trying to do.

I'm working on a project where i need to generate data frames with a microcontroller, the PIC18F2550 to be precise. These frames are sent to a first XBee S2 module which is configured in API 2 mode and as Coordinator which is connected to the PIC.

This first XBee then needs to transmit wireless to a second XBee module also configured in API 2 mode but as End Device. This second XBee is connected to an Arduino Uno Board.

The set up can be found as attachments to this post, which will hopefully be clear enough.

Maybe it's good to mention that I don't need to send anything from the arduino, the arduino only needs to receive data. Sending is done with the PIC.

Also, I've tested if I'm sending out the data correctly using a logic analyzer connected to the Tx pin of the PIC and it was correct. So I think the problem must be in the receiver code..

The code in my Arduino sketch currently looks like this:

#include <SoftwareSerial.h>
#include <XBee.h>

SoftwareSerial soft(10,11);// RX, TX -> XBee Serial
XBee xbee = XBee();
XBeeResponse response = XBeeResponse();

// create reusable response objects for responses we expect to handle 
ZBRxResponse rx = ZBRxResponse();

void setup() {
 
  // start serial
  soft.begin(9600);   // Initialize serial port XBee
  Serial.begin(9600); // Initialize serial port PC
  xbee.setSerial(soft);
  Serial.println("Starting up!");
}

// continuously reads packets, looking for ZB Receive or Modem Status
void loop() {
    char byte;
    if(soft.available()>0){
      byte = soft.read();
    }
    Serial.println(byte,HEX);
}

When I open the Serial Monitor it keeps printing zero's and not the data I'm trying to send.

I've also tried to use a code like the one I found here: Communication between Raspberry Pi and Arduino using XBee | Sony Arouje
But I'm getting no results in the serial monitor :confused:

Hopefully I didn't forget to mention any details that are important and I hope someone will be able to help me out as I've been stuck on that for a while now :confused:

Sender.jpg

The pins you have chosen for the softserial don't match up with your wiring diagram.

Start from scratch, disconnect the microcontrollers and get xbee to xbee communication working using 2 USB adaptors and the XCTU program.