How to reset

I’m putting the final touches on some XBee Series 1 sensors which will spend most of their time asleep. Because they’re almost always asleep, this raises the question of how to reset them. This might be necessary if you want to change the PAN ID, for instance.

Ideally, it would nice if the sensors had a “reset to factory” button, but that does not appear to be possible. There is the ATRE command which does reset the XBee in the way I would like, but if the module is asleep, the command won’t be received.

I see three possible solutions:

(1) If you want this kind of reset, remove the XBee from the sensor then use XTCU and some kind of “XBee Expolorer” as the interface to XBee. Taking the sensor apart and putting it back together this way is hardly ideal.

(2) Use SM=4, and have a “Cyclic Sleep Coordinator” send the ATRE wirelessly. I think this would work, although it appears that the remote/sleeping unit would use more power each time it wakes up because it always checks whether there’s a message waiting for it, and that must take time, during which the XBee is using 50mA instead of 50uA. Since the only message that will ever be waiting for it is ATRE, this wastes precious battery power.

(3) Use SM=5 along with a button that sets Sleep_RQ (pin 9) LOW. Attach the sensor to a central unit using pins 2 and 3 for serial communication, de-assert Sleep_RQ, and send the ATRE command over the serial lines. I like this solution best, but it appears that Sleep_RQ is edge-triggered and not level-triggered, so it’s not clear whether there would be sufficient time to send the ATRE over a serial line, particularly if ST=0 and SO=1 (to save power). The guard time alone (on the ‘+++’) seems to preclude this approach.

Certainly, one solution would be to incorporate an XBee Explorer like device in the sensor, and another would be to control the XBee using a separate timing circuit along with SM=1 or 2, but that adds to the complexity and expense of the sensor.

Is there some other way to accomplish this goal?

Still looking into this, and it seems like a common question, but with no clear answer that I have found.

However, looking at the schematic for the Explorer sold by SparkFun, it looks like the only pins the Explorer interfaces with are the four obvious ones:
1, 10, 2, 3 – power, ground, DIN and DOUT
along with
RTS (16)
CTS (12)
DTR/SLEEP_RQ (9)

So, is there some magic combination of RTS, CTS and DTR that would wake up a sleeping XBee and allow it to be sent an ATRE?

Something that may work is for you to use over the air commands to set the SM command but don’t write that command to flash. This way, you can use the reset line to wake the module and turn off the sleep function.

That’s rather clever, and it would do the trick. It does mean that you would have to reprogram the sensor every time you replace the batteries, but it’s a trade-off.