I have serveral XBee modules in a low power sensor design based on the following setup:
XBEE hardware version: 0x1944
XBee firmware: 0x288c (sleeping end-node, AT mode)
SM: 5
SO: 0
SP: 500*10mS
ST: 300mS
SN: 10 (typical)
D7=1 (CTS)
The XBee is conneted to an Arduino Fio as host controller.
The operation is based on the following principle:
Both the Arduino controller and Xbee are in sleep mode. The arduino is wake up by
the On-signal from the XBee at regular intervals (controlled by the SN*SP time)
When the arduino wakes,it starts its data collection routine and, when finished, asserts the DTR (pin 9) to wake the XBee,
When the arduino receives the CTS signal from the XBee, the serial data is sent to the XBee for transmission inn the XBee Radio network.
This seems to work fine for longer periods of time, but after a day or tree, the XBee seems to enter an undefined state.
The XBee can no longer be discovered on the network.
The only way to recover is to cycle power or send a hw-reset to the XBee.
I suspect that this problem is related to receive-buffer overflow. A similar issue is described on stackoverflow
I admit that my serial line CTS handshake can be improved, but my main concern is if a serial buffer overflow can lead to a crash of the Xbee controller.
Is there a better way to do this or is it some kind of workaroud to improve the reliabilty?