Legacy recovery procedure for ZigBee XBees

This article is an all-inclusive guide for recovering a Digi ZigBee XBee that is in an unresponsive state.

The steps in this article are specifically for ZigBee XBee radios. If you need to perform a recovery on a non-ZigBee XBee, please refer to this article for generic XBee recovery steps: Recovery procedure for XBees

WARNING: Performing a recovery will restore the radio to a factory default state, all settings will be lost.


General Troubleshooting and Prerequisites

Optimizing USB to Serial Port settings
Even when using a Digi branded interface board, it is still possible for a recovery or firmware flash to fail. This is usually because the standard FTDI drivers are not optimized for use with our radios. To ensure you have the most optimal configuration, you must adjust some settings on the driver. Please refer to the following guide on changing these options: Optimizing USB to serial port settings

Ensure the correct version of X-CTU is installed.
All of the troubleshooting steps in this article use the Legacy Version of X-CTU. Legacy X-CTU gives the user more control when performing a firmware update, which is required in many recovery circumstances. The "Next Gen" version of X-CTU does have a recovery feature, but for some of the more intricate steps it may not be sufficient to perform a full recovery of the module.

If you have a programmable XBee, contact Digi Support for troubleshooting. 
The recovery procedure outlined in this article are for standard XBees and other Digi RF products. A programmable XBee has a secondary Freescale processor that takes priority over the module's UART and as a result has to be recovered over-the-air or while in bypass mode. The procedure for recovering a programmable XBee varies depending on the situation, and is best done over-the-phone with a technical support member.
The only way to reliably determine if you have a Programmable XBee is to check the part number. Programmable XBees have an additional "B" at the end of the part number. For example, the part number XBP24BZ7SITB003 would be a programmable ZigBee XBee.

A note regarding USB-to-Serial adapters:
When using an RS-232 interface board or PKG-R modem, there are some known compatibility issues with some brands of USB-to-Serial adapters. This incompatibility may cause the modem to appear to be bad and you will not be able to perform a recovery even if it was working earlier. RS-232 adapters are built with a variety of tolerances and cheaply made ones can cause a recovery to fail.

For example: if a USB-to-Serial adapter has a ±5% discrepancy on the baud rate it operates at, then at 9600 baud, it could be 480 baud off target. At low speeds this is well within what the radio can tolerate and it will function normally. To reflash the radio, X-CTU has to communicate at 38400 baud, a ±5% discrepancy at this speed can be 1920 baud off target, which is enough to cause loss of data during a firmware flash and will cause the radio to be unresponsive.

We do not have a list of known-good adapters, usually ones that utilize an FTDI Chip for the USB-to-Serial conversion have the highest chance of success, Trendnet branded adapters also seems to have a high success rate. If you are using a USB-to-Serial adapter and the recovery process fails, you will want to try a different brand of adapter or, preferably, use a computer with a physical serial port (COM1.)

 

What causes the Action Required box to appear in X-CTU?

  1. The most common reason is because the Digi radio is set to a different baud rate than the PC. Digi radios can be set to a variety of baud rates. Even if you have a radio that has a specific baud rate (for example a 9600 baud XStream) the interface baud rate could be set to any value. If you suspect that the baud rate of the radio may have been changed from default, test all of the available baud rates to ensure this is not the problem. Simply select each baud rate in PC Settings and attempt a test/query for each.
     
  2. Another common reason is that the radio has had a parity bit set, but the PC has not been set to match. This is most common with XStream modems, where parity is set by toggling dip switches 5 and/or 6. You must ensure that the options in PC settings are set exactly the same as the radio you are working with.
     
  3. If you have enabled a Sleep Mode on your radio, it's possible that when you tried to interact with the radio, it was asleep at the time. If you are using a DigiMesh or ZigBee radio, pressing the commissioning button (if available) will wake the radio for 30 seconds. Note that with ZigBee radios, if you configured the XBee as an "End Device", it automatically enables sleep. You can still work with the sleeping radio by enabling hardware flow control, and increasing the response timeout in PC Settings. If you have the CTS line connected, you can see if the radio is in a cyclic sleep pattern by going into the terminal tab and watching the Line Status indicator. If CTS blinks periodically, that indicates that the radio is sleeping: ?
User-added image
  1. Action Required will also appear if you have improperly installed drivers, or have chosen the wrong COM Port. The easiest way to determine if you have the correct COM Port chosen and that it is communicating is to open the terminal tab and type some characters. At low baud rates (9600), the DIN LED on the radio's interface board should flash every time a character is typed. At higher baud rates, you may need to use the "Assemble Packet" option to build a longer string to see the LED flash.
     
  2. The worst case scenario is that the radio has had a bad firmware flash or is damaged. It's unlikely that the radio is "bricked" or in a completely unrecoverable state. Usually we can restore the radio using the steps below to try to default the radio or even force a reflash of the modem's firmware.
  

 

ZigBee XBee Recovery
(Series 2)

