Recovering Your XBee

Recovering Your XBee

If you are familiar with XBee, you might have experience with the module not responding to the X-CTU or Terminal program or microcontroller. Yup, for an unknown reason, the XBee module might be DEAD :) But you might be able to revive it by doing recovery.

We have been successful in saving:

But don’t get me wrong, not all dead XBee can be saved, if you supply the wrong polarity of power or higher voltage to it, it’s gone permanently. Never forget that XBee is a 3.3VDC operating module, supplying 5V will surely kill it and this is beyond repair or warranty. The same goes for the wrong polarity of power.

Why your XBee does not respond to X-CTU or your controller? Why it does not respond to your “+++”? Most likely it is due to firmware corruption. Why does the firmware corrupt? Frankly, I do not have the answer to that. My guess, communication fails during the reading or writing of parameters. Though we seldom have this condition, I am familiar with the process because we have several warranty cases which are firmware corrupted and being sent back to us. Well, let me share the procedure with you.

The tools

You will need some tools. Please download and install the latest X-CTU from here, using older X-CTU might work, but the latest will be much better, easier, and reliable.

You will also need SKXBee, we have never used Arduino XBee Shield to load firmware as the shield does not provide an additional connection that is needed for serial firmware upload, which is the RTS and DTR, according to the datasheet of XBee Series 1Series 2 and WiFi. Search for “DTR” in the datasheet and you should be able to get what I mean. SKXBee will provide a simple, ready, and reliable connection from the XBee module to a computer where X-CTU will be running. Don’t forget to get a USB mini B cable for the USB connection.

Not to forget your dead XBee module, I will be using XBee-WiFi S6B for demo purposes, yet I will try to add in the setting you should choose for XBee Series 1, Series 1 Pro, and Series 2 too. By the end of this tutorial, hopefully, you can revive all your XBee modules. BTW, this tutorial and X-CTU is not able to saveBlueBee and WiFly module, they are different manufacturer.

OK, we are going to call the death back :) Insert the XBee module into SKXBee as shown. Please insert it correctly and properly. Please refer to SKXBee User’s Manual for a detailed description.

Make sure the orientation of the XBee module is correct and all pins are fully inserted into SKXBee. Connect the USB Mini B to SKXBee and the other end to your computer with X-CTU installed and running.

If this is your 1st time using SKXBee, you might need to install the USB driver for the onboard USB to UART chip, FT232. Please get the latest driver according to your operating system (Windows, Linux, or Mac OS) from this page, and follow the installation guide.

 

Firing up your X-CTU

Yup, X-CTU is free software from Digi International, the company that designs and manufactures XBee modules. There are two versions of X-CTU generally, of course, the latest version is more user-friendly and reliable :) You should try it. We will be using this software to configure and also manage the parameters on XBee modules, not to forget we are going to recover XBee too in this tutorial.

After X-CTU is running, you will see the initial outlook:

To add the XBee module that you connect to SKXBee, click the “Add Device icon on the right top corner of the X-CTU window, the “Add radio device” window will appear for you to choose the correct COM port and COM properties settings. When you install the USB driver for SKXBee and connect it to the computer USB port, it will be assigned with a COM number. We need to choose the correct COM number for X-CTU to communicate with. If you see several COM ports and you do not know the correct COM number, do not freak out, simply disconnect SKXBee from the USB cable. Click “Refresh ports” and the COM number for SKXBee disappear from the list as it is disconnected. Connect the SKXBee to the USB again and click “Refresh ports”, you should see the new COM port appears, that is the COM port for SKXBee, select it. In my case, only one COM port in the list, so that is the COM of my SKXBee.

Under the Serial/USB port list, you can change the parameters of the COM port such as Baud Rate, Data Bits, Parity, etc. Leave these parameters as it is, and click “Finish”. You will further be presented with “Discovering radio modules…”. The X-CTU is communicating with the XBee module on SKXBee. You will also notice “X_RX” which is XBee’s Receive pin and “X_TX” which is XBee’s Transmit pin, LEDs on SKXBee will blink for a while during the process of discovering radio. Depending on the condition of the XBee module, it may take 3 seconds to 30 seconds to complete the discovery.

 

Healthy XBee

If your XBee module is not dead, and X-CTU manages to communicate with it, you will further be presented with the initial X-CTU window, and new radio appears on the left section of the window. It will display the basic parameters of the XBee module such as Name, Function, and Port. You can further click it and X-CTU will automatically read the necessary configurations from the XBee module and display the configurations on the right section of the window.

