First things first. This project would have not even been started had it not
been for Brett Neumeier's encouragement, advice, and guidance. And when it came
time to actually get down to the business of soldering onto a motherboard,
it was an absolute joy to work with Jim Tinney, a veteran of the hardware
world. And Felix Fietkau of the
OpenWRT project gave these two excellent pieces of advice:
1) use a USB cell phone serial cable and perhaps more importantly:
2) the serial port is under the powersupply.
I owe a huge thanks to Brett, Jim, and Felix.
Here is a description of the process, including some photographs, of how we added a serial console to my Asus WL-700gE wireless router. I wish that Ace, the lovely photographer who took these pictures, had been present when Jim and I first installed the mod. Sadly, she was not. The pictures featured here are from an after-the-fact photoshoot of the tear-down and re-assembly. The big things that we won't see in these pictures are shots of us testing with things just alegator-clipped together prior to doing any soldering. Also we won't see any "action" shots of soldering, nor what the solders looked like prior to clipping them down with diags. For that, I am sorry. All these small images are linked to the higher resolution versions from which they were converted, so for a more detailed look just click through.
Why? Because it's there.
The bog-standard WL-700gE
costs
about
$240 and starts out looking like this:
And a
USB Data Cable For Siemens A55, C55, M55, S55, M56
can be obtained for about ten dollars.
Let's note that there are four warrenty void stickers
that get broken in this process. Two for the hardrive, which can be serviced by
simply unscrewing the thumbscrew in the left hand side of this shot and lifting
off the cover. And two for the rest of the unit which cover two of the screw
holes to get the darn thing apart in order to take a look at the mother board:

By the way, the stock hard drive is 160 Gig, and the filesystem is something
unusual. But the plan is to wipe that clean and turn it into a ReiserFS and to
put a traditional linux root filesystem there.
In the next three shots, we can see two cables snaking along the bottom of the
image. The black cable is standard, that's power feeding the power supply,
which is bundled in paper. Watch out. That's wall voltage there! No kidding,
this guy has it's own AC/DC converter and it is bundled inside of that white
paper and yellow tape square to the right of the image. You'll also see the
gray cable. That cable is old bit of Cat-5 Ethernet cable that Jim had in his
workshop. We only need three wires: Transmit (TX), Receive (RX), and Ground.

Here is a detail of the ethernet cable soldered into the connector that will
mount on the back panel of the unit. I purchased several types of connectors
and I wasn't sure what would make the most sense. I purchased a standard 9 pin
serial port, but I didn't wish to use that because this port is only 3.3 volts
and standard serial is (I think) 12 volts, so it would be potentially very bad
to have a misleading connection on the outside of the box. I also had a 4 pin
phone jack (RJ-11 if memory serves) ... but that seemed odd, because I don't
want it to look like a modem line either. Not to mention it is
extremely cramped inside that box, and both the jacks looked too big
to really fit on the back panel nor to have room to wire them in place inside.
It dawned on me that TX,RX,GRND could be represented with a TRS cable: Tip,
Ring, Sleeve. And it just so happens that Jim had some compact 1/8" stereo
headphone jacks that would be perfect for the job. So that settled it, if we
ever plug a pair of headphones in to the box in a moment of forgetfulness, at
least the unit will be unharmed.

Next we remove the two screws that are holding the power supply on; they,
along with the other 4 screws, fasten the motherboard to the case.
With the power supply out of the way, we can see where the other end of our
custom wire is soldered to the board. Pin 1 is left empty, and then we have
TX, RX, GRND.

In order to remove the board from the case, the buttons and the strange, clear,
plastic thing which acts as an LED light conduit, must first be removed. There
is some black tape on the buttons and the clear plastic piece. To make popping
out the buttons easier, you'll want to remove the black tape from them. Each
button has a pair of prongs that stick out to the sides. Press those in, and
the buttons can then be pushed forward out the front of the case. The clear
plastic piece can be pulled off the side of the case if you pry a little. For
both the button prongs and the plastic piece I suggest using a small slotted
(flat-head) screw-driver. Just be gentle, and don't be in a rush.

Even with the buttons and the clear plastic piece removed, removing the board
is tricky. It would be difficult for me to put into words but the forward edge
must be lifted, and then it can slide out of the back panel, popped out.
However, to lift the board up, there isn't much to grip on, and (on my unit
at least) this takes more pressure than I am 100% comfortable with. The best
advice I can give is to use as little force as possible, but as much is
required. It might help to whisper, "Oh please, oh please, oh please..." as you
work.
Here is the board removed from the case. From this angle we can see the numbers
on the vacant pin holes. Also we can see there are three sets
of un-used pins. Which one is the serial port? Well we had an O-Scope, but
Felix had already given us the clue, so we went straight to J10, and using a
plain multi-meter, found GRND right away. Then we guessed at TX and RX,
alagator clipped things together and tested that all worked as expected. When
we got that going, we soldered things in place.

