Multiple data packages stuffed into one API frame

I’m new to XBee modules. I have a S2C ZigBee module in transparent mode configured as router. It is connected to Arduino and sends a 30-byte data package every 100ms. The coordinator is in API mode.

In the beginning, everything is fine, one RX frame contains one package. But after a while, I start to see a few packages stuffed into one frame, sometimes there are bytes missing too. Power cycling the router makes the system working normally, but the same problem will arise again later.

What could be the reason of this issue? Thanks.

Check the DL and DH of the router, make sure it is set to the coordinators SL and SH.

Make sure you are using hardware flow control.

Hi mvut, if I have a second transmitter with the same configuration. This issue happens more frequently. Does it mean the transmitter RF transmission speed is not fast enough to send out data from Arduino? Or the coordinator is not able to handle the incoming data packages?

I don’t think anyone can answer that one yet. What is your DL and DH set to on your router? How many hops are there between the router and the Coordinator?

DL and DH on the router are set as SL and SH of the coordinator. I only have one coordinator and one or two routers.

Are you using hardware flow control?

Is the data flowing from the Router to the coordinator or from the Coordinator to the router?

Just from router to coordinator. I don’t have hardware flow control, I don’t send a large amount of data, I assume the module should be able to handle it directly.

Do not assume. You are using a Mesh Protocol. Without the use of hardware flow control, you can over run the buffers very easily.

I’ll try it. Should I have hardware flow control on both coordinator and router or just router?

Just the node that is sending the data. The one receiving it should be ok as long as your processor can handle it.

I’m using Digi XBee Grove Development Board and XCTU to simulate data. I could see CTS indicator in XCTU console flashing sometimes. Does it mean hardware flow control is on?

Yes that should indicate that CTS flow control is being used. Just double check the D7 parameter is set to CTS just to make sure.

Then I have the flow control on. But I still see a few data packages stuffed in one at the coordinator side after a while.

Hardware flow control keeps you from loosing data. It does not prevent multiple packets from being transmitted as one packet over the air.

Then what should be done to prevent multiple packages going into one?

That has to be handled within your applications. Try using a ACK Retry function in your code. That is, don’t send the next packet till you get an ACK back from the first.