RS-232 level converter for the Linksys WRT54G

Some time ago I got my hands on a bunch of more or less broken Linksys 802.11 APs and wireless routers. They have been sitting in my closet until recently, when I decided to mock a bit with one of the WRT54G models.

First things first – I had to establish contact with the onboard firmware. Since the board didn’t respond on any of the ethernet interfaces I set out to construct an RS-232 level converter to use with the onboard 3.3V TTL serial interface.

Judging from google, people use all kinds of weird and somewhat complicated (not to mention quite expensive) circuits in order to convert the voltage levels of the WRT54G serial interface to RS-232 levels. I decided to go with my own simple, cheap and effective design based on the Maxim MAX3232 as shown below:

RS-232 Level Converter

The pinout of the IDC connector on the Linksys WRT54G – X3 in the diagram above – is as follows (thanks to Rod Whitby for posting information on the pinouts, saved me a bit of trial-and-error):

Pin # Description Pin # Description
1 3.3V 2 3.3V
3 Tx (ttyS1) 4 Tx (ttyS0)
5 Rx (ttyS1) 6 Rx (ttyS0)
7 NC 8 NC
9 GND 10 GND

The onboard firmware of the WRT54G provides a console on ttyS0 at 115200 1N8. Since the above pinout lacks RTS/CTS lines we have to rely on software flow control.

To connect to the console one might use a command like cu(1):

$ cu -l /dev/ttyU0 -s 115200

Below is a couple of action-shots of the circuit in use:

Action Shot 1

Action Shot 2

The next logical step is to get FreeBSD/mips up and running on this thing ;-)

11 thoughts on “RS-232 level converter for the Linksys WRT54G”

  1. I had just built an interface very similar to yours.
    I built the interface in the case of a dead router.
    The ribbon cabel connects the two boxes together on the front and I used RJ connectors on the back for ttyS0 and S1.
    The only parts I had to buy was the max3232 chip and the piece of cicuit board. Everything else I was able scrounge of of old computer boards. The trouble is now that I have it built I dont know what to do with it.

    Jimmie

  2. > The trouble is now that I have it built I dont know what to do with it.

    Hehe, well I can’t really help with that :-)

  3. Built one myself with a MAX232 and a 7805, and embarrassingly (such a simple circuit!), I’m having troubles.

    Please correct me if I’m mistaken:
    ttyS0 should be wired as DCE with a female DB9.
    Signal pins are named from the point of view of DTE (ie. For DCE the TX pin (3) is actually inbound, and RX (pin 2) is actually outbound). From my understanding, your schematic has the port wired as DTE. Is this why you’re using a null-modem adapter in the picture?

    How sensitive is the system to the choice of caps? The charge-pump seems to be working: I’ve got roughly +10V and -10V at the appropriate pins (2 and 6, if memory serves)… so it seems the chip is appropriately configured, but still no joy.

    I guess I’ll have to try to find a pulse generator and a scope to see what’s going on…

    thoughts?

  4. Hi Marty,

    Correct. My circuit is wired up with two DTE ports and the signal pins are named from the DTE point of view, which is why – as you correctly noticed – I use a null-modem in the pictures.

    Regarding the caps, you’d have to look that up in the datesheet. I just picked the first and the best caps from my drawer. Given that you have +10V/-10V at the appropriate pins, I’d say your caps are fine and the charge pump is working as intended.

    Sounds like a scope is the next logical step in getting to the bottom of this… Good luck!

  5. The max232n is a completely different IC. It operates at 5 V, so it can not be used for this circuit.

  6. its worked perfect for few days and one day my router WRT54G goes blank. does not boot at all.

    need a JTAG programmer to restore it back

Leave a Reply

Your email address will not be published. Required fields are marked *