I am facing a problem using the XBEE DigiMesh modules. My project consists in several sensor nodes configured as end devices. in each node there is an MCU that handles all the sleep timing (>1min) and sensor data acquisition. Therefore, there are several times that when I wake the XBEE module up, it gives a 'Device disassociated' status preventing me from sending data.
I have already managed a fix for it, which is to always for a reset (AT Command 'FR') and then waits for a 'Device joined network' modem status, only after that I send the sensor data to the coordinator.
Even it is working so far, as I reset the module, it takes a while to reconnect to the PAN and then waste battery, which is a limited resource.
How can I ensure that, whenever I wakeup the XBEE, it always ramains connected to the same PAN?
ps.: I am using the API mode
ps2: I have already tried to request the association indicator command 'AI' to the module, but sometimes it returns 'OK' and then the module sends a 'Device disassociated', causing loss of data.
Any help will be greatly appreciated.