Transmit Request ACKed but not received

I’m using a pair of XBee XB24 with DigiMesh 8062 firmware on both, connected to a Mac via a pair of Sparkfun Explorers. I have a test program that communicates with an XBee, getting local values and then sending a Transmit Request to the other XBee. It gets a success Transmit Status every time. This program runs successfully on either XBee (after swapping addresses).

I have a second “server” program, using the same (custom) library, that queries its own power level to make sure it is communicating and then listens for incoming serial data. While that’s running, I run the test program. Although the test program reports the Transmit Request success, the server XBee never gets a single byte from its serial port.

I expected the Transmit Request data sent from the test XBee to be received in a Receive Packet (or any packet) in the server XBee. Am I misunderstanding or missing something?


I have my answer. Sort of. Digi technical support recommended using a terminal program in place of the server to see if the packet was received, and sure enough, it was. So the problem was mine.

It turns out that the select() I was using on Mac OS X was the problem. I was using it with a timeout value, and once it timed out it never saw any bytes on the serial port again. If it got bytes before a timeout, everything was fine. Well, since I really didn’t need the timeout because I was looping for the packet start byte, I just changed the timeout parameter to NULL (no timeout) and it worked perfectly.