Introduction: Configuring Xbees
Xbees are possibly the coolest little wireless units since bluetooth. These things work right out of the box, talking to one another with ease. If you haven't worked with Xbees yet, it's ok, I will be discussing them in a later instructable. For now this is meant for people that have worked with the Xbee at least a little bit. Changing settings in your Xbee is vital when working in certain environments, and with specific projects. In this Instructable we will be discussing Changing the baud rate. This is important if certain components of your project require a different baud rate than 9600. We will also go over changing channels so that you can make a completely separate communication channel.
Step 1: Welcome to XCTU
To get started we need to download a program directly from Digi, the manufacture of Xbee modules. The program is called XCTU, and can be downloaded here.
XCTU Download Site
Once you have downloaded, and installed XCTU open it up, and plug in your Xbee explorer.
For this Instructable I will be working with the up coming Sparkfun release, the Xbee dongle.
Step 2: Working With XCTU
Now that we have XCTU installed, and ready to go, let's take a moment to look around.
The main window has a row of tabs across the top. The main tabs that we want to focus on for this instructable will be PC settings, and modem configuration. Since we will discuss those in more detail later, let's take a moment to look at the other two.
Range test, and Terminal.
Range Test is a built in test to check your xbees communication range. This is useful to check range in different locations, and situations. A range will vary based on the materials that it has to transmit through. 1 mile of clear, direct line of site range will not be 1 mile of range through walls, and buildings.
The Terminal is another option for serial communication. A nice way to double check all of your serial communication within XCTU.
To be honest, I never use these tabs. If I need a terminal, I prefer HyperTerminal, a built in terminal included with all Windows Xp computers. It's under your start menu/all programs/accessories/communication/hyper terminal.
Range test seems useful, however, I have yet to use it.
Step 3: PC Settings
PC settings can be your life line. If something has gone wrong and you fear that your xbee is fried, PC settings is the place to test the true fate of your failing xbee. Also make sure you read the last step that details attempting to fix a bricked xbee.
This is also a great place to check your baud settings. If you have changed your settings, and are not sure which xbee has which setting, you can test this here.
To begin, let's just talk about a brand new Xbee. More than likely your Xbee still has the factory settings if your reading this. So you should be set to a 9600 baud. No flow control. Data bits 8. No parity. With 1 stop bit. If you look at the right side of the XCTU window, you should see this as your standard settings. Click the Test/Query button. If your test pops up a window that says some information about your Xbee, your set. If not, somethings wrong.
If you popped up with an error, in the PC settings, double check your old settings. If that doesn't work, double check your new settings. You may also try the directions to unbrick an xbee later in the instructable. If this still doesn't come up with anything, remember exactly what you did, and contact Digi tech support. They should be able to help you out.
Step 4: Time for Some Modem Configuration
Let's start with a moment of caution. While this won't likely cause issue with your Xbee, sometimes things go wrong. If your computer doesn't complete the process and messes up during a modem configuration update, it can completely lock up your xbee. This is a rare issue, but can happen. So be careful. Close all unneeded programs. When changing settings, just focus on that. Don't mess with other stuff. It will help you to avoid mistakes, and errors.
Once you have the proper settings in PC settings, you can click over to the Modem Configuration. You will see a few different boxes of buttons. But for now lets focus on Modem Parameters, and Firmware.
To start, click Read. This should change the blank box to a list of options.
Now it's time to decide what we want to change. A common adjustment needs to be the baud rate. Say you want to use a Wii mote like I used with my Sumo Bot "Scrapper", you will need to make your baud rate faster. The wii mote works at a baud rate of 19200. So we will need to get the Xbee communicating at 19200.
If we scroll down the list of settings, we should find a Serial communication setting option. Digi has done a great job to make this simple. Click on the 9600 pull down. Pick your baud, and your set. If that is all you want to change, click the Write button that is next to the Read button we pushed earlier.
Once it writes the changes, you can go back to the PC settings tab, and Test/Query your xbee with the changes in settings. If you get the successful information pop up, your all set!
What if you what to change your channel? Why would you want to change the channel? In the case of the Robo Workshop held at SparkFun , we needed to run more than a half dozen robots all with xbees, in the same room. This is a prime example of when you should change your channel. Not to mention that sometimes a stray xbee command could send a battle bot wild. The Robo workshop brought out a competitor from Kansas that had similar command for his weapon, as I had for my Sumobot. It could have made for an interesting issue.
To change the channel, take a look down the same list that the baud was in. Find the (FILL IN THE BLANK). Click on the ID, and type in your channel of choice. Make sure to set all of your xbees to the same channel.
Once you have made your adjustments, simply click the Write button, next to the read button. It should take a moment, but if everything goes well, it should say,
Getting modem type .... OK
Modem's firmware not updated
Setting AT parameters .. OK
Write parameters.... Complete.
This pretty much covers the basics to changing the important settings on your xbee. It really is that simple.
Step 5: Un Bricking a Frozen Xbee.
These steps we contributed by Cristof. Thanks to him, we have a solid step by step run down on how to attempt a fix.
1. Take the module out of the interface board. 2. Connect the interface board to the computer. 3. Open X-CTU make sure Baud Rate is set to 9600 4. Go to "Modem Configuration" 5. Put a check in the "Always update firmware" box 6. Select proper modem from drop down menu, 7. Select proper function set and firmware version from drop down menus. 8. Click on the "Write" button. After a few seconds of trying to read the modem, you will get an Info box that says Action Needed. At this point, CAREFULLY insert the module into the interface board. 9. You may get the info box again a short while after, just use the reset button on the interface board.Update: Well after letting this instructable soak for a while, some comments brought a missing piece to my attention. If you are working with an Xbee Explorer board that does not have a reset button, you can not complete the process. That won't do, so we have come up with a simple fix for you. Take a wire to jump a connection between RST, and GND. When it comes to the point that you need to reset (Hint this will work any time you need to reset.) just jump the two pins together, and you have reset the device! Good Luck friends.
Update 8/23 Thanks to reader kolment2003 a great recommendation to use a bread board, to switch for the Reset to Ground. This will allow a solid connection, and a reliable reset when you need it. Thanks kolment2003
18 Comments
Question 3 years ago on Introduction
bonjour j'ai deux module XBee PRO S2B avec deux arduino Uno commen je peux configuréé SVP et merci
9 years ago on Step 3
Hello
im trying to connect zbee pro 900 ( xbp09-dpsit-156) through USB cable using XCTU software but it gives me error ( modem not connected ) , i checked the power and nothing bad , the xbee explorer is working .
so i hope someone will helps me solving this problem .
best regards ,
Ahmad Kalbouneh
9 years ago on Introduction
You can buy an XBee USB adapter compatible with the XBee USB explorer for an even better price from this website: https://www.openimpulse.com/blog/products-page/product-category/xbee-usb-adapter-module/
9 years ago on Introduction
Hello! Thanks for explaining how to deal with Xbee modules ;)
You can buy a good Xbee USB adapter (that looks like the sparkfun one) for a good price on this website: http://voltatek.com/en/communication/103-xbee-usb-...
10 years ago on Step 2
I ran into an oddity... I managed to port Hyperterm over to Windows 7, only to have x64 Win-7 balk that it is not a compatible program... There were a few others out there, RealTerm, which promptly crashed once it fired up. One I found, that's semi-fool proof, Putty.. this is a multi-purpose shell terminal, either ssh or serial. In the serial mode, it's very rudimentary, you must remember what the serial port the usb Explorer, or ftdi cable are connected to, and manually set the baud rate. But, it runs very much like a standard serial terminal when selected. Element-14 contributor Jeremy Blum gets kudos for mentioning it. I've used it for serial and ssh access to microcontrollers and a home server, incase things go awry.
12 years ago on Step 5
I dun have the USB explorer board! can I use the rs232 module to unbrick my xbee??!!??
Reply 10 years ago on Step 5
If you're using a version of X-CTU that talks to it via the RS-232, read the note above by kolment2003, which I just replied to. It should work the same, addint a momentary contact switch between pins 5 & 11, but only when X-CTU is in the middle of attempting to re-write the firmware, and failing.. the most recent version pops-up with a info window saying no response, yada.. yada.. yada.. then at the bottom: XBEE: Press and release the reset switch, info window will close...... might work?
13 years ago on Step 5
Fixing Bricked Xbee 2.5 while using a usb explorer 1- solder some headers into the usb explorer to be able to attach on a breadboard 2- short out GND and RST with a switch ( just like the one for reset on arduino) 3- when asked to reset the xbee , short out GND and RST with the switch PS: i was never able to properly reset by just shorting the pins with a wire, but with a breadboard n a switch it works like a charm!!!!!!!
Reply 10 years ago on Step 5
I just found this out myself after accidentally writing the wrong firmware to a S1.. Followed the instructions on a google page, but it still stayed unresponsive, short of the "do this..." window from X-CTU.. Then, I read the line.. press the reset.. But, the carriers from parallax or Adafruit don't have a reset button.. THEN it dawned on me, the pins (pin 5 & 11) as you said. As soon as I pressed the button on the breadboard, the info window closed, and X-CTU responded with writing firmware.. Now, the fun part for me.. learning the differences between the Series-1 (XB24 805.12.4 (?)) and the Series 2 (Not S2, XB24B)
Reply 13 years ago on Step 5
Hi, Thanks so much for the input! That is valuable information. I will make some modifications to the Instructable to reflect this. Credit given of course. ;) Thanks for reading, and again thanks for the input.
Reply 12 years ago on Introduction
I had a bricked XBee module. I "bricked" it the first day that I received it!! The same day that I started working with XBee's!!! This tutorial helped me fix my problem!!!! Thank you sooooo much. It's wonderful to have "people in the know" like your self ,that will try to help beginners!!! Thanks again!!!
10 years ago on Step 5
This works like a champ in every carrier I have tried it with. No wires, no buttons, no fuss. One of those "ahah" moments. Wish I had thought of it
12 years ago on Step 5
To un-Brick:
OK, I tried your UNBRICK technique and it worked once for me, but I did my mistake again and I could not get it back. I looked for a good long time and found the following. It even worked with my non-Digi usb board from Parallax...
It uses the X-CTU program and signals the module using break on the terminal window - you have to use the wire-to-reset trick, but it works!
http://www.digi.com/wiki/developer/index.php/Bootloader_to_force_XBee_reflash
12 years ago on Step 5
Hi,
I've bought two Xbee-PRO XSC with two XBee Explorer Regulated boards and a FTDI cable from sparkfun store.
I've tried to use them many times, but they don't work.
I've tried to manage them by X-CTU, Xbee module has been connect using sparkfun XBee Explorer Regulated board and FTDI usb cable. Parameters has been set to 9600 8-N-1 FLOW:NONE, API enabled, no baud change.
The test result has been "Comunication with modem..OK Modem type = Name unknown (ID = 42949672481228316) Modem firmware version= "
I've tried to disconnect the module or change it and the result has been always the same!
I've tried to update firmware by following your instruction, but X-CTU returned always the same sentence "Getting modem type....OK
Programming modem...Lost communication with modem
Write Parameters...Failed".
If I disable the API function and update, the Action Required windows appeared. I followed the instruction by resetting the module (pin5+ground) and the following sentence appeared: "Getting modem type....OK
Programming modem...Detected baud rate difference.
Make sure PC and modem baud rate is set correctly
Lost communication with modem
Write Parameters...Failed".
I've tried also by using "GUI serial Xbee3" for MAC OS, but neither it worked.
I've tried all the solution I found in internet, but they did not work. What I have to do?
Have I to use a XBee Explorer USB board instead of XBee Explorer Regulated board? Is it a problem of Vcc?
Thanks, Giuseppe.
12 years ago on Introduction
hi, I can sent data but still can't receive it (Minimum connections: VCC, GND, DOUT & DIN with micro contololer) my xbee doesn't receive, led of dout doesn't any act.
12 years ago on Introduction
have you tried using the dongle with an xbee pro? the way i understood your tutorial, u simply used the dongle to program the xbee right?
12 years ago on Introduction
thanks for the help i couldnt get either of the xbee to connect
13 years ago on Introduction
I tried everything but still can't "communicate with modem". I have a pair of Xbee 24s and I've tried resetting, connecting piggyback to an arduino to give me the reset ability. I changed usb cables and swapped between the explorer module and the prototyping unit. Nothing seems to work.
It also comes up with a message saying the baud rate is different between modem and pc and then looses connection to the modem. I've triple checked the baude rates and retried but no luck.
Next?????
Stephen