Linksys WRT1900AC – Serial Port Access

I’ve recently been hacking on the mighty Linksys WRT-1900AC router. In this blog post I cover the installation of a permanent TTL-serial port on the unit, and the construction of a 3.3v USB-TTL serial adapter.

It took a couple of years for the manufacturer to make good on their promise to provide open source developers with the drivers necessary to write decent open source system software, but now OpenWRT is shaping up nicely on this model. OpenWRT Chaos Calmer has just been released in final form, and the support for the WRT-1900AC is pretty good, but there are still a few bugs. Some of which would be easier to track down if more users had serial links to their WRT-1900AC and were recording failures.

linksys-li-WRT1900AC-9-a

The specifications on this router are impressive, with either a 1.2GHz dual-core processor and 256 MB of RAM, or 1.3 GHz/512MB for hardware rev. 2, and a whopping 128MB of NAND flash for system storage on either model. The 4 Gigabit Ethernet ports (VLAN capable), and dual 2.4GHz and 5GHz radios as well as 4 external antennas mean that the connectivity and routing options are huge.

I have the 5GHz radio connected back to a TP-Link TL-WDR3600 AP running OpenWRT that is connected to my cable modem, and the 2.4GHz radio is connected to a Pace-branded DSL modem with built-in wireless AP. I’m using mwan3 to provide load-balancing and fault-tolerance between the two WWAN uplinks. Also, each antenna is also hosting a separate SSID for AP connectivity to clients. My development workstation is attached to one of the Gigabit ports.

I started out with the OpenWRT page on the WRT-1900AC, which has pictures of a serial port build that involves a tiny max3223 controller board to convert the 3.3v TTL serial pins on the system board to RS-232 PC-style serial output via a stereo jack. Of course, you still need a 3.5mm stereo plug to serial port cable, and then a USB-to-serial adapter to attach that to a modern PC. It seemed like having two serial converters inline seemed pointless, so I set about creating a setup that converted from 3.3v TTL to USB directly.

image1 I found a nice $6 USB-TTL cable on Amazon that worked fine with the TTL pins on the WRT-1900AC system board, but it just ended in pin-connectors. What I needed was a cable like that with a 3.5mm stereo plug end. I found one on eBay for over $40, but there were also USB-TTL 5v cables that terminated in a stereo plug for $13. I knew that the 5v serial connection wouldn’t work on the WRT-1900AC, but I bought one thinking that I could reuse the cable. I was right, the USB housing was identical between the two cables, so I just had to desolder both units and connect the stereo plug cable to the small circuit board that came with the USB-TTL adapter that I bought on Amazon, saving myself over $20.

You can save yourself the trouble of soldering by buying a USB-TTL adapter that is 3.3v and has a stereo end already. This one on Amazon looks like it will do the trick, and it’s only $23 with shipping from China.

I also ordered some of the proper 2.0mm 6-pin JST connectors with lead wires, so I could plug directly in to the TTL port. You could solder wires directly to these pins, but I wanted to be able to easily disconnect the plastic housing top (where the port is) from the bottom (where the board is). I soldered the wires coming out of the connector to a Philmore 504K stereo plug as shown in the photo.

image3_notation

image2Finally, I drilled out a hole that is exactly the size of the threaded end of the 504K plug, and tightened the nut over the threads. It looks almost as if it were installed at the factory. I kept the wires between the TTL port and the stereo plug long, to make it easier to remove the case top from the bottom without disconnecting the port. The port is actually on the other side of the case from the TTL port, and I routed the wires around the heat sinks and fan before closing up the case again. If you attempt this, make sure that all wireless antenna ports are firmly affixed to the board before closing up the case.

Leave a Reply