(edit sidebar)
Intro to Physical Computing Syllabus

Research & Learning

Other Class pages

Shop Admin

ITP Help Pages
Tom's pcomp site
DanO's pcomp site


Xbee Firmware

Tutorials.XbeeFirmware History

Hide minor edits - Show changes to output

Changed lines 42-43 from:
the password for this account is above the machines.
to:
the password for this account is T3db0t.  That's a zero, not an o.
Changed line 18 from:
*X-CTU software installed on your Windows machine
to:
*[[http://www.digi.com/support/productdetl.jsp?pid=3352&osvid=0&s=316&tp=5|X-CTU software]] installed on your Windows machine
Added lines 68-69:
[[<<]]
Changed lines 73-74 from:
to:
[[<<]]
Changed lines 45-47 from:


to:
[[<<]]


Added line 64:
Changed line 6 from:
Alternatively, there are three Windows machines in the A/V lab which have X-CTU already installed. 
to:
If you don't have a Windows machine, don't worry! There are three Windows machines in the A/V lab which have X-CTU already installed. 
Changed lines 9-11 from:
The following instructions will be for the lab machines, however the process is basically the same if you are running X-CTU on your own machine.

to:
The following instructions will be for the lab machines, however the process is basically the same if you are running X-CTU on your own computer.

Added lines 90-91:

!!!!When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.
Deleted lines 94-95:

!!!!When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.
Added lines 92-94:


!!!!When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.
Changed lines 102-104 from:
!!!!When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.

to:


Changed line 89 from:
#'''Then click the Write Button.  The software will download the new firmware to your radio and you are ready to go!'''
to:
#'''Then click the "Write" button.  The software will download the new firmware to your radio and you are ready to go!'''
Changed line 89 from:
#'''The click the Write Button.  The software will download the new firmware to your radio and you are ready to go!'''
to:
#'''Then click the Write Button.  The software will download the new firmware to your radio and you are ready to go!'''
Changed lines 83-84 from:
#'''The firmware version is shown in the upper right hand corner.  You can pull down that menu to see the latest versions available.  Pick the Latest one (anything after 10A1).'''
to:
#'''The firmware version is shown in the upper right hand corner.  You can pull down that menu to see the latest versions available.  Pick the latest one (anything after 10A1).'''
Changed lines 19-20 from:
*Either the Sparkfun [[http://www.sparkfun.com/commerce/product_info.php?products_id=8687 | Xbee Explorer]], the [[ http://www.newmicros.com/index2.php?url=http%3A%2F%2Fwww.newmicros.com%2Fcgi-bin%2Fstore%2Forder.cgi%3Fform%3Dprod_detail%26part%3DUSB-XBEE-DONGLE-CARRIER |New Micros Xbee dongle]], or [[http://www.adafruit.com/index.php?main_page=product_info&products_id=126 | Adafruit model]], which will allow you to connect your XBee to the computer.
to:
*Either the Sparkfun [[http://www.sparkfun.com/commerce/product_info.php?products_id=8687 | Xbee Explorer]], the [[ http://www.newmicros.com/index2.php?url=http%3A%2F%2Fwww.newmicros.com%2Fcgi-bin%2Fstore%2Forder.cgi%3Fform%3Dprod_detail%26part%3DUSB-XBEE-DONGLE-CARRIER |New Micros Xbee dongle]], or [[http://www.adafruit.com/index.php?main_page=product_info&products_id=126 | Adafruit model]], which will allow you to connect your XBee to your computer.
Changed line 3 from:
It is often the case that the XBees you have bought or borrowed do not have the most recent firmware version. If the firmware of your Xbee is older than verison 10A1, you will not be able to use some useful AT commands.  To check the firmware version of your radios, send the following command: '''ATVR\r'''. The radio will respond with the version (i.g. '''10A2'''). If the number is 10A1 or above (remember, it's in Hexidecimal), you are good to go.  If not, you will need to upgrade the Firmware on your radios using software called X-CTU.
to:
It is often the case that the XBees you have bought or borrowed do not have the most recent firmware version. If the firmware of your Xbee is older than verison 10A1, you will not be able to use some useful AT commands.  To check the firmware version of your radios, send the following command: '''ATVR\r'''. The radio will respond with the version (e.g. '''10A2'''). If the number is 10A1 or above (remember, it's in Hexidecimal), you are good to go.  If not, you will need to upgrade the Firmware on your radios using software called X-CTU.
Changed line 40 from:
On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode, and sign back in as Xbee).
to:
On one of the Windows Machines in the lab, log in to the XBee Account (you will need to sign out if the machine is in the ITP student account mode, and sign back in as Xbee).
Changed lines 97-98 from:
to:
[[<<]]
Changed lines 96-98 from:
!!!When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.

to:


!
!!!When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.

Changed lines 94-96 from:
When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.

to:


!!!
When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.

Changed lines 94-96 from:
to:
When you are done, don't forget to log out of the Xbee account on the lab computer, or Brian Kim will be sad.

Changed lines 75-77 from:
!!!5. G to the Modem Configuration Tab
Click the Modem Configuration Tab. This is where you will update the firmware.
to:
!!!5. Update Firmware
Click
the '''Modem Configuration Tab'''. This is where you will update the firmware. Follow the steps below:
Changed lines 75-77 from:
!!!5.  Click the Modem Configuration Tab.
This
is where you will update the firmware.
to:
!!!5. G to the Modem Configuration Tab
Click the Modem Configuration Tab. This is where you will update the firmware.
Changed lines 45-47 from:
Attach:myImage.jpg

to:


Changed line 91 from:
%alt='xctuRead' width=400 %[[Attach:xctu4.jpg|Attach:xctu4.jpg]]
to:
%alt='xctuRead' width=400 %[[Attach:xctu5.jpg|Attach:xctu5.jpg]]
Changed lines 80-89 from:
'''
#
Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to the one to the right.

#The firmware version is shown in the upper right hand corner.  You can pull down that menu to see the latest versions available.  Pick the Latest one (anything after 10A1).

# Next, (still within the Modem Configuration tab) click the checkbox that says "Always Update Firmware".

# Leave the Function Set menu choice to XBEE 802.15.4.

#The click the Write Button.  The software will download the new firmware to your radio and you are ready to go!'''
to:

#'''Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to the one to the right.'''

#'''The firmware version is shown in the upper right hand corner.  You can pull down that menu to see the latest versions available.  Pick the Latest one (anything after 10A1).'''

# '''Next, (still within the Modem Configuration tab) click the checkbox that says "Always Update Firmware".'''

# '''Leave the Function Set menu choice to XBEE 802.15.4.'''

#'''The click the Write Button.  The software will download the new firmware to your radio and you are ready to go!'''
Changed lines 80-81 from:
'''#Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to the one to the right:
to:
'''
#Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to the one to the right.
Changed lines 78-79 from:
(:table align=LEFT border=1 cellspacing=0 :)
to:
(:table align=LEFT cellspacing=0 :)
Changed lines 80-81 from:
#Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to the one to the right:
to:
'''#Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to the one to the right:
Changed line 88 from:
#The click the Write Button.  The software will download the new firmware to your radio and you are ready to go!
to:
#The click the Write Button.  The software will download the new firmware to your radio and you are ready to go!'''
Changed lines 70-71 from:
%alt='xctuFirst' width=500 %[[Attach:xctu3.jpg|Attach:xctu3.jpg]]
to:
%alt='xctuFirst' width=300 %[[Attach:xctu3.jpg|Attach:xctu3.jpg]]
Changed line 91 from:
%alt='xctuRead' width=300 align=CENTER %[[Attach:xctu4.jpg|Attach:xctu4.jpg]]
to:
%alt='xctuRead' width=400 %[[Attach:xctu4.jpg|Attach:xctu4.jpg]]
Changed lines 78-79 from:
(:table align=LEFT cellspacing=0 :)
to:
(:table align=LEFT border=1 cellspacing=0 :)

(:cellnr:)
Changed line 89 from:
(:cellnr:)
to:
(:cell:)
Changed lines 78-80 from:
#Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to those in the image below:
%alt='xctuRead' width=200 align=CENTER %[[Attach:xctu4.jpg|Attach:xctu4.jpg]]

to:
(:table align=LEFT cellspacing=0 :)

#Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to
the one to the right:
Changed lines 89-90 from:

to:
(:cellnr:)
%alt='xctuRead' width=300 align=CENTER %[[Attach:xctu4.jpg|Attach:xctu4.jpg]]
(:tableend:)


Changed lines 78-89 from:
##Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to those in the image below:
%alt='xctuRead' width=500 align=CENTER %[[Attach:xctu4.jpg|Attach:xctu4.jpg]]

##The firmware version is shown in the upper right hand corner.  You can pull down that menu to see the latest versions available.  Pick the Latest one (anything after 10A1).

## Next, (still within the Modem Configuration tab) click the checkbox that says "Always Update Firmware".

## Leave the Function Set menu choice to XBEE 802.15.4.

##The click the Write Button.  The software will download the new firmware to your radio and you are ready to go!

to:
#Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to those in the image below:
%alt='xctuRead' width=200 align=CENTER %[[Attach:xctu4.jpg|Attach:xctu4.jpg]]

#The firmware version is shown in the upper right hand corner.  You can pull down that menu to see the latest versions available.  Pick the Latest one (anything after 10A1).

# Next, (still within the Modem Configuration tab) click the checkbox that says "Always Update Firmware".

# Leave the Function Set menu choice to XBEE 802.15.4.

#The click the Write Button.  The software will download the new firmware to your radio and you are ready to go!

Deleted lines 89-225:







Connect an XBee to your personal computer via USB

There are two ways you can do this. You can use a pre-made USB-to-serial board like the Xbee Explorer shown here:

%hspace=5 width=250 alt='xbee explorer' align=top valign=center%http://www.sparkfun.com/commerce/images/products/08687-07-L.jpg

Or you can build your own USB-to-serial adaptor using an XBee breakout board and a USB-to-serial adaptor as shown below:

Set up a breadboard as shown in the photos below:

(:table:)
(:cellnr:)
%hspace=5 width=250 alt='xbee on board' align=top valign=center%[[Attach:Xbee_FTDI_photo.jpg|Attach:Xbee_FTDI_photo.jpg]]
(:cell:)
(:cell:)
%hspace=5 width=250 alt='Arduino connected to a breadboard' align=top valign=center%[[Attach:Xbee_FTDI_photo_no_xbee.jpg|Attach:Xbee_FTDI_photo_no_xbee.jpg]]
(:cell:)
(:cell:)
%hspace=5 width=250 alt='xbee board' align=top valign=center%[[Attach:Xbee_FTDI_schem.jpg|Attach:Xbee_FTDI_schem.jpg]]
(:cellnr align=center:)
New Micros Dongle
(:cell align=center:)
Explorer
(:cell align=center:)
Adafruit Model
(:tableend:)

The above images show an XBee Module connected to a [[http://www.sparkfun.com/commerce/product_info.php?products_id=718|FTDI USB-to-serial adaptor]]. The USB adaptor draws power from the USB bus, and the XBee draws power from the adaptor via its 3.3 voltage output. Note that the adaptor shown is an older model, and the pin positions on newer models have changed.  Check the datasheet on the model you bought, and connect the XBee's transmit pin (TX or DOUT) to the adaptor's receive pin (RX or DIN) and vice versa.

''' %color=red%Important: XBees can only take 3.3 volts max. Always check to see that your voltage is not above this level before you put your XBee into your board.'''

Once you've got the XBee module's circuit built and powered,The LED on pin 13 should stay on steadily, and the LED on pin 15 will blink. The former is lit (LED is on) when the module is active. And the later blinks whether the radio is associated with another radio (LED blinking) or not (LED on steadily). Make sure your circuit is connected to your computer and open Processing (you can also use your favorite serial terminal program if that is more familiar).

[[<<]]

!!! 2. Configure the XBee Modules Serially

The next thing that needs to be done to start using your XBees is to communicate with the radio module serially in order to set its local address and destination address. 

Tom Igoe has written an XBee Serial terminal for processing that makes things easy by printing newlines for return characters.
[[ http://www.itp.nyu.edu/physcomp/uploads/xbeeSerialTerminal.zip | Download it here]] and open it up in Processing.

Make sure the sketch is working.

There is one thing that you might want to do before you start serial communication. Get a piece of tape (masking tape works well) tear off a small square and stick it on your XBees. (you don't have to remove it from the board you just built). With a marker, give your XBee a number. "1" works well. This will be your XBee's id and will be used later when you program it. Go ahead and label your second XBee, "2".

%alt='numbered xbees' height=200 %[[Attach:numberedXbees.jpg|Attach:numberedXbees.jpg]]

Now that you've named your individual XBees, you need to set up a PAN ID for them. All radios with the same PAN ID can talk to each other and ignore the radios on a different PAN ID. Go to the [[ PANID page |http://itp.nyu.edu/physcomp/Notes/XBeePANIDs]] Choose a series of letters or numbers-- hopefully ones you can remember, and input them on the page so that someone else at ITP won't be trying to talk on the same network as you.

Now we're ready. In order to program the XBee, you first need to put the XBee is in command mode. Xbees essentially have two modes:

*Data Mode-- where they transmit and receive data
*Command Mode-- talk to the XBee itself to program it etc.

You put the XBee into command mode by typing "+++" (that's plus, plus, plus without the parenthesis, and WITHOUT hitting a return afterward).

Try programming the XBee by clicking on the processing sketch and typing the following commands:

(:table:)
(:cellnr:)
(:cell:)
#Type '''+++ '''
#you should see an '''OK''' response in the top window
#type '''AT''' and see if you get another OK response
#if you don’t you’ve gone back out of command mode, so do''' +++''' again (Xbees will automatically go out of command mode if you wait too long to type something).
#type '''ATID''' to see the current (default) PAN ID
#type ATID followed by your PAN ID to set it (if your PAN ID is 1437 then you’d type '''ATID1437''')
#type '''ATID''' to see the current PAN ID again. It should be changed to 1437 now.
#type ATMY followed by the number you have given to the XBee you are programming. In this case, it would be 1, so type '''ATMY1''' and hit return.
#type '''ATMY''' to see that it has been changed to 1.
#type ATDL followed by the number you have given to the other XBee (the XBee you want this XBee to communicate with). In this case, it would be 2, so type: '''ATDL2''' and hit return.
#type '''ATDL''' to see that it has been changed to 2.
#type '''ATCN''' to finish.
(:cell:)
(:cell:)
%hspace=5 width=400 alt='Arduino connected to a breadboard' align=top valign=center%[[Attach:xbeeSerialTerminal.jpg|Attach:xbeeSerialTerminal.jpg]]
(:cell:)
(:tableend:)

Congratulations, you have just configured your First XBee. Wondering what all of that stuff meant? To program an XBee, you use "AT" commands. Some of the ones we just used are described below:

Commonly Used XBee "AT" Commands
*'''ATMY''' my address (the address of the radio you are programming)
*'''ATDL''' destination address (the address of the radio that you will be talking to)
*'''ATID''' personal area network ID (all the XBee's have a group or Personal Area Network (PAN) ID. All radios with the same PAN ID can talk to each other and ignore the radios on a different PAN ID.
*'''ATRE''' Resets the Xbee to its original settings
*'''ATWR'''    write settings to firmware



Typing only '''ATID''' and hitting return will output the current address for the xbee you are programming. To actually change the address, you will need to enter the AT command, followed by the ID you wish to set. So, you would enter: '''ATID1437'''(or whatever you choose for your PAN) and then hit return.

You just did the following commands for Radio 1 (in Column 1). You will now need to do the commands for Radio 2, to program it.

(:table border=1 width=30% align=LEFT cellspacing=0 :)
(:cellnr colspan=2 align=center:)
'''AT COMMANDS '''
(:cellnr align=center:)
RADIO 1
(:cell align=center:)
Radio 2
(:cellnr align=center:)
+++
(:cell align=center:)
+++
(:cellnr align=center:)
ATMY 1
(:cell align=center:)
ATMY 2
(:cellnr align=center:)
ATDL 2
(:cell align=center:)
ATDL 1
(:cellnr align=center:)
ATID 1437 (YOUR PANID)
(:cell align=center:)
ATID 1437 (YOUR PANID)
(:tableend:)

[[<<]]
Quit the Processing sketch, and unplug your board from your computer. Next, remove the XBee from the circuit, insert the second XBee and configure it using the same procedure as listed above. Change ATMY to 2, and ATDL to 1. Don't set the radio's destination address to the same value of its source address, or it will talk only to itself.

[[<<]]





Changed lines 79-88 from:
%alt='xctuRead' width=500 %[[Attach:xctu3.jpg|Attach:xctu3.jpg]]








to:
%alt='xctuRead' width=500 align=CENTER %[[Attach:xctu4.jpg|Attach:xctu4.jpg]]

##The firmware version is shown in the upper right hand corner.  You can pull down that menu to see the latest versions available.  Pick the Latest one (anything after 10A1).

## Next, (still within the Modem Configuration tab) click the checkbox that says "Always Update Firmware".

## Leave the Function Set menu choice to XBEE 802.15.4.

##The click the Write Button.  The software will download the new firmware to your radio and you are ready to go!









Changed line 65 from:
Look on the desktop for the X-CTU software icon. Double click the icon to get started.
to:
Look on the desktop for the X-CTU software icon. Launch the software.
Added line 69:
Changed lines 72-77 from:





to:
!!!4. Choose your Serial Port
On the PC Settings tab, you'll be able to select the serial port that your XBee radio is attached to.  Pick a port, and leave the settings on this page at their defaults.

!!!5.  Click the Modem Configuration Tab.
This is where you will update the firmware.

##Click the Read button to read the current firmware on your radio.  You'll get a screenful of settings similar to those in the image below:
%alt='xctuRead' width=500 %[[Attach:xctu3.jpg|Attach:xctu3.jpg]]








Changed line 18 from:
*x-CTU software installed on your Windows machine
to:
*X-CTU software installed on your Windows machine
Changed lines 38-39 from:
!!! 1. Get a Windows Computer
to:
!!! 1. Log on to your Windows Computer
Changed lines 48-49 from:
2. Connect your XBee to the computer using one of the serial to usb devices listed above.
to:
!!!2. Connect your XBee to the computer 

The easiest way to do this is
using one of the serial to usb devices listed above.
Changed lines 63-65 from:
2. Look on the desktop for the X-CTU software icon. Double click the icon to get started.
to:
!!!3. Open X-CTU

Look on the desktop for the X-CTU software icon. Double click the icon to get started.
Changed lines 68-72 from:




to:
You should see something like this:
%alt='xctuFirst' width=500 %[[Attach:xctu3.jpg|Attach:xctu3.jpg]]






Added line 18:
*x-CTU software installed on your Windows machine
Changed lines 38-40 from:
1. On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode, and sign back in as Xbee).
to:
!!! 1. Get a Windows Computer

On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode, and sign back in as Xbee).
Changed lines 59-64 from:





to:
%alt='xctuIcon' width=300 %[[Attach:xctuIcon.jpg|Attach:xctuIcon.jpg]]





Added line 11:
Changed lines 13-25 from:


1. On one of the Windows Machines in the lab, log in
to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode, and sign back in as Xbee).
[[<<]]
the password for this account is above the machines
.

%alt='login' width=300 %
[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
Attach:myImage
.jpg

[[<<]]
2
. Using either the Sparkfun [[http://www.sparkfun.com/commerce/product_info.php?products_id=8687 | Xbee Explorer]], the [[ http://www.newmicros.com/index2.php?url=http%3A%2F%2Fwww.newmicros.com%2Fcgi-bin%2Fstore%2Forder.cgi%3Fform%3Dprod_detail%26part%3DUSB-XBEE-DONGLE-CARRIER |New Micros Xbee dongle]], or [[http://www.adafruit.com/index.php?main_page=product_info&products_id=126 | Adafruit model]], connect your XBee to the computer.

to:
!!! Parts

'''In Order to upgrade your XBee's firmware you will need
to have the following:'''

*A computer that runs Windows (use the PC's in
the A/V lab if you don't have a Mac that runs Parallels).
*Either the Sparkfun [[http://www.sparkfun.com/commerce/product_info.php?products_id=8687 | Xbee Explorer]], the [[ http://www.newmicros.com/index2.php?url=http%3A%2F%2Fwww.newmicros.com%2Fcgi-bin%2Fstore%2Forder.cgi%3Fform%3Dprod_detail%26part%3DUSB-XBEE-DONGLE-CARRIER |New Micros Xbee dongle]], or [[http://www.adafruit.com/index.php?main_page=product_info&products_id=126 | Adafruit model]], which will allow you to connect your XBee to the computer.
Deleted lines 33-43:



(:table align=LEFT width=300 align=LEFT cellspacing=0 :)
(:cellnr colspan=2 align=center:)
%alt='dongle' width=300 %[[Attach:donglePC.jpg|Attach:donglePC.jpg]]
(:cellnr colspan=2 align=center:)
the above image shows the XBee connected to
one of the lab PC's via the New Micros XBee dongle
(:tableend:)

Changed lines 37-42 from:
2. After you have logged in, you should see X-CTU on the desktop. Double click the icon to get started.




to:
1. On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode, and sign back in as Xbee).
[[<<]]
the password for this account is above the machines.

%alt='login' width=300 %[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
Attach:myImage.jpg


2. Connect your XBee to the computer using one of the serial to usb devices listed above.

(:table align=LEFT width=300 align=LEFT cellspacing=0 :)
(:cellnr colspan=2 align=center:)
%alt='dongle' width=300 %[[Attach:donglePC.jpg|Attach:donglePC.jpg]]
(:cellnr colspan=2 align=center:)
the above image shows the XBee connected to
one of the lab PC's via the New Micros XBee dongle
(:tableend:)

[[<<]]


2. Look on the desktop for the X-CTU software icon. Double click the icon to get started.





Changed line 25 from:
(:table align=LEFT widthcellspacing=0 :)
to:
(:table align=LEFT cellspacing=0 :)
Changed line 42 from:
(:table align=LEFT width=400 align=LEFT cellspacing=0 :)
to:
(:table align=LEFT width=300 align=LEFT cellspacing=0 :)
Changed line 42 from:
(:table align=LEFT width=100% align=LEFT  cellspacing=0 :)
to:
(:table align=LEFT width=400 align=LEFT cellspacing=0 :)
Changed line 42 from:
(:table align=LEFT width=30% align=LEFT  cellspacing=0 :)
to:
(:table align=LEFT width=100% align=LEFT  cellspacing=0 :)
Changed lines 50-51 from:

to:
[[<<]]

Changed line 25 from:
(:table align=LEFT cellspacing=0 :)
to:
(:table align=LEFT widthcellspacing=0 :)
Changed line 42 from:
(:table align=LEFT cellspacing=0 :)
to:
(:table align=LEFT width=30% align=LEFT cellspacing=0 :)
Changed lines 46-47 from:
the above image shows the XBee connected to one of the lab PC's via the New Micros XBee dongle
to:
the above image shows the XBee connected to
one of the lab PC's via the New Micros XBee dongle
Changed line 42 from:
(:table border=1  align=CENTER cellspacing=0 :)
to:
(:table align=LEFT cellspacing=0 :)
Changed line 42 from:
(:table border=1 width=30% align=LEFT cellspacing=0 :)
to:
(:table border=1  align=CENTER cellspacing=0 :)
Changed lines 51-58 from:


After you have logged in, you should see X-CTU on the desktop.  Double click to get srarted.




to:
2. After you have logged in, you should see X-CTU on the desktop. Double click the icon to get started.




Added lines 42-43:
(:table border=1 width=30% align=LEFT cellspacing=0 :)
(:cellnr colspan=2 align=center:)
Changed lines 45-47 from:


to:
(:cellnr colspan=2 align=center:)
the above image shows the XBee connected to one of the lab PC's via the New Micros XBee dongle
(:tableend:)




Changed lines 42-45 from:
%alt='login' width=300 %[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]


to:
%alt='dongle' width=300 %[[Attach:donglePC.jpg|Attach:donglePC.jpg]]


Changed line 25 from:
(:table border=1 width=30% align=LEFT cellspacing=0 :)
to:
(:table align=LEFT cellspacing=0 :)
Changed line 32 from:
(:cellnr:)
to:
(:cellnr align=center:)
Changed line 34 from:
(:cell:)
to:
(:cell align=center:)
Changed line 36 from:
(:cell:)
to:
(:cell align=center:)
Added line 35:
new micros dongle
Deleted lines 36-38:
new micros dongle
(:cell:)
(:cell:)
Deleted line 37:
(:cell:)
Deleted line 27:
 (:cell:)
Deleted line 30:
(:cell:)
Changed line 25 from:
(:table:)
to:
(:table border=1 width=30% align=LEFT cellspacing=0 :)
Added line 29:
(:cell:)
Added line 32:
(:cell:)
Added line 37:
(:cell:)
Added line 40:
(:cell:)
Added line 42:
(:cell:)
Changed line 34 from:
(:cellnr:)
to:
(:cell:)
Changed line 36 from:
(:cellnr:)
to:
(:cell:)
Changed lines 28-29 from:
(:cell:)
to:
 (:cell:)
%hspace=5 width=250 alt='new micros' align=top valign=center%[[Attach:newMicroDongle.jpg|Attach:newMicroDongle.jpg]]
Deleted lines 30-32:
%hspace=5 width=250 alt='new micros' align=top valign=center%[[Attach:newMicroDongle.jpg|Attach:newMicroDongle.jpg]]
(:cell:)
(:cell:)
Added lines 32-37:
(:cellnr:)
explorer
(:cellnr:)
new micros dongle
(:cellnr:)
adafruit model
Added lines 23-37:


(:table:)
(:cellnr:)
%hspace=5 width=250 alt='explorer' align=top valign=center%[[Attach:explorer.jpg|Attach:explorer.jpg]]
(:cell:)
(:cell:)
%hspace=5 width=250 alt='new micros' align=top valign=center%[[Attach:newMicroDongle.jpg|Attach:newMicroDongle.jpg]]
(:cell:)
(:cell:)
%hspace=5 width=250 alt='adafruit' align=top valign=center%[[Attach:adafruit.jpg|Attach:adafruit.jpg]]
(:tableend:)


Added lines 67-72:
(:cellnr align=center:)
New Micros Dongle
(:cell align=center:)
Explorer
(:cell align=center:)
Adafruit Model
Changed line 18 from:
%alt='login' width=200 %[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
to:
%alt='login' width=300 %[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
Changed lines 22-24 from:
2. Use

to:
2. Using either the Sparkfun [[http://www.sparkfun.com/commerce/product_info.php?products_id=8687 | Xbee Explorer]], the [[ http://www.newmicros.com/index2.php?url=http%3A%2F%2Fwww.newmicros.com%2Fcgi-bin%2Fstore%2Forder.cgi%3Fform%3Dprod_detail%26part%3DUSB-XBEE-DONGLE-CARRIER |New Micros Xbee dongle]], or [[http://www.adafruit.com/index.php?main_page=product_info&products_id=126 | Adafruit model]], connect your XBee to the computer.
%alt='login' width=300 %[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]



Changed line 18 from:
height=200 %[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
to:
%alt='login' width=200 %[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
Changed line 18 from:
[[width=250 Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
to:
height=200 %[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
Changed line 18 from:
[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
to:
[[width=250 Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
Changed line 18 from:
[[Attach:xctu2.jpg|Attach:xctu2.jpg]]
to:
[[Attach:xtcu2.jpg|Attach:xtcu2.jpg]]
Added line 8:
Changed line 5 from:
X-CTU can be downloaded at [[Http://www.maxstream.net/support/downloads.php | http://www.maxstream.net/support/downloads.php]].  Unfortunately, it only runs on Windows (though can run it under Parallels).
to:
X-CTU can be downloaded at [[http://www.maxstream.net/support/downloads.php|http://www.maxstream.net/support/downloads.php]].  Unfortunately, it only runs on Windows (though can run it under Parallels).
Changed line 5 from:
X-CTU can be downloaded at [[www.maxstream.net/support/downloads.php |www.maxstream.net/support/downloads.php]].  Unfortunately, it only runs on Windows (though can run it under Parallels).
to:
X-CTU can be downloaded at [[Http://www.maxstream.net/support/downloads.php | http://www.maxstream.net/support/downloads.php]].  Unfortunately, it only runs on Windows (though can run it under Parallels).
Changed line 5 from:
X-CTU can be downloaded at www.maxstream.net/support/downloads.php.  Unfortunately, it only runs on Windos (though can run it under Parallels).
to:
X-CTU can be downloaded at [[www.maxstream.net/support/downloads.php |www.maxstream.net/support/downloads.php]].  Unfortunately, it only runs on Windows (though can run it under Parallels).
Changed lines 13-14 from:
!!!! 1. On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode.
[[Attach:xctu1.jpg|Attach:xctu1.jpg]]
to:
1. On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode, and sign back in as Xbee). 
[[<<]]
the password for this account is above the machines
. 

[[
Attach:xctu2.jpg|Attach:xctu2.jpg]]
Changed lines 20-23 from:



to:
[[<<]]
2. Use


After you have logged in, you should see X-CTU on the desktop.  Double click to get srarted.




Changed lines 13-14 from:
!!! 1. On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode.
[[Attach:Xbee_FTDI_photo_no_xbee.jpg|Attach:Xbee_FTDI_photo_no_xbee.jpg]]
to:
!!!! 1. On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode.
[[Attach:xctu1.jpg|Attach:xctu1.jpg]]
Added lines 1-144:
!!! Upgrading your XBee's firmware using X-CTU

It is often the case that the XBees you have bought or borrowed do not have the most recent firmware version. If the firmware of your Xbee is older than verison 10A1, you will not be able to use some useful AT commands.  To check the firmware version of your radios, send the following command: '''ATVR\r'''. The radio will respond with the version (i.g. '''10A2'''). If the number is 10A1 or above (remember, it's in Hexidecimal), you are good to go.  If not, you will need to upgrade the Firmware on your radios using software called X-CTU.
[[<<]]
X-CTU can be downloaded at www.maxstream.net/support/downloads.php.  Unfortunately, it only runs on Windos (though can run it under Parallels).
Alternatively, there are three Windows machines in the A/V lab which have X-CTU already installed. 
[[<<]]
The following instructions will be for the lab machines, however the process is basically the same if you are running X-CTU on your own machine.

[[<<]]


!!! 1. On one of the Windows Machines in the lab, log in to the XBee Account (so you will need to sign out if the machine is in the ITP student account mode.
[[Attach:Xbee_FTDI_photo_no_xbee.jpg|Attach:Xbee_FTDI_photo_no_xbee.jpg]]
Attach:myImage.jpg





Connect an XBee to your personal computer via USB

There are two ways you can do this. You can use a pre-made USB-to-serial board like the Xbee Explorer shown here:

%hspace=5 width=250 alt='xbee explorer' align=top valign=center%http://www.sparkfun.com/commerce/images/products/08687-07-L.jpg

Or you can build your own USB-to-serial adaptor using an XBee breakout board and a USB-to-serial adaptor as shown below:

Set up a breadboard as shown in the photos below:

(:table:)
(:cellnr:)
%hspace=5 width=250 alt='xbee on board' align=top valign=center%[[Attach:Xbee_FTDI_photo.jpg|Attach:Xbee_FTDI_photo.jpg]]
(:cell:)
(:cell:)
%hspace=5 width=250 alt='Arduino connected to a breadboard' align=top valign=center%[[Attach:Xbee_FTDI_photo_no_xbee.jpg|Attach:Xbee_FTDI_photo_no_xbee.jpg]]
(:cell:)
(:cell:)
%hspace=5 width=250 alt='xbee board' align=top valign=center%[[Attach:Xbee_FTDI_schem.jpg|Attach:Xbee_FTDI_schem.jpg]]
(:tableend:)

The above images show an XBee Module connected to a [[http://www.sparkfun.com/commerce/product_info.php?products_id=718|FTDI USB-to-serial adaptor]]. The USB adaptor draws power from the USB bus, and the XBee draws power from the adaptor via its 3.3 voltage output. Note that the adaptor shown is an older model, and the pin positions on newer models have changed.  Check the datasheet on the model you bought, and connect the XBee's transmit pin (TX or DOUT) to the adaptor's receive pin (RX or DIN) and vice versa.

''' %color=red%Important: XBees can only take 3.3 volts max. Always check to see that your voltage is not above this level before you put your XBee into your board.'''

Once you've got the XBee module's circuit built and powered,The LED on pin 13 should stay on steadily, and the LED on pin 15 will blink. The former is lit (LED is on) when the module is active. And the later blinks whether the radio is associated with another radio (LED blinking) or not (LED on steadily). Make sure your circuit is connected to your computer and open Processing (you can also use your favorite serial terminal program if that is more familiar).

[[<<]]

!!! 2. Configure the XBee Modules Serially

The next thing that needs to be done to start using your XBees is to communicate with the radio module serially in order to set its local address and destination address. 

Tom Igoe has written an XBee Serial terminal for processing that makes things easy by printing newlines for return characters.
[[ http://www.itp.nyu.edu/physcomp/uploads/xbeeSerialTerminal.zip | Download it here]] and open it up in Processing.

Make sure the sketch is working.

There is one thing that you might want to do before you start serial communication. Get a piece of tape (masking tape works well) tear off a small square and stick it on your XBees. (you don't have to remove it from the board you just built). With a marker, give your XBee a number. "1" works well. This will be your XBee's id and will be used later when you program it. Go ahead and label your second XBee, "2".

%alt='numbered xbees' height=200 %[[Attach:numberedXbees.jpg|Attach:numberedXbees.jpg]]

Now that you've named your individual XBees, you need to set up a PAN ID for them. All radios with the same PAN ID can talk to each other and ignore the radios on a different PAN ID. Go to the [[ PANID page |http://itp.nyu.edu/physcomp/Notes/XBeePANIDs]] Choose a series of letters or numbers-- hopefully ones you can remember, and input them on the page so that someone else at ITP won't be trying to talk on the same network as you.

Now we're ready. In order to program the XBee, you first need to put the XBee is in command mode. Xbees essentially have two modes:

*Data Mode-- where they transmit and receive data
*Command Mode-- talk to the XBee itself to program it etc.

You put the XBee into command mode by typing "+++" (that's plus, plus, plus without the parenthesis, and WITHOUT hitting a return afterward).

Try programming the XBee by clicking on the processing sketch and typing the following commands:

(:table:)
(:cellnr:)
(:cell:)
#Type '''+++ '''
#you should see an '''OK''' response in the top window
#type '''AT''' and see if you get another OK response
#if you don’t you’ve gone back out of command mode, so do''' +++''' again (Xbees will automatically go out of command mode if you wait too long to type something).
#type '''ATID''' to see the current (default) PAN ID
#type ATID followed by your PAN ID to set it (if your PAN ID is 1437 then you’d type '''ATID1437''')
#type '''ATID''' to see the current PAN ID again. It should be changed to 1437 now.
#type ATMY followed by the number you have given to the XBee you are programming. In this case, it would be 1, so type '''ATMY1''' and hit return.
#type '''ATMY''' to see that it has been changed to 1.
#type ATDL followed by the number you have given to the other XBee (the XBee you want this XBee to communicate with). In this case, it would be 2, so type: '''ATDL2''' and hit return.
#type '''ATDL''' to see that it has been changed to 2.
#type '''ATCN''' to finish.
(:cell:)
(:cell:)
%hspace=5 width=400 alt='Arduino connected to a breadboard' align=top valign=center%[[Attach:xbeeSerialTerminal.jpg|Attach:xbeeSerialTerminal.jpg]]
(:cell:)
(:tableend:)

Congratulations, you have just configured your First XBee. Wondering what all of that stuff meant? To program an XBee, you use "AT" commands. Some of the ones we just used are described below:

Commonly Used XBee "AT" Commands
*'''ATMY''' my address (the address of the radio you are programming)
*'''ATDL''' destination address (the address of the radio that you will be talking to)
*'''ATID''' personal area network ID (all the XBee's have a group or Personal Area Network (PAN) ID. All radios with the same PAN ID can talk to each other and ignore the radios on a different PAN ID.
*'''ATRE''' Resets the Xbee to its original settings
*'''ATWR'''    write settings to firmware



Typing only '''ATID''' and hitting return will output the current address for the xbee you are programming. To actually change the address, you will need to enter the AT command, followed by the ID you wish to set. So, you would enter: '''ATID1437'''(or whatever you choose for your PAN) and then hit return.

You just did the following commands for Radio 1 (in Column 1). You will now need to do the commands for Radio 2, to program it.

(:table border=1 width=30% align=LEFT cellspacing=0 :)
(:cellnr colspan=2 align=center:)
'''AT COMMANDS '''
(:cellnr align=center:)
RADIO 1
(:cell align=center:)
Radio 2
(:cellnr align=center:)
+++
(:cell align=center:)
+++
(:cellnr align=center:)
ATMY 1
(:cell align=center:)
ATMY 2
(:cellnr align=center:)
ATDL 2
(:cell align=center:)
ATDL 1
(:cellnr align=center:)
ATID 1437 (YOUR PANID)
(:cell align=center:)
ATID 1437 (YOUR PANID)
(:tableend:)

[[<<]]
Quit the Processing sketch, and unplug your board from your computer. Next, remove the XBee from the circuit, insert the second XBee and configure it using the same procedure as listed above. Change ATMY to 2, and ATDL to 1. Don't set the radio's destination address to the same value of its source address, or it will talk only to itself.

[[<<]]





  Edit | View | History | Print | Recent Changes | Search Page last modified on November 23, 2009, at 12:37 PM