Serial hack

| No TrackBacks

Last entry I wrote a bit about having to improvise a serial connection. Here are the details on what I did to get this working. As I mentioned, I happened to have a spare Keyspan USB Twin Serial adapter, a USB to Mac DIN-8 serial adapter left over from a past project. The big fuss with adding a serial port to a Linksys (or similar) router is that most such devices have an RS-232-ish connection available internally, but the voltages aren't at the proper levels (generally 3v instead of 12), and a bit of circuitry is needed to boost these levels to something compatible with most RS-232 gear. I was able to bypass those issues using this adapter, as I'll explain below.

Click the image for a larger view...

RS-232, as I mentioned, uses a signal that ranges from -12 to +12 volts, ideally, though lesser voltages are often found in most equipment, but this can result in problems when using long serial cables, shorter runs can get by with lesser voltages. The Macintosh DIN8 serial connector is actually based on the RS422 standard, which is signal compatible, but only uses voltage levels from -5 to +5 volts, so we're already much closer to the desired 3v signal found in the router. Additionally, the RS422 connector has both positive and negative transmit/receive pins. For some reason that I didn't bother to delve into, when cabling between RS422 and RS232, the transmit/receive negative connections from RS422 are wired to the transmit/recieve lines on the RS232, and the RS422's positive Receive is wired to ground. This apparently gets the levels where the need to be, this seemed a tad odd, but most every wiring diagram I checked had this drawn the same way.

Knowing that I had a signal that was between 0-3 volts, I knew I wouldn't need to worry about negative voltages, and this range appeared to be in the acceptable range of voltages for this standard, so as long as I kept the cable relatively short, I knew I'd be OK.

My first attempt was to use an old Mac to Serial Modem cable (DB25) that I had spare, but after checking the pinouts, this cable was wired for the negative signals, so I scrapped that. Fearing that I wouldn't find a fully wired cable in my spares box, and not having any spare connectors of that type, I decided the next best bet would be to solder a new cable directly onto the Keyspan's circuit board.

A brief look at the Keyspan board gave me a basic idea of what was going on, the USB connection (at the left of the board) was likely being processed by the chip closest to that port, which seemed to be using the pair of chips to the right to interface with the chips on the far right, which I assumed were the serial interfaces. After checking the part number on those chips (Texas Instrument SN75LBC776) and finding the data sheet online, my assumption was confirmed (the bits I cared about anyway).

I'm going to step back a moment and admit that I originally rushed things more than what I'm laying out here. When I first started ripping into things to get a serial port going quickly, I didn't remember the exact voltages RS422 used, and had totally forgotten about the negative voltages. What I was actually wanting to do was find the lines this chip was using to feed the other ICs, not tap into the side connected to the DIN8 connector. It just happened that during testing I was only intermittently getting the data stream I was expecting, which turned out to be when I was accidentally touching the wrong pin, a happy accident, and after checking the pin description, all the pieces fell into place.

So, armed with this new knowledge, pins 7 (TxD+) and 12 (RxD+) were what I was after, I cut the ends off an old phone cord and soldered wires directly to the chip, and a 3rd wire to ground, conveniently provided on the metal shield around the DIN8 connectors. From there, I soldered the opposite end of the cable directly to the pads for the serial connection on the WRTSL54GS, powered the router up and watched the data flow across the Zterm window, and everything was working great.

I've since put the cases back onto both devices, but left the cable attached and the screws a bit loose so as not to pinch the cable. Eventually I'll get around to putting a decent connector on the router, and probably wire up a real DIN8 connector for the other end, but until then this setup is working just fine.

No TrackBacks

TrackBack URL:

About this Entry

This page contains a single entry by WRT Guy published on November 22, 2006 11:01 PM.

Bricked... and fixed was the previous entry in this blog.

Updated Busybox is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.



Powered by Movable Type 5.031