This page contains instructions on how to add two serial ports (one DB9 Female DCE port and one DB9 Male DTE port) to a Linksys WRT54G (version 2 hardware) or Linksys WRT54GS wireless router.
THIS WILL VOID THE WARRANTY ON YOUR ROUTER.
The DB9F (Female) connector on the front is wired as a DCE (think of this as a peripheral serial port), and can be connected directly to the serial port on a host PC. This gives you access to the built-in serial console on the router (115200, 8, N, 1).
The DB9M (Male) connector on the top is wired as a DTE (think of this as a host serial port), and can be connected directly to peripherals like an external serial modem, or other serial devices which are normally connected to the serial port on a host PC.
The pinout of JP1 on the Linksys PCB is as follows:
Pin 1: 3.3V Pin 2: 3.3V
Pin 3: Tx (ttyS1) Pin 4: Tx (ttyS0)
Pin 5: Rx (ttyS1) Pin 6: Rx (ttyS0)
Pin 7: NC Pin 8: NC
Pin 9: GND Pin 10: GND
轉自:http://www.rwhitby.net/projects/wrt54gs