Recovery procedure for XBees

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

If you are using a XBee  ZigBee (labeled S2C, S2B, S2, or Series 2), please refer to this article for more recovery steps specific to that radio type: Recovery procedure for ZigBee 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.

*Please note that a support contract may be required

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 XBee ZigBee as to the part number XBP24CZ7SIT-004.

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 USB-to-RS232 adapters 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 re-flash 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 area of X-CTU 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. As with any sleeping radio, 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, the radio is in a sleep state 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 re-flash of the modem's firmware.

 


 

XBee Recovery

To perform most of the steps in the recovery process, DTR and RTS 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 the Reset pin (Pin 5) of the XBee should be shorted to ground (Pin 10).

The default baud rate for the XBee products 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 sleep mode has been enabled, the XBee 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 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 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. Click Show Defaults.
  5. Check "Always Update Firmware".
  6. Click Write.
  7. You will most likely receive an "Action Required" prompt, follow the directions in the window press the reset button. The "Action Required" prompt may appear more than once, which is normal.
    User-added image
  8. 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.

  1. In PC Settings, set the baud rate to 38400. This is the baud rate of the bootloader on the radio.
  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. 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 inserting the XBee back into the socket.
  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 most likely unrecoverable.
  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. If this has occurred this is not covered under the warranty and you may need to replace the radio.
Last updated: Jan 01, 2024

Filed Under

RFRF Dev kits

Recently Viewed

No recently viewed articles

Did you find this article helpful?