Xbee s2c usb serial communication with RPI3 works sometimes in API mode

I am writing C code on the raspberry pi 3 to communication at a 115200 baud 8-n-1 with a USB adaptor to the XBee s2c. The XCTU is running on my laptop and I am sending the correct frame. I am checking them with the Frames Generator in the XCTU. The frames are saves as a unsigned char in c and are sent directly to the xbee.

The rpi3 is sometimes able to read and write to the xbee but the majority of the time it does not work.

How would I be able to fix this.

Additional information
XCTU tells me that every thing is on the network and I can send a frame and received a success obtained response.

What voltage level does the processor run at?

What voltage level are the DI and DO lines at connecting to the XBee?

Are you able to send and receive at lower data rates? Say at 9600 bps?

I am using this adaptor
https://www.sparkfun.com/products/11697
so i do not know the voltage level

I just plug it in to the USB port on the RPI.

I have also check and sometimes the xbee does receive the data but it does not transmit it over the serial port /dev/ttyUSB0 which is the one that the xbee is connected to.

Are you using sleep modes at all?

No their sleep is set to 0. I forgot to say that I have them configured in api mode. There is a coordinator and 2 routers

I don’t believe this issue to be XBee related. More likely the RPi3 flavor and version of Linux you are using, FTDI driver and the FT231X chip on the Sparkfun USB dongle.

Try to lower the baud rate to 9600 and move up to 57600. Does this solve the issues for you?

Solution was found in this https://forums.digi.com/65330/what-does-xctu-perform-while-adding-a-radio-module