From DD-WRT Wiki

Jump to: navigation, search

Xbee Serial Port Radio Link for WRT54GL

Using AdaFruit Xbee carrier boards, you can easily add a Xbee radio link to the router. The radios I am using are rated for a maximum distance of 300 feet and cost around $20, however, you can upgrade the radios and there are some that go 1 mile(http://www.sparkfun.com/commerce/product_info.php?products_id=8876), but cost twice as much. The radios can be purchased from several sources: AdaFruit Industries, SparkFun Electronics, and DigiKey.

What you will need:

2 Xbee radios(http://www.adafruit.com/index.php?main_page=product_info&cPath=29&products_id=128)

2 Xbee carrier boards(http://www.adafruit.com/index.php?main_page=product_info&cPath=29&products_id=126)

1 USB FTDI cable(http://www.adafruit.com/index.php?main_page=product_info&cPath=29&products_id=70)

Female jumper wires(http://www.sparkfun.com/commerce/product_info.php?products_id=9389)

XCTU software to configure the radios(http://www.digi.com/support/productdetl.jsp?pid=3352&osvid=57&tp=5&s=316)

Make the Xbee Carrier Boards

Visit the AdaFruit site and use her instructions for making the boards(http://www.ladyada.net/make/xbee/index.html).

You can use the extra pin headers from the AdaFruit kit and place them in the router. Use the female jumper wires to make the connection from the router serial port pins to the XBee carrier board.

Configuring the Radios

The AdaFruit site has a link for configuring the radios which is excellent (http://www.humboldt.edu/~cm19/XBee%20setup.pdf). Read through the document and setup one radio as the coordinator and the other as the end device. Start with Step 2 of the document and go until you get to Step 6. The radio you programmed as the "coordinator" or "router" should be the one you hook up to your router and the "end device" should be the radio you attach to your computer, embedded device, or whatever else you can come up with...

You can also visit the Funnel site and grab their software to configure the radios(http://code.google.com/p/funnel/downloads/list). Download the XbeeConfigTool.zip. This software seems easier to use but has less options for configuring the radios.

Remember to set the baud rate to 115200, that is the baud rate of the router, and I am not sure if it can be changed. If somebody can tell me how to change the baud rate of the router, then by all means let me know!

XBee hookup to Router

Go here for WRT54 pinouts - Serial port pinouts#Linksys WRT-54G(S,L) The pinouts shown below are for serial port 0 on the router. Serial port 0 is connected to the terminal output of the router, when everything is connected properly and you boot up the router, you will see the terminal output from the router. To attach to serial port 1, see the link above for the pinouts.

Attach the 3.3Volt of the XBee carrier board to pin 1

Attach the GND pin of the XBee carrier board to pin 9

Attach the TX pin of the XBee carrier board to pin 6

Attach the RX pin of the XBee carrier board to pin 4

Xbee Hookup to FTDI Cable

Go to this link for a picture on how to attach the the FTDI cable to the Xbee Carrier board(http://www.ladyada.net/make/xbee/wiring.html). Scroll down to about the third picture and you should see how to attach the cable to the Xbee carrier board.

Other Routers

For other routers, simply apply power to the 3.3 volt terminal on the Xbee board and hook up the grounds. You need to switch the connections for the RX and TX terminals between the router and the Xbee Carrier board. For example, hook the TX from the router serial port to the RX on the Xbee carrier board, and hook up the RX from the router serial port to the TX of the Xbee carrier board.

Device Usage

I plan on using this setup to read in sensor data from an Ardiuno and send it to the router. The router will then send the data to a remote computer or server. This is work in progress and when fully functional will expand the information and post pictures...

If You Brick an Xbee...

!!!Warning - I am not sure if this could further damage your radio and I will not be held responsible - however this trick worked for me!!!

Here is a procedure that brought back a radio that I could not talk to through XCTU. Take the Xbee out of the carrier board, attach the carrier board to the FTDI cable, and start up the XCTU software. Go to the Modem Configuration tab (remember to set your com port) and select your modem from the drop down list and also select the latest firmware. Press the Write button and an Info box should pop up. Carefully replace the Xbee back into the carrier board, press the cancel button and then press the Write button again. If you are lucky, the Xbee may be brought back to life.

Help Could somebody move this page to the hardware diy or point me in the direction so I can move it?