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.
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.
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.