Adding a serial port to the Netgear WGR614L
I added a serial port to my wireless router so it could monitor the weather. I know, why does a router care what the weather is like Well, it doesn't, but Ido. Actually, I want to add a weather widget to this blog and also upload it to weather underground (not the one with Bill Ayers ;) ). <
Removing the screws
The bottom plate comes right off, revealing the mainboard, which lifts out.
Disassembled
Unfortunately, I don't have a device without headers installed, but you can see them installed in the lower left corner. The single-row one is the serial port, the double-row is the JTAG. From the factory mine had solder blobs on the serial port. I had to use solder wick to remove it. Once the holes are cleaned out, installing the header is a snap.
Now that it's easy to attach to the port, we need to convert the 3.3v CMOS serial signal to true RS232. The typical way you do this is to use a RS232transceiver. I had a SIPEX transceiver lying around, so I used that. Just follow the datasheet for whatever you use.The pinout for the serial port on the netgear is:
- VCC
- RXD
- N/A
- N/A
- TXD
- GND
I've attached the approximate schematic that I used. There are a couple of important things to note, because the router uses 3.3v and the RS232transceiver uses 5v we need to negotiate the difference. Referencing the transceiver's datasheet, the minimum voltage necessary for a '1′ is low enough that a 3.3v CMOS signal is sufficient, so we can just hook it up. The signal going toward the router, however should not exceed its VCC. To achieve this using a minimum of parts we use a pull-up resistor fed from the device's VCC and a diode biased toward the transceiver. This way, when the transceiver is outputting a '1′ the 5v are blocked, but while outputting a '0′ it will drop the voltage sufficiently enough for the router to see it as a logical low.
schematic
Top view of the adapter
Bottom view
If you want the router to be the "slave" of the serial connection (like a modem) then reverse the TXD/RXD pins on the DB9 connector (pins 2 &3). Is pecifically wanted the router to be the master to hook it up to other stuff(my weather station, remember).
To get the 5V necessary for the transceiver I tapped the 12V power from the wall adapter and fed it through a 7805.
Stealing 12V from the wall adapter
Adapter installed on mainboard
Adapter board installed
Mainboard and adapter in case
Connected with a NULL Modem cable
In the above photo I'm using a NULL Modem cable because, remember, the router serial port was installed as if it's a computer.
Netgear preboot console
It works! The photo above is the preboot console of the router. Notice that the MAC address is FF:FF:FF:FF:FF:FF
. I'm not just paranoid, this is one of the failure modes of these routers. The DD-WRT firmware overwrites some of theNVRAM in a weird way and this happens. It's pretty screwed, but at least with a serial port you can fix it :)
Anyway, enjoy!
Comments
Comments powered by Disqus