How can we avoid the TransmitException when writing to the channel.

We are using XU-A11 X-STICK 2.4GHZ USB TO XBEE and XU3-A11 XBEE3 USB ADAPTER sticks. And the xbee-java library version 1.3.0

We created a test where we send the same data every 100ms. We see that we get the TransmitException about once a minute.
Detail of the exception: “There was a problem transmitting the XBee API packet. > Error: No acknowledgement received (0x01)”

Is there a way to avoid getting this exception?

Code snippet:
while (true) {
localDevice.sendData(xBee64BitAddress, data);
serialPort = /dev/ttyUSB0
baudRate = 9600
dataBits = 8
stopBits = 1
serialParityConfiguration = NONE