Showing my total novice-ness in all this, when I was lining up the pins to
solder them in place, Jim smiled, took the board from me and showed me that it
is much easier if we flip the board over, poke the wires through from the
bottom, and then solder from the top. Duh. Obvious now that I see it. Okay, now
I know.
Here's a nice shot of everything all torn out of the box

In order to get everything to close again, which it's a very tight fit to begin
with, we had cut a piece out of the metal to make room for our newly installed
TRS jack.

Here you see the cable that we ended up with. It is a USB on one side, has
as USB-Serial (3.3 Volt) device in the middle and on the other end, a headphone
style 1/8" TRS plug.
As stated above, we started with a ten dollar USB Data Cable For Siemens A55, C55, M55, S55, M56 and clipped off the "cell phone end", taking the three wires within and connecting them to TX, RX, and Ground. Later, we decided that it was easiest to remove the "cell phone cable" side entirely in order to use the pre-molded 1/8" TRS stereo headphone cable, since the strain-relief molding on the wide part in the center is slipped over the cables, thus it could be re-used, and we'd get some strain relief on all cable connection points. The unfortunate part of this plan was that the pre-molded TRS connector was so fat, that it required trimming just to plug into the panel without being obstructed by the case. This was an easily corrected hassle, but the result is less than pleasing to the eye which made us frown a bit. Yet, we value function over form, so we charged ahead. We may make a prettier cable in the future.
Here we can see where we've removed the original cable that went from the USB
device to the cellphone and replaced it with the stereo headphone cable. This
bit of soldering was actually more tricky than the bit on the motherboard
because of how tiny it all is, and that the wires don't poke through.

We would have really liked to put this whole tiny board inside
the WL-700gE, but it just didn't seem like there was any room for it. Perhaps
someone will find a way to do that, and then the external port would simply be
a mini-USB port like can be found on many cameras and such. Then add a normal
USB cable, and poof, the WL-700gE shows up as /dev/ttyUSB0 (or whatever).
Actually, what we really want is for Asus to provide that for us. We would
happily pay an extra 25 or 50 dollars for a "developer version" with a
Serial Console accessible as a simple mini-USB port. But we aren't holding our
breath for something like that, and adding our own unique console port isn't
that hard. Brett suggests that some people may just leave a cable dangling
out the back, dodging the "what kind of port" question entirely. Good Point.
But, here's the back panel before and after the 1/8" TRS port addition:

So, once we have a serial console for our WL-700gE, next we need to set up a terminal program to talk to it. I used minicom. When we plug our "USB cellphone data cable" in, it shows up as a USB Serial port, so we need to configure our terminal program to talk to that port. To talk to our device we will need these settings: 115200 bps 8N1 ... which is way faster than anything I'd used in the past. Heck I thought 57.6 was cool. ;-)
Now we can power it on, and watch it boot and
at the end, get a command prompt!
BusyBox v1.00-pre2 (2005.11.11-01:19+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
#
# cat /proc/version
Linux version 2.4.20 (root@localhost.localdomain) (gcc version 3.0 20010422 (prerelease) with bcm4710a0 modifications) #202 Thu Apr 6 18:06:13 CST 2006
#
# cat /proc/cpuinfo
system type : Broadcom BCM947XX
processor : 0
cpu model : BCM3302 V0.6
BogoMIPS : 263.78
wait instruction : no
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : no
hardware watchpoint : no
VCED exceptions : not available
VCEI exceptions : not available
#
# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 63467520 49930240 13537280 0 11923456 22671360
Swap: 511991808 0 511991808
MemTotal: 61980 kB
MemFree: 13220 kB
MemShared: 0 kB
Buffers: 11644 kB
Cached: 22140 kB
SwapCached: 0 kB
Active: 8968 kB
Inactive: 30932 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 61980 kB
LowFree: 13220 kB
SwapTotal: 499992 kB
SwapFree: 499992 kB
#
W00t! How about that, eh? Are we 1337 hardware hackers or what? <big grin>
Okay, seriously, the real work of replacing the Asus provided firmware lies ahead. Brett Neumeier has already demonstrated progress on it.
Now that we have a serial console, it should be possible to build our linux, flash it onto the system, watch it boot, see where it crashes, and make some changes, re-flash, watch it boot, see where it crashes, lather-rinse-repeat. This will be a time consuming and tedious process, I'm sure. At times I expect it to be down right infuratingly frustrating. My hope is that in the end we have a powerful linux server in a tiny package and, more importantly, a deeper understanding of linux, cross-compiling, and embedded systems in general.
So, all things considered, that was the easy part. With the parts on hand, adding the port is only a couple hour project, even for a novice like me.
--Eric Herman
eric@mysql.com
Here are more of our WL-700gE pictures.
Check out Oleg Vdovikin's instructions for
upgrading a WL-700gE's flash to 8MB and the
discussion.
other reference images