Tuesday, November 13, 2012

XBee Obituaries: XBee Returns from the Grave!

XBee: Deceased......or so I thought

You spent hours configuring these modules to work together, trying to get data from sensors or
other I/O devices back to your computer and parsed out as useful information. You decide you don't like the current XBee modules firmware and have seen other versions available that are newer and offer more functionality. You download the new version and then go to flash it to the XBee and BAM!, the module dies.....or so you thought.

Good news. The module can be recovered.....well, most the time. There are cases when the module really is dead.
But let's look a look at a few methods used to recover a "DEAD" module.

Required Hardware and Software

-X-CTU Version sure you choose the option to check the website for updates. This will make sure you have the latest versions of the firmware available for you to write to the modules)
-Applicable USB drivers (if using a USB interface board)
(Drivers can be found on at the following web page: XStream USB drivers)

-"Dead" XBee module
-USB or Serial Interface board (available from Digi or Sparkfun)
note: Digi interface boards are more expensive, but take out the X-factor due to the "known to work" status. I would suggest the USB interface board from Digi. It was the easiest to work with. It's part number is XBIB-U and can be purchased from distributors such as DigiKey, Mouser and directly from Digi, which requires you to call a sales rep.
-USB or Serial Cable

Module Recovery

At this point, you should have all the hardware ready to go. The software should be installed and up-to-date.

  1. Connect the interface board to the computer via appropriate cable (USB or Serial) (If using Serial, connect power as well)
  2. Make sure the XBee module is NOT plugged into the interface board
  3. Open the X-CTU program and select the proper COM port.
  4. The first screen you see in on the PC Settings tab. On this tab please change the baud rate to 38400 and put a check in the "No Baud Change" check box.
  5. Navigate to the Modem Configuration tab
  6. Select the proper modem type, function set and firmware version from the 3 drop down menus located about 1/3 of the way from the top of the window.
  7. Click on the Show Defaults button and put a check in the "Always update firmware" check box.
  8. Click on Write. (Yes, the module is NOT plugged in) An Action Required box will appear. This is good. When this happens, hold in the config/reset switch on the interface board and CAREFULLY plug in the module and then release the config/reset button.
  9. You should now see that box disappear and a progress bar will appear along the bottom of the window. You will see the bar progress and then the box will appear again. This is good. Just hold in the reset switch on the interface board for about 1-2 seconds and then release. The box will disappear and the status at the bottom of the window will show that the write was complete.
  10. Go back to the PC Settings tab and change the baud rate back to 9600 and uncheck the "No baud change" check box.
  11. Click the "Test/Query" button. You should get a clean bill of health.

*Note: There may be times when this process fails. Sometimes simply using a different computer with the afore mentioned tools yields success.

Personally, I have found this process to be the most successful at recovering modules.
Please let me know if any of you have had other experience with recovering modules. This is a blog all about using and understanding these radios that can be quite useful.

**If you are trying to recover an XStick, you will need to make a modification.  This will void the warranty, however.

You can add a reset button as shown in the picture below: