Difference between revisions of "Modify the Linksys hardware"

From Embedded Xinu
Jump to navigation Jump to search
(Fixed the spelling of Linksys)
 
(39 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
[[Category:HOWTO]]
 
== Summary ==
 
== Summary ==
  
This will walk through adding hardware to a LinkSys WRT54GL wireless router that will take advantage of existing leads on the PCB for two UART connections, which will be exposed as DB9 connectors mounted to the faceplate of the router.  These connections can be used to communicate with the serial console for [[XINU]] or for [[OpenWRT]], and also to interact with the Common Firmware Environment's command line interface.  Gaining direct access to [[CFE]] is a key step towards being able to run custom code on the router.
+
This will walk through adding hardware to a [http://www.linksys.com Linksys] [[WRT54GL]] wireless router that will take advantage of existing connections on the PCB for two UART connections, which will be exposed as DB9 serial port connectors mounted to the faceplate of the router.  These connections can be used to communicate with the serial console for [[XINU]] and also to interact with the [[Common Firmware Environment]]'s command line interface.  Gaining direct access to [[CFE]] is a key step towards being able to run [[XINU]] on the router.
  
 
== Before Starting ==
 
== Before Starting ==
  
=== Install OpenWRT [Recommended] ===
+
'''NOTE:''' The following lists all the ''necessary'' parts. However, the following tutorial describes assembling the transceiver on one of our custom transceiver boards. One could assemble the parts of the entire transceiver properly without the board, but with more difficulty.  Our transceiver board design is freely available for public use.
 
+
[http://www.mscs.mu.edu/~brylow/xinu/Xinu-Transceiver.ps Transceiver schematic] is in postscript format, suitable for [http://opencircuitdesign.com/xcircuit/ XCircuit].
While the purpose of this HOWTO is a hardware modification, the fruits of our labor will be in software functionality. In order to place a light at the end of this tunnel, it would be a good idea to [[HOWTO:Install_OpenWRT|install OpenWRT]] using the instructions provided on this wiki. OpenWRT by default runs a console on UART0, and so once the connection is made properly you need only to send an <code>enter</code> into the input and you will be provided with a root console on the router. It's a very satisfying way of confirming that you've done everything correctly.
+
[http://www.mscs.mu.edu/~brylow/xinu/Xinu-Transceiver.pcb Transceiver PCB layout] is in [http://pcb.sourceforge.net/ PCB format].
 +
[http://www.mscs.mu.edu/~brylow/xinu/Xinu-Transceiver.tgz Transceiver fabrication tarball] contains Gerber photoplotter and CNC drill files suitable for professional fabrication.
 +
(No warranty express or implied, obviously.)
  
 
=== Parts List ===
 
=== Parts List ===
Line 18: Line 21:
 
|-  
 
|-  
 
| 1
 
| 1
| LinkSys [[WRT54GL]] Router
+
| Linksys [[WRT54GL]] Router
 
| 802.11b/g wireless broadband router
 
| 802.11b/g wireless broadband router
| LinkSys WRT54GL
+
| [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&childpagename=US%2FLayout&cid=1133202177241&pagename=Linksys%2FCommon%2FVisitorWrapper Linksys WRT54GL]
 
| ~$65.00
 
| ~$65.00
 
|-
 
|-
Line 29: Line 32:
 
| $4.99
 
| $4.99
 
|-
 
|-
| 1
+
| 2
 
| IDC socket connector
 
| IDC socket connector
 
| 0.1”, 10 conductor  
 
| 0.1”, 10 conductor  
Line 35: Line 38:
 
| $0.25
 
| $0.25
 
|-
 
|-
| 1
+
| 2
| IDC shrouded header
+
| IDC shrouded double header
 
| 0.1”, 10 conductor
 
| 0.1”, 10 conductor
 
| Jameco 67811CM
 
| Jameco 67811CM
Line 42: Line 45:
 
|-
 
|-
 
| 1
 
| 1
| RS232 Transmitter/Receiver
+
| ADM202 Transceiver Chip
| IC 2DVR/2RCVR RS232 5V 20-DIP
+
| Serial Transceiver ADM202EAN
| DigiKey MAX233CPP-ND
+
| Jameco 1800464
| $7.45
+
| $1.60
 +
|-
 +
| 2
 +
| Capacitor 220 nF
 +
| Tantalum,.22uF,35V,10%
 +
| Jameco 33507
 +
| $0.18
 +
|-
 +
| 3
 +
| Capacitor 100 nF
 +
| Tantalum,.1uF,35V,10%
 +
| Jameco 33488
 +
| $0.22
 
|-
 
|-
 
| 1
 
| 1
Line 66: Line 81:
 
* Soldering Iron
 
* Soldering Iron
 
* Dremel tool (for cutting holes in plastic case)
 
* Dremel tool (for cutting holes in plastic case)
* Multimeter, or some other way of checking for proper connections
+
* Continuity Tester (Multimeter, or some other way of checking for proper connections)
 +
* Voltmeter (Multimeter will work for this, too)
  
 
== Steps to Modify the Hardware ==
 
== Steps to Modify the Hardware ==
Line 72: Line 88:
 
=== Task One: Open the Router ===
 
=== Task One: Open the Router ===
  
[[Image:Opening-linksys.jpg|thumb|400px|center|It's really very easy... almost <em>too</em> easy.]]
+
[[Image:Opening-linksys.jpg|thumb|400px|center|It's really very easy.]]
  
As others have done, I will defer to Void Main, who provides nice [http://voidmain.is-a-geek.net/redhat/wrt54g_revival.html illustrated opening instructions].
+
There are no screws or tools needed to open the router, just pop open the front with your thumbs as shown in the picture.  Some nice [http://voidmain.is-a-geek.net/redhat/wrt54g_revival.html illustrated opening instructions] can be found for a more detailed explanation of this step.
  
'''DO NOTE: This is where the warranty on the router is voided!''' (But really, you know there's no ''real'' fun to be had unless a warranty gets voided somewhere.)
+
'''DO NOTE: This is where the warranty on the router is voided!'''
  
 
=== Task Two: Attach the Serial Header ===
 
=== Task Two: Attach the Serial Header ===
  
 
[[Image:Wrt54gl-layout.jpg|thumb|250px|left|An overhead view to get your bearings. The serial header is (D) here.]]
 
[[Image:Wrt54gl-layout.jpg|thumb|250px|left|An overhead view to get your bearings. The serial header is (D) here.]]
Now that your PCB is naked, locate the serial header holes provided by LinkSys. This would be a grid of 10 holes (5x2) located on the bottom-right corner of the board when the antennae stubs are on top (see the top-down photo for clarification). These ten holes hold all of the input and output for the two serial interfaces--UART0, and UART1--on the device. ([[OpenWRT]] by default runs a console on UART0, so we have something to look forward to here!)
+
 
 +
First you need to unscrew the two screws keeping the router's board attached to the case. Once the PCB has been removed from the case, locate the serial header holes provided by Linksys. This would be a grid of 10 holes (5x2) located on the bottom-right corner of the board when the antennae stubs are on top (see the top-down photo for clarification). These ten holes hold all of the input and output for the two serial interfaces--UART0, and UART1--on the device.
  
 
[[Image:Serial.jpg|thumb|250px|right|A closer look at our attached serial header.]]
 
[[Image:Serial.jpg|thumb|250px|right|A closer look at our attached serial header.]]
Now, we could just solder wires right onto these holes, but a by placing a nice 10-pin header on the board we can easily attach and detach a 10 connection cable.  This is where you will use your '''soldering iron''' to solder the '''IDC shrouded header''' onto the board.
 
  
This will be the only soldering that you have to do on the LinkSys PCB.  The rest of the work will be done wiring the MAX233A transceiver and the DB9 connectors correctly and then the contraption just has to be plugged it into this header.
 
  
=== Task Three: Wire Serial Header to MAX233A ===
+
Now, we could just solder wires right onto these holes, but a by placing a nice 10-pin header on the board we can easily attach and detach a 10 connection cable.  Here you will use your '''soldering iron''' to solder the '''IDC shrouded double header''' onto the board. Make sure to note where the 1 pin is on the board (marked with a square around the hole instead of a circle) and where the 1 pin is located on the header (on ours it was marked with a triangle). Make sure that these two line up when soldering the header into the board.
 +
<h3 style="clear:both;"> Task Three: Create the ADM202 Transceiver Circuit Board </h3>
  
Using information on the [[Wiring]] page, make the connections from the '''IDC shrouded header''' to the [[Wiring|MAX233A RS232 Transmitter/Receiver]] chip using your '''soldering iron'''.  As you can see from the [[Pictures|Build Pictures]] page, we did this with the '''ribbon cable''' from our parts list. The '''IDC socket connector''' goes on one end of the cable, and the correct connections are made to the '''RS232 Transmitter/Receiver''' on the other. Because we will be mounting our DB9 connectors to the front of the case, this will allow for easy disconnection and opening of the case.  In terms of cable length, try and decide where you are going to mount the MAX233A on the outer case so you can estimate correctly.
+
[[Image:Transceiver schematic.JPG|thumb|400px|left|Schematic showing the connections between the components of the ADM202 transceiver circuit board and between the board and the DB9 serial ports.]]
 +
[[Image:Transceiver board.jpg|thumb|150px|right|Blank transceiver board before adding components.]]
 +
[[Image:Complete transceiver board.jpg|thumb|150px|right|Transceiver board with all components in place except ribbon cables.]]
 +
[[Image:Completed transceiver.jpg|thumb|400px|left|Complete transceiver board with all components in place.]]
  
''Be sure to test all of your connections thoroughly before proceeding.''
+
The next step is to build the transceiver circuit, which converts the 3.3 volt serial signals from the router to conventional RS-232 serial voltages.  The circuit includes only a handful of components, so it can be assembled using a small square of "perf board", or a variety of other inexpensive circuit prototyping techniques.  We use a custom-made printed circuit board to simplify assembly, as shown here.  (Link to page with PCB specs, and directions.)  Again, you'll need your '''soldering iron''' to secure the different pieces in the transceiver board.
  
=== Task Four: Wire the DB9 Connectors to the MAX233A ===
+
Using the diagram on the left, solder the '''shrouded double header''', the '''socket''', and the '''capacitors''' into the board in the appropriate places. '''NOTE:''' the positions of the components on the physical board are not represented in the diagram, but the silkscreen on the board indicates placement and orientation.  '''FURTHER NOTE:''' each component has a proper polarity or pin marking -- direction matters!
  
[[Image:faceplate.jpg|thumb|200px|right|This is the final version of the faceplate of our router, with the two external serial ports attached and ready to go.]]
+
The pictures to the right show the transceiver board in various stages of completion. The top one shows the blank board on which the other components will be added. The bottom one shows the '''shrouded double header''', the '''socket''', and the '''capacitors''' soldered in place. It also shows the actual ADM202 chip inserted into the socket, however, before inserting the chip it is a good idea to test what you've completed so far.  
  
For the following connections, you are going to use the '''soldering iron''' and either chopped up portions of the '''ribbon cable''' or some other wire (which would probably be more convenient).
+
Use a '''continuity tester''' to check the connection between the header soldered into the router's board and the socket on your transceiver board. The next step we recommend for testing your work is to plug in the router and use a '''voltmeter''' to check that the ''ground'' and ''power'' pins on the socket (pins 15 and 16) are registering at 3.3 volts. Now, actually insert the ADM202 chip into the socket and power up the router again, making sure that the lights turn on and nothing shorts out.
  
Checking the [[Wiring|wiring diagram]] again, note that there are several loopback connections per DB9 connector in order to fake RS232 hardware flow control compliance.  It would be a good idea to get these out of the way first.  Then, make the connections required from the '''RS232 Transmitter/Receiver''' to the DB9 connectors, remembering to leave enough slack for where you plan on mounting the MAX233A and the connectors.
+
The next step is to get six wires from a chopped up piece of the ribbon cable (or any six spare wires) and solder them into place in the six holes (two sets of three) at the bottom of the transceiver board. The resulting completed transceiver board should look something like the picture below the diagram.
  
''Again, before mounting anything, test that all connections correspond to the diagram.''
+
<h3 style="clear:both;"> Task Four: Attach Tranceiver Board to the Router</h3>
  
=== Task Five: Mount DB9 Connectors to the Router Faceplate ===
+
[[Image:Tranceiver attached.jpg|thumb|200px|left|Transceiver board attached via ribbon cable to the serial header soldered into the router's board.]]
 +
[[Image:Front sticker.jpg|thumb|75px|right]]
 +
[[Image:Front.jpg|thumb|75px|right]]
 +
[[Image:Drilled front.jpg|thumb|75px|right]]
  
Using your trusty '''dremel''' cut a few DB9 shaped holes in the plastic casing of the router. There are several options for placement; we chose the front so that multiple routers would still be stackable.  The picture at right shows the placement of our connectors with wires attached. The fit is quite tight; you may wish to consider only installing one jack (you only need port 0 to communicate with the router, and we have yet to confirm that port 1 works correctly) or installing them horizontally instead of vertically.
+
First take a piece of ribbon cable and attach each end to one of your IDC socket connectors. Notice the marker on the connector that signifies where pin 1 of the header will connect to. Make sure that the same side of the ribbon cable is attached to the marked side of both connectors. In other words make sure that the same wire will line up with pin 1 on both headers when the connectors are eventually attached to the headers. The next step is to actually plug in the connectors to the headers. Attach one connector to the header we soldered into the router's board and the other connector to the header we soldered into the transceiver board. The result should look something like the picture to the left. Now is a good time to reattach the router's board to its case by screwing the two screws into place and then closing up both black pieces of the back part of the router's case.
  
Using either epoxy or mounting screws (I believe we used a combination of both, as one of our jacks could not fit a hole for a screw), secure the connectors to the case.
+
=== Task Five: Attach Transceiver Board to DB9 Serial Ports ===
  
''Following the theme, now would be a good time to do a final test on all connections, because next we are closing things up.''
+
Before soldering the wires from the transceiver board to the serial ports, it is a good idea to drill two holes in the front of the router's casing to use for the serial ports and also two small holes on each side of the bigger ones to use for screws or bolts to keep the '''DB9 Serial Ports''' in place. The three pictures to the right show how to take off the front sticker and what the case should look like after you've drilled two holes in the front for the serial ports. It is also a good idea to cut the sticker and place the left part back on to cover up the remaining holes in the casing.
  
=== Task Six: Close the Router ===
+
[[Image:Serial ports diagram.JPG|thumb|300px|left|Diagram of wiring to connect the two DB9 serial ports to the transceiver board.]]
 +
 
 +
Next, feed the six wires coming from the transceiver board through the two holes you just drilled. Make sure that the three wires soldered into the holes marked '''J1''' on the transceiver board go through the hole on the left of the front of the router and the three wires soldered into the holes marked '''J2''' on the transceiver board go through the hole on the right of the front of the router.
 +
 
 +
Following the diagram to the left, solder some spare wires or chopped pieces of ribbon cable into the two DB9 serial ports. Notice that solder cups 1, 4, and 6 are connected to each other and solder cups 7 and 8 are connected to each other on both the '''DB9 Female''' and '''DB9 Male''' serial ports. Then, again following the diagram, solder in the wires coming from '''J1''' into the appropriate solder cups of the '''DB9 Female''' and the wires coming from '''J2''' into the appropriate solder cups of the '''DB9 Male'''.
 +
 
 +
Notice that in the case of the '''DB9 Female''' the ''T1OUT'' pin of the ADM202 transceiver chip needs to be connected to solder cup 2, the ''R1IN'' pin of the ADM202 transceiver chip needs to be connected to solder cup 3, and the ''ground'' needs to be connected to solder cup 5.
 +
 
 +
Also, notice that in the case of the '''DB9 Male''' the ''R2IN'' pin of the ADM202 transceiver chip needs to be connected to solder cup 2, the ''T2OUT'' pin of the ADM202 transceiver chip needs to be connected to solder cup 3, and the ''ground'' needs to be connected to solder cup 5.
 +
 
 +
Feeding the wires through the holes and connecting the serial ports in this way ensures that the router's primary serial device will be connected to the '''DB9 Female''' serial port and will be located on the left side while the router's secondary serial device will be connected to the '''DB9 Male''' serial port and will be located on the right side of the front of the router.
 +
 
 +
After all the soldering is done it is a good idea to use a '''continuity tester''' to make sure that all the connections are good and no wires or solder cups may be accidentally touching. Your result should look something like the pictures below. Now is a good time to tape the transceiver board down to the front of the case. It would be extremely bad for the transceiver board to rub up against the router's circuit board when it was plugged in.
 +
 
 +
 
 +
 
 +
[[Image:Serial ports done1.jpg|thumb|300px|right|Overhead picture of what the router will look like after the DB9 serial ports are correctly soldered into place, but before they have been screwed and secured into the router's case.]]
 +
[[Image:Serial ports done.jpg|thumb|300px|left|Front view of what the router will look like after the DB9 serial ports are correctly soldered into place, but before they have been screwed and secured into the router's case.]]
 +
 
 +
<h3 style="clear:both;"> Task Six: Close the Router </h3>
  
 
This final task is best described in photos:
 
This final task is best described in photos:
{|
+
{|align="center"
 
|-
 
|-
| [[Image:attach-back.jpg|thumb|350px|Now that everything is connected we can re-assemble it.  First you put on the back/top half.  Keyed ribbon cable is plugged in to serial port header on circuit board.]]
+
| [[Image:Attach Back.jpg|thumb|350px|Now that everything is connected we can re-assemble it.  First you put on the back/top half.  Keyed ribbon cable is plugged in to serial port header on circuit board.]]
| [[Image:attach-front.jpg|thumb|350px|Next you can carefully install the front half (making sure not to break any of the wires we have).]]
+
| [[Image:Attach Front.jpg|thumb|350px|Next you can carefully install the front half (making sure not to break any of the wires we have).]]
 
|-
 
|-
 
|}
 
|}
 +
 
=== Task Seven: Rejoice ===
 
=== Task Seven: Rejoice ===
  
[[Image:final.jpg|thumb|500px|center|Now you have a WRT54GL with two serial ports installed and ready to run your own operating system.]]
+
[[Image:Complete.jpg|thumb|500px|center|Now you have a WRT54GL with two serial ports installed and ready to run your own operating system.]]
  
 
== What to do next? ==
 
== What to do next? ==
  
If you have OpenWRT installed, the first thing to do is to connect UART0 to a computer and follow the next HOWTO on using a PC to [[HOWTO:Connect to a modified router|connect to a modified router]].
+
Connect UART0 (the DB9 Female serial port) to a computer and follow the next HOWTO on using a PC to [[HOWTO:Connect to a modified router|connect to a modified router]].
 +
 
 +
 
 +
<hr/>
 +
''This work is supported in part by NSF grant DUE-CCLI-0737476.''

Latest revision as of 22:58, 28 June 2009

Summary

This will walk through adding hardware to a Linksys WRT54GL wireless router that will take advantage of existing connections on the PCB for two UART connections, which will be exposed as DB9 serial port connectors mounted to the faceplate of the router. These connections can be used to communicate with the serial console for XINU and also to interact with the Common Firmware Environment's command line interface. Gaining direct access to CFE is a key step towards being able to run XINU on the router.

Before Starting

NOTE: The following lists all the necessary parts. However, the following tutorial describes assembling the transceiver on one of our custom transceiver boards. One could assemble the parts of the entire transceiver properly without the board, but with more difficulty. Our transceiver board design is freely available for public use. Transceiver schematic is in postscript format, suitable for XCircuit. Transceiver PCB layout is in PCB format. Transceiver fabrication tarball contains Gerber photoplotter and CNC drill files suitable for professional fabrication. (No warranty express or implied, obviously.)

Parts List

Quantity Part Name Details Part / Model Number Price
1 Linksys WRT54GL Router 802.11b/g wireless broadband router Linksys WRT54GL ~$65.00
1 Ribbon cable 28 AWG, 10 conductor, 25' Jameco 643508CM $4.99
2 IDC socket connector 0.1”, 10 conductor Jameco 32491CM $0.25
2 IDC shrouded double header 0.1”, 10 conductor Jameco 67811CM $0.33
1 ADM202 Transceiver Chip Serial Transceiver ADM202EAN Jameco 1800464 $1.60
2 Capacitor 220 nF Tantalum,.22uF,35V,10% Jameco 33507 $0.18
3 Capacitor 100 nF Tantalum,.1uF,35V,10% Jameco 33488 $0.22
1 DB9 Female 22AWG,SOLDER CUP Jameco 15771CM $0.59
1 DB9 Male 22AWG,SOLDER CUP Jameco 15747CM $0.59

(We provide this parts list as a data point; we offer no guarantees about current prices, and it is not our intent to endorse any particular vendor.)

Tools List

  • Soldering Iron
  • Dremel tool (for cutting holes in plastic case)
  • Continuity Tester (Multimeter, or some other way of checking for proper connections)
  • Voltmeter (Multimeter will work for this, too)

Steps to Modify the Hardware

Task One: Open the Router

It's really very easy.

There are no screws or tools needed to open the router, just pop open the front with your thumbs as shown in the picture. Some nice illustrated opening instructions can be found for a more detailed explanation of this step.

DO NOTE: This is where the warranty on the router is voided!

Task Two: Attach the Serial Header

An overhead view to get your bearings. The serial header is (D) here.

First you need to unscrew the two screws keeping the router's board attached to the case. Once the PCB has been removed from the case, locate the serial header holes provided by Linksys. This would be a grid of 10 holes (5x2) located on the bottom-right corner of the board when the antennae stubs are on top (see the top-down photo for clarification). These ten holes hold all of the input and output for the two serial interfaces--UART0, and UART1--on the device.

A closer look at our attached serial header.


Now, we could just solder wires right onto these holes, but a by placing a nice 10-pin header on the board we can easily attach and detach a 10 connection cable. Here you will use your soldering iron to solder the IDC shrouded double header onto the board. Make sure to note where the 1 pin is on the board (marked with a square around the hole instead of a circle) and where the 1 pin is located on the header (on ours it was marked with a triangle). Make sure that these two line up when soldering the header into the board.

Task Three: Create the ADM202 Transceiver Circuit Board

Schematic showing the connections between the components of the ADM202 transceiver circuit board and between the board and the DB9 serial ports.
Blank transceiver board before adding components.
Transceiver board with all components in place except ribbon cables.
Complete transceiver board with all components in place.

The next step is to build the transceiver circuit, which converts the 3.3 volt serial signals from the router to conventional RS-232 serial voltages. The circuit includes only a handful of components, so it can be assembled using a small square of "perf board", or a variety of other inexpensive circuit prototyping techniques. We use a custom-made printed circuit board to simplify assembly, as shown here. (Link to page with PCB specs, and directions.) Again, you'll need your soldering iron to secure the different pieces in the transceiver board.

Using the diagram on the left, solder the shrouded double header, the socket, and the capacitors into the board in the appropriate places. NOTE: the positions of the components on the physical board are not represented in the diagram, but the silkscreen on the board indicates placement and orientation. FURTHER NOTE: each component has a proper polarity or pin marking -- direction matters!

The pictures to the right show the transceiver board in various stages of completion. The top one shows the blank board on which the other components will be added. The bottom one shows the shrouded double header, the socket, and the capacitors soldered in place. It also shows the actual ADM202 chip inserted into the socket, however, before inserting the chip it is a good idea to test what you've completed so far.

Use a continuity tester to check the connection between the header soldered into the router's board and the socket on your transceiver board. The next step we recommend for testing your work is to plug in the router and use a voltmeter to check that the ground and power pins on the socket (pins 15 and 16) are registering at 3.3 volts. Now, actually insert the ADM202 chip into the socket and power up the router again, making sure that the lights turn on and nothing shorts out.

The next step is to get six wires from a chopped up piece of the ribbon cable (or any six spare wires) and solder them into place in the six holes (two sets of three) at the bottom of the transceiver board. The resulting completed transceiver board should look something like the picture below the diagram.

Task Four: Attach Tranceiver Board to the Router

Transceiver board attached via ribbon cable to the serial header soldered into the router's board.
Front sticker.jpg
Front.jpg
Drilled front.jpg

First take a piece of ribbon cable and attach each end to one of your IDC socket connectors. Notice the marker on the connector that signifies where pin 1 of the header will connect to. Make sure that the same side of the ribbon cable is attached to the marked side of both connectors. In other words make sure that the same wire will line up with pin 1 on both headers when the connectors are eventually attached to the headers. The next step is to actually plug in the connectors to the headers. Attach one connector to the header we soldered into the router's board and the other connector to the header we soldered into the transceiver board. The result should look something like the picture to the left. Now is a good time to reattach the router's board to its case by screwing the two screws into place and then closing up both black pieces of the back part of the router's case.

Task Five: Attach Transceiver Board to DB9 Serial Ports

Before soldering the wires from the transceiver board to the serial ports, it is a good idea to drill two holes in the front of the router's casing to use for the serial ports and also two small holes on each side of the bigger ones to use for screws or bolts to keep the DB9 Serial Ports in place. The three pictures to the right show how to take off the front sticker and what the case should look like after you've drilled two holes in the front for the serial ports. It is also a good idea to cut the sticker and place the left part back on to cover up the remaining holes in the casing.

Diagram of wiring to connect the two DB9 serial ports to the transceiver board.

Next, feed the six wires coming from the transceiver board through the two holes you just drilled. Make sure that the three wires soldered into the holes marked J1 on the transceiver board go through the hole on the left of the front of the router and the three wires soldered into the holes marked J2 on the transceiver board go through the hole on the right of the front of the router.

Following the diagram to the left, solder some spare wires or chopped pieces of ribbon cable into the two DB9 serial ports. Notice that solder cups 1, 4, and 6 are connected to each other and solder cups 7 and 8 are connected to each other on both the DB9 Female and DB9 Male serial ports. Then, again following the diagram, solder in the wires coming from J1 into the appropriate solder cups of the DB9 Female and the wires coming from J2 into the appropriate solder cups of the DB9 Male.

Notice that in the case of the DB9 Female the T1OUT pin of the ADM202 transceiver chip needs to be connected to solder cup 2, the R1IN pin of the ADM202 transceiver chip needs to be connected to solder cup 3, and the ground needs to be connected to solder cup 5.

Also, notice that in the case of the DB9 Male the R2IN pin of the ADM202 transceiver chip needs to be connected to solder cup 2, the T2OUT pin of the ADM202 transceiver chip needs to be connected to solder cup 3, and the ground needs to be connected to solder cup 5.

Feeding the wires through the holes and connecting the serial ports in this way ensures that the router's primary serial device will be connected to the DB9 Female serial port and will be located on the left side while the router's secondary serial device will be connected to the DB9 Male serial port and will be located on the right side of the front of the router.

After all the soldering is done it is a good idea to use a continuity tester to make sure that all the connections are good and no wires or solder cups may be accidentally touching. Your result should look something like the pictures below. Now is a good time to tape the transceiver board down to the front of the case. It would be extremely bad for the transceiver board to rub up against the router's circuit board when it was plugged in.


Overhead picture of what the router will look like after the DB9 serial ports are correctly soldered into place, but before they have been screwed and secured into the router's case.
Front view of what the router will look like after the DB9 serial ports are correctly soldered into place, but before they have been screwed and secured into the router's case.

Task Six: Close the Router

This final task is best described in photos:

Now that everything is connected we can re-assemble it. First you put on the back/top half. Keyed ribbon cable is plugged in to serial port header on circuit board.
Next you can carefully install the front half (making sure not to break any of the wires we have).

Task Seven: Rejoice

Now you have a WRT54GL with two serial ports installed and ready to run your own operating system.

What to do next?

Connect UART0 (the DB9 Female serial port) to a computer and follow the next HOWTO on using a PC to connect to a modified router.



This work is supported in part by NSF grant DUE-CCLI-0737476.