Difference between revisions of "HOWTO:Modify the ASUS hardware"

From Embedded Xinu
Jump to navigation Jump to search
(Created page with 'Category:HOWTO == Summary == The purpose of this walk through is to explain how to add hardware to the ASUS wl-330gE router to take advantage of the serial port on the router...')
 
 
(12 intermediate revisions by the same user not shown)
Line 20: Line 20:
 
|-  
 
|-  
 
| 1
 
| 1
| Linksys [[WRT54GL]] Router
+
| ASUS [[wl-330gE]] Router
| 802.11b/g wireless broadband router
+
| 802.11b/g wireless access point
| [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&childpagename=US%2FLayout&cid=1133202177241&pagename=Linksys%2FCommon%2FVisitorWrapper Linksys WRT54GL]
+
| [http://usa.asus.com/ ASUS wl-330gE]
| ~$65.00
+
| ~$40.00
 
|-
 
|-
 
| 1
 
| 1
| Ribbon cable
+
| IDC socket connector
| 28 AWG, 10 conductor, 25'
+
| 4 pin header
| Jameco  643508CM
+
| Jameco   
| $4.99
+
|  
 
|-
 
|-
| 2
+
| 1
 
| IDC socket connector
 
| IDC socket connector
| 0.1”, 10 conductor
+
| 5 pin header
| Jameco  32491CM
+
| Jameco   
| $0.25
+
|  
 
|-
 
|-
| 2
+
| 1
 
| IDC shrouded double header
 
| IDC shrouded double header
 
| 0.1”, 10 conductor
 
| 0.1”, 10 conductor
Line 65: Line 65:
 
| 22AWG,SOLDER CUP
 
| 22AWG,SOLDER CUP
 
| Jameco 15771CM
 
| Jameco 15771CM
| $0.59
 
|-
 
| 1
 
| DB9 Male
 
| 22AWG,SOLDER CUP
 
| Jameco 15747CM
 
 
| $0.59
 
| $0.59
 
|-
 
|-
Line 87: Line 81:
 
=== Task One: Open the Router ===
 
=== Task One: Open the Router ===
  
Using a screwdriver, remove the two nails located underneath the router and getnly remove the top of the router from the bottom, revealing the PCB.
+
Using a screwdriver, remove the two nails located underneath the router and gently remove the top of the router from the bottom, revealing the PCB.
  
 
'''DO NOTE: This is where the warranty on the router is voided!'''
 
'''DO NOTE: This is where the warranty on the router is voided!'''
Line 93: Line 87:
 
=== Task Two: Attach the Serial Header ===
 
=== Task Two: Attach the Serial Header ===
  
The PCB is easily removable at this state from the router. Located in the center of the PCB is the Broadcom BCM535 chip. Above the chip are four holes that are aligned vertically. The four holes represent the input and output for the serial interface, along with the 3.3 volt power and ground sources for the serial port.
+
The PCB is easily removable at this state from the router. Located in the center of the PCB is the Broadcom BCM5354 chip. Above the chip are four holes that are aligned vertically. The four holes represent the input and output for the serial interface, along with the 3.3 volt power and ground sources for the serial port.
  
 
For easier connectivity, we can use a 4-pin header on the board to easily attach and detach a 4 connection cable. Use a soldering iron to solder the 4-pin header onto the board.  
 
For easier connectivity, we can use a 4-pin header on the board to easily attach and detach a 4 connection cable. Use a soldering iron to solder the 4-pin header onto the board.  
  
O Ground
+
<h3 style="clear:both;"> Task Three: Create space for access to serial port on the router </h3>
O Transmit
 
O Receive
 
O 3.3 V
 
 
 
[ ] Broadcom Chip
 
<h3 style="clear:both;"> Task Three: Create the ADM202 Transceiver Circuit Board </h3>
 
 
 
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!
+
Using a dremel or other power tool, carefully cut out a rectangular shaped hole on the faceplate of the router. The hole should be cut above the words “Portable” and it should be 3 mm wide and 1 cm in height, or enough to see the serial port through the hole. This will be used for a 4-wired cable to attach the router to the transceiver board, detailed in step seven.  
  
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.
+
<h3 style="clear:both;"> Task Four: Creating the ADM202 Transceiver Circuit Board </h3>
 +
[[Image:Transceiver_schematic_wl-330gE.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 port.]]
 +
[[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.]]
  
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.
+
A transceiver circuit is needed to convert the 3.3 volt serial signals from the router to conventional RS-232 serial voltages. To do this, we need a small square of “perf board”, or other circuit prototyping techniques. A soldering iron needs to be used to solder the components onto the board.
  
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.
+
Solder the shrouded double header, the socket, and the capacitors onto the board. The direction of the pins matter due to their polarity.
 +
 +
Once the components have been placed on the board, use a continuity tester to check the connection between the header soldered into the router's board and the socket on the transceiver board. Now the ADM202 chip can be inserted onto the board. Next, wires need to be soldered onto the bottom of the transceiver board. Since this router only has one transceiver board, only three of the holes need wires. Under the J2 label, solder wires into the two left most holes. Under the J1 label, which is under the chip, solder a wire on the right most hole.  
  
<h3 style="clear:both;"> Task Four: Attach Tranceiver Board to the Router</h3>
+
<h3 style="clear:both;"> Task Five: Attach Transceiver Board to the Router</h3>
 +
The easiest way to accomplish this is to use an 4-wire audio cable between the router's serial header and the shrouded double header on the transceiver board. Using the 4-pin header on the router, connect the four wires from the audio cable into the 4-pin header. On the transceiver board, follow the diagram to match the corresponding cables on the shrouded double header, but using a 5-pin serial header to easily attack to the shrouded double header.
 +
[[Image:Serial_Port_Connection.jpeg|thumb|400px|left|Schematic showing the connections between the components of the ADM202 transceiver circuit board and between the board and the DB9 serial port.]]
  
[[Image:Tranceiver attached.jpg|thumb|200px|left|Transceiver board attached via ribbon cable to the serial header soldered into the router's board.]]
+
=== Task Six: Attach Transceiver Board to DB9 Serial Ports ===
[[Image:Front sticker.jpg|thumb|75px|right]]
+
Since the router is very small, it will not have space to place the DB9 Serial Port. Therefore, a small container needs to be created to encase all of the components. This will be discussed in step seven.  
[[Image:Front.jpg|thumb|75px|right]]
+
Take the three wires from the transceiver board and attach them to the DB9 female according to the diagram. Make sure that the solder cups 1, 4, and 6 are connected to each other and solder cups 7 and 8 are connected to each other in the DB9 Female serial port. 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.  
[[Image:Drilled front.jpg|thumb|75px|right]]
+
[[Image:DB9_serial_port_wiring.jpeg|thumb|400px|right|Diagram demonstrating proper wiring between the transceiver board and the DB9 serial port.]]
 
 
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.
 
 
 
[[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:
 
{|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 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 ===
+
Now you can use a continuity tester to make sure that all the connections are good and that no wires or solder cups are touching. The router should be placed back it its case, and the box keeping all the components together should separate the router from the transceiver board. It will be very bad if the circuit board and the transceiver board were to touch.
  
[[Image:Complete.jpg|thumb|500px|center|Now you have a WRT54GL with two serial ports installed and ready to run your own operating system.]]
+
=== Task Seven: Creating a box case for the component ===
 +
The ASUS router is small, but because of this, there is no space for the DB9 female serial port, the adaptor, the relay, and the transceiver board. Because of this, a box is needed to enclose all of these components together. The box should have holes cut out for the DB9 female serial port, the power adapter and the Ethernet port. Also, a small barrier needs to be placed between the transceiver board and the relay so they do not meet. The PCB can be safely placed inside the ASUS router case.
  
 
== What to do next? ==
 
== What to do next? ==

Latest revision as of 14:00, 11 August 2010

Summary

The purpose of this walk through is to explain how to add hardware to the ASUS wl-330gE router to take advantage of the serial port on the router and use it to communicate with the serial console for Xinu. This communication is important for interacting with the Common Firmware Environment's, or CFE, command line interface which is necessary 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 ASUS wl-330gE Router 802.11b/g wireless access point ASUS wl-330gE ~$40.00
1 IDC socket connector 4 pin header Jameco
1 IDC socket connector 5 pin header Jameco
1 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

(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

Using a screwdriver, remove the two nails located underneath the router and gently remove the top of the router from the bottom, revealing the PCB.

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

Task Two: Attach the Serial Header

The PCB is easily removable at this state from the router. Located in the center of the PCB is the Broadcom BCM5354 chip. Above the chip are four holes that are aligned vertically. The four holes represent the input and output for the serial interface, along with the 3.3 volt power and ground sources for the serial port.

For easier connectivity, we can use a 4-pin header on the board to easily attach and detach a 4 connection cable. Use a soldering iron to solder the 4-pin header onto the board.

Task Three: Create space for access to serial port on the router

Using a dremel or other power tool, carefully cut out a rectangular shaped hole on the faceplate of the router. The hole should be cut above the words “Portable” and it should be 3 mm wide and 1 cm in height, or enough to see the serial port through the hole. This will be used for a 4-wired cable to attach the router to the transceiver board, detailed in step seven.

Task Four: Creating 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 port.
Blank transceiver board before adding components.
Transceiver board with all components in place except ribbon cables.

A transceiver circuit is needed to convert the 3.3 volt serial signals from the router to conventional RS-232 serial voltages. To do this, we need a small square of “perf board”, or other circuit prototyping techniques. A soldering iron needs to be used to solder the components onto the board.

Solder the shrouded double header, the socket, and the capacitors onto the board. The direction of the pins matter due to their polarity.

Once the components have been placed on the board, use a continuity tester to check the connection between the header soldered into the router's board and the socket on the transceiver board. Now the ADM202 chip can be inserted onto the board. Next, wires need to be soldered onto the bottom of the transceiver board. Since this router only has one transceiver board, only three of the holes need wires. Under the J2 label, solder wires into the two left most holes. Under the J1 label, which is under the chip, solder a wire on the right most hole.

Task Five: Attach Transceiver Board to the Router

The easiest way to accomplish this is to use an 4-wire audio cable between the router's serial header and the shrouded double header on the transceiver board. Using the 4-pin header on the router, connect the four wires from the audio cable into the 4-pin header. On the transceiver board, follow the diagram to match the corresponding cables on the shrouded double header, but using a 5-pin serial header to easily attack to the shrouded double header.

Schematic showing the connections between the components of the ADM202 transceiver circuit board and between the board and the DB9 serial port.

Task Six: Attach Transceiver Board to DB9 Serial Ports

Since the router is very small, it will not have space to place the DB9 Serial Port. Therefore, a small container needs to be created to encase all of the components. This will be discussed in step seven. Take the three wires from the transceiver board and attach them to the DB9 female according to the diagram. Make sure that the solder cups 1, 4, and 6 are connected to each other and solder cups 7 and 8 are connected to each other in the DB9 Female serial port. 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.

Diagram demonstrating proper wiring between the transceiver board and the DB9 serial port.

Now you can use a continuity tester to make sure that all the connections are good and that no wires or solder cups are touching. The router should be placed back it its case, and the box keeping all the components together should separate the router from the transceiver board. It will be very bad if the circuit board and the transceiver board were to touch.

Task Seven: Creating a box case for the component

The ASUS router is small, but because of this, there is no space for the DB9 female serial port, the adaptor, the relay, and the transceiver board. Because of this, a box is needed to enclose all of these components together. The box should have holes cut out for the DB9 female serial port, the power adapter and the Ethernet port. Also, a small barrier needs to be placed between the transceiver board and the relay so they do not meet. The PCB can be safely placed inside the ASUS router case.

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.