Friday, January 11, 2013

How to Set-Up a Pair XBees

There are plenty of examples on how to set-up a pair of XBees on the web, but since I had some trouble, I thought I would share my resources for the next person who tries.

I bought my XBees (Link) and XBee Explorer USB (Link) from Sparkfun

First, check out this you tube video I found on YouTube.


Here are rough steps
  1. Connect one XBee using a XBee Explorer USB, or equivalent
  2. Find the correct COM port and test the connection (set the Baud rate to 9600)
  3. Move over to the Modem Configuration tab.
  4. Click read to pull the info from the modem
  5. Change the Modem model to XB2-B
  6. Change the function set to ZIGBEE ROUTER/END DEVICE AT (for XBee 1) or ZIGBEE COORDINATOR AT (for XBee 2)
  7. Change the PAN ID to 3FFF (Can be any value within the given range as long as both XBees are set to the same one)
  8. Make note of the Serial Number High and Serial Number Low
  9. Press Write to program your XBee
  10. Perform steps 1 through 8 for the second XBee (XBee 2)
  11. This time, prior to pressing Write, input the first XBee's High and Low Serial Number in the Second XBee's Destination Address hight and low
  12. Ensure the Baud rate is set to 9600 and press Write
  13. Finally, reconnect the first XBee and input the second XBee's High and Low Serial Number in the Destination Address hight and low
  14. Press Write... DONE!

Although I thought I was following his tutorial step by step, I overlooked the fact that the modem type I was selecting was different than his.  In the video, the modem type was "XB24-B" but mine was selected as "XB24-BZ".  I don't know the difference, or why one was working and the other was not, but I don't care.  For my purposes, all I wanted was to send serial data back and forth.

Here are the screen shots for each XBee
Coordinator XBee Settings
Router/End Device XBee Settings

Using some serial source, you can now send data from one XBee to the other.

If you have "Bricked" your XBee, which means interrupted it during a firmware upload, use these steps to get you back up and running (I had to use them)

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.


This is where I found these instructions (Link). 

Good Luck!

No comments:

Post a Comment