In my case, you will see that the product family is XB2B-WF with a 2004 firmware version. You might want to remember this as it is useful if you want to revive your XBee-WiFi module :). You can further change the parameters/configurations under this section to your desired settings.

OK! It seems I have a healthy XBee-WiFi module, is not dead, I cannot show you how to recover it. Let me find a dead XBee module…… OK! Found a dead XBee-WiFi, should I be happy ??

 

Firmware Corrupted XBee

Again, I want to stress, a dead XBee module might be beyond this tutorial to save it. For cases such as wrong power, it is gone forever and you should really buy another one. So always check the orientation, polarity, and voltage before powering up XBee. This tutorial can only help to recover those XBees that firmware is corrupted.

Let’s say your XBee’s firmware is corrupted for whatever reason, you plug the module onto SKXBee, connect the USB, fire up X-CTU and you click the “Add Device” and choose COM number under “Add radio device” window and “Discovering radio module…” appears and the “Action required” pop up! Yes, this means the X-CTU cannot communicate with your XBee module.

By now, SKXBee should be showing “X_RX” LED is active/ON or blinking. This indicates X-CTU keeps sending data to the XBee module but the XBee does not respond.

Now, press and release the reset button on SKXBee. If the “Action required” window disappears, is good news :). X-CTU should be able to communicate with the XBee module and everything goes back to normal. Try a few times if it cannot communicate where the “Action required” window stays.

It would not be dead if it is that easy :) Let’s say you have tried numerous times resetting SKXBee with no luck. Yup, the XBee module seems to be dead, click “Cancel“. The “Device not found” window will appear showing X-CTU cannot find any XBee module connected to the COM port which is the SKXBee.

Click the “Recovery” icon . Or you can click “Cancel” and return to the initial window. Under Tools -> XBee recovery, click it.

The “Recover an radio module” window will appear. This window will appear either you click “Recovery” from the “Device not found” window, or from the initial window (through Tool -> XBee recovery).

In this window, you will need to choose the correct COM port that the XBee module is connected to. You should be able to get the correct COM number from the early procedures of this tutorial. Product family and function set will depend on which XBee module you use, I will list those related modules. Select the latest firmware version for all types of modules.

Product family & Function set

If you are using XBee-WiFi, there are two product families as far as Cytron carries.

XBee-WiFi S6 is an earlier version of the XBee WiFi module. We do not carry this module anymore. Anyway, if you have this module, here are the settings you should select.

Product family = XB24-WF

Function set = XBEE WI-FI

If you have the latest version of XBee WiFi which should be the S6B, here are the settings.

Product family = XB2B-WF

Function set = XBEE WI-FI

OK, you are not using the WiFi module but using the popular XBee series 1 or series 2, do not worry. Here is the setting.

For those that use XBee Series 1 or XBee 802.15.4, the standard version, NOT PRO.

Product family = XB24

Function set = XBEE 802.15.4

For those that use XBee Series 1 (802.15.4) PRO version, here are the settings.

Product family = XBP24

Function set = XBEE 802.15.4

If you are using XBee Series 2, or a.k.a XBee ZigBee:

Product family = XB24-ZB

Function set = ZigBee Coordinator AT (Default)

OK, done the selection of parameters, click “Recover” at the bottom right of the window. X-CTU will start communicating with the XBee module base on your selection and reload the firmware to the XBee. You might again get the message of the “Action require” window, just reset the SKXBee and try again if fail. If the X-CTU is able to initiate the XBee module, you should see the progress bar of the “Recovering radio module” window:

Click “Show details” reveals more info on the process, but this is optional.

Now, leave the XBee module on SKXBee to X-CTU and pray it can recover the XBee module. While the recovery is in progress, the “X-RX” and “X_TX” LEDs will blink continuously; this indicates the XBee module is communicating with X-CTU. However, you will notice the “X_RX” LED is more active compared to “X_TX” LED because the XBee module receives more data than sending data to X-CTU. If everything is smooth, you should see the message “Firmware updated successfully“, you have saved your XBee module, saved money to buy another XBee module, saved the trouble to contact our support team for warranty, saved the work to send it back to us for warranty and also help us to save the time to warranty for you :) Many wins !!

Now, go back to the X-CTU and click the “Add device” icon again and repeat the steps to add the radio to X-CTU. If you fail again, check UART settings such as COM number, baud rate, etc. And if you still fail after checking all these settings, try another SKXBee if you have, one or an XBee module. The last step, please discuss in our technical forum, maybe another forumer has a better solution, and we welcome feedback.

BUY