To perform most of the steps in the recovery process, flow control lines must be available and connected. This means that you cannot use an Arduino Shield or any other interface that only has DIN and DOUT connected to attempt a recovery.
Digi branded interface boards (XBIB) have a pushbutton labeled reset, use of this button is required to perform any of the following steps. If you are using a third-party interface board (Such as the Sparkfun USB Explorer, or Parallax USB Adapter) then you most likely do not have this pushbutton. In order to perform a reset, you must bridge the Reset pin (Pin 5) and ground (Pin 10). Most of these interface boards have through-holes located on the underside for a breadboard pin header, reset is typically labeled RST, and ground GND. Inserting a wire is not recommended since it usually does not make solid contact for some of the more intricate steps. It's recommended to solder a pushbutton between these two through-holes to make the recovery process easier.
When a step indicates to press the reset button, this implies that Reset pin (Pin 5) of the XBee has been shorted to ground (Pin 10).
The default baud rate for the XBee is 9600 baud. However, this setting can be set to any value, so ensure you have tried all available baud rates before determining that the radio needs a recovery.
Optimizing USB to Serial Port settings
Even when using a Digi branded interface board, it is still possible for a recovery or firmware flash to fail. This is usually because the standard FTDI drivers are not optimized for use with our radios. To ensure you have the most optimal configuration, you must adjust some settings on the driver. Please refer to the following guide on changing these options: Optimizing USB to Serial Port Settings
A note regarding sleeping XBees:
If the XBee module was flashed as an End Device, then sleeping has been enabled by default. The XBee it may appear to be unresponsive since X-CTU expects the radio to be awake when performing any action on the radio. To see if the module is sleeping, go to the terminal tab and watch the Line Status indicator. If CTS periodically flashes, then the module is sleeping and only momentarily waking up.
User-added image
If your module is sleeping, and you attempt to perform a Test/Query or Read/Write to the radio, you will be prompted with the Action Required window. Pressing the reset button or commissioning button (the first pushbutton on an XBIB-DEV board) will wake the module long enough to perform the action. Alternatively, you can enable Hardware flow control and increase the response timeout to a period longer than the radio's sleep cycle.


  The first step is to use X-CTU (Legacy Version 5.2.8.6) to perform a deep recovery of the XBee.
  1. In PC Settings, select 9600 for the baud rate.
  2. Open the Modem Configuration tab.
  3. In the modem dropdown box, select the XBee type you are working with (If you are unsure, the part number is printed on the label located on the RF shield.)
    User-added image
  4. For the Function Set, select "ZIGBEE ROUTER AT" (Even if you need a different function set, it's best to attempt a recovery using this option.) Note, this only applies to the S2 and S2B hardware, the S2C only has one function set.
    User-added image
  5. Click Show Defaults.
  6. Check "Always Update Firmware".
  7. Click Write.
  8. You will most likely receive an "Action Required" prompt, follow the directions in the window and press the reset button. If the "Action Required" prompt appears more than twice during this step or does not go away, then it is likely that the modem is unrecoverable.
  9. You will know it succeeded if the last line of the status prompt located at the bottom of the window says "Write Parameters..... Complete"
    User-added image

  If the above steps failed, there is one last technique that can be tried.
First, we should check to see if the bootloader is present and accessible:
Note: This step is not required, but it does give a good indicator of whether or not the radio can be recoved.
  1. In PC Settings, set the baud rate to 115200. This is the baud rate of the bootloader on the radio.
  2. Open the terminal tab.
  3. Check the DTR and Break checkboxes, clear the RTS checkbox.
    User-added image
  4. Press the reset button on the interface board.
  5. Uncheck Break (leave DTR checked.)
  6. Click in the blank terminal window to give it focus and press the [Enter] key on your keyboard.
  7. A menu should appear with the title of EM250 Bootloader. This means that the radio is functional and we can easily enter bootloader.
If this menu does not appear, this means the interface board you are using does not have flow control lines, you have selected the wrong baud rate, or possibly the radio is not recoverable. Even if this step fails, you should still move to the next step.
Next, we perform the full recovery:
  1. Open the Modem Configuration tab.
  2. In the modem dropdown box, select the XBee type you are working with (If you are unsure, the part number is printed on the label located on the RF shield.)
    User-added image
  3. For the Function Set, select "ZIGBEE ROUTER AT" (Even if you need a different function set, it's best to attempt a recovery using this option.) Note, this only applies to the S2 and S2B hardware, the S2C only has one function set.
    User-added image
  4. Click Show Defaults.
  5. Check "Always Update Firmware".
  6. Leave the USB cable plugged in, and physically remove the XBee from the interface board. Do not worry, you will not damage the XBee by doing this.
  7. Click Write.
  8. You will receive an "Action Required" prompt.
  9. With the prompt on the screen, hold down the reset button while socketing the XBee back in.
  10. Release the reset button.
  11. It may take up to 30 seconds, but the "Action Required" window should close and a progress bar will appear along the bottom.
    User-added image
    If "Action Required" never goes away or you get an error without a progress bar, then the modem is not accepting the firmware, ensure you have the correct modem type selected and try again.
  12. After the progress bar completes, the "Action Required" prompt will appear a second time. Follow the prompt and press the reset button once.
  13. You will know it succeeded if the last line of the status prompt located at the bottom of the window says "Write Parameters..... Complete"
    User-added image

  If this does not work, there are a few additional things to try:
  • Make sure you have the correct COM Port selected.
  • Ensure the XBee is oriented the correct direction.
  • Verify that the interface is working properly by removing the XBee and bridging pins 2 and 3 (DIN and DOUT) of the XBee socket. Go into the terminal tab and type something, you should see every character duplicated twice. If not, then you may have a driver related issue or a problem with the XBee socket.
  • The XBee is a 3.3V only device, connecting 5V to any pin may damage the radio. If you had connected the XBee to a 5V microcontroller or power source, it's possible that the radio is damaged beyond repair.
Last updated: Aug 23, 2018

Filed Under

GatewaysRFRF Dev kits

Recently Viewed

No recently viewed articles

Did you find this article helpful?