Connect to XBee using X-CTU while it's in sleep mode

Hi everyone,

I have bought 2 XBee Pro S2B modules with wire antenna, which I want to make communicate with each other in API mode (I want the extra functionality of API). So I first tested them in AT mode, everything working fine, and then loaded the API firmware into them (one coordinator, one end device).

And now we have the problem: X-CTU constantly loses connection with the end device, terminal operations are not working, and most of the time XCTU doesn’t even find the module.

After a lot of searching (2 cables, two USB connection modules, swap firmware between modules, …) I found out that the cause is the Sleep Mode setting, which is defaulted to “4” (cyclic sleep) in API end devices. If I set this to “1”, everything works fine.

So, my questions:

  1. Am I the first one having this? Loading new firmware into an XBee modules makes it unresponsive to XCTU because of the default settings –> this doesn’t seem like intentional behavior to me.

  2. I was lucky to be able to change the parameter, but you have to be quick. Can I avoid this in the future?

  3. The end device will be battery operated, so can I test the modules with the end device in sleep mode, using XCTU? Or can I even configure the end device to cyclic sleep using XCTU? As soon as I do this it will constantly lose connection and I will quickly come into a situation where I need to recover the module (already had to do this tens of times).

Kind regards,
Davy Van Rossem

P.S: I use the newest XCTU version and this connection module:
https://www.sparkfun.com/products/11812

A module put into Cyclic Sleep mode will be unresponsive when the module is asleep, by design.

Since there is no way around this, the best thing to do would be to do your network design/debugging with the XBee nodes on a powered XBIB development board (or similar), with the module set for SM=0 during your testing phase.

This allows you to configure things like PAN ID, SC, and other desired parameters while the XBee is awake and responsive. In that way, when you set the module back to cyclic sleep (SM=4), all of the necessary parameters are already in place.

My problem will arise when the module is broken and needs to be replaced. I want our maintenance crew to be able to do that, but it would be useful if they can configure a module from scratch. Problem is: when they load the API firmware, they will have to be lucky to be able to change the SM to 0, because the default is “4” and it will sleep after only 1.5 seconds. Sometimes it works with module reset, sometimes it doesn’t.

Can I save my firmware with updated settings (SM=0 & others) so they can load that firmware inside the module? I can then put the module into SM=4 once it’s connected to the Arduino, using an AT command API frame.

You might want to setup your custom settings on a module and save them, then save a backup of those settings in the form of a Profile. You could later use the “Load” function of XCTU (or over the air) to load that Profile on other module(s).

As for the “sleeping device” issue, I’d recommend taking a look at the XBee ZB Product Manual. Specifically, take a look at the Commissioning Button guidance concerning the different means of the button press (CB=1 will wake an End Device for 30 seconds) and using pin 20 to ensure you have a Commissioning Button as part of your design.

So, if a zigBee is in sleep mode and D0 has not be set to 1, the module is useless. The commissioning button cannnot work. Or there’s another way round?