XBee S2 delayed packets?

I bought two Xbee Series 2 (ZB) with an Arduino Shield and a XBee Explorer USB.

I’ve set up the two XBees and they are communicating.

The problem is, sometimes it takes a long time until the packets are received.

In the attached image a simple example is set up where I, from processing, send an integer via Xbee to an arduino with Xbee.

Every time an int is sent I print the int in processing. As soon as Arduino reads anything from the Xbee it sends the read byte. In processing anything received by the Xbee is written each 500 ms.

So the output would look like this:

59-61

60-62

61-63…

Any ideas on what might cause this problem.

http://aldmeris.com/PacketDelay.png

//Blom

I had a similar issue. I had to disable SLEEP modes. I noticed when the S2 xBee goes to sleep or wakes up from sleep, it causes spontaneous packet loss or random data during wakeup. my program crashed several times before i finally had figured out what it was.

Thank you for your answer.

I tried changing the Endpoint device to a Router and then setting sleep mode (SM) to 0.

Unfortunately that did not solve my problem.

The X-Bee setup is One Coordinator AT and One Router AT which both are reset and has the same PAN ID. Is there anything else I must setup? I haven’t found an easy way to setup point-to-point with my ZB pro.

I asked Digi and with there great support I got the answer in a couple of minutes.

Changing the Coordinator from broadcast mode to unicast mode made all the difference!

Problem Solved