• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Keyspan USB-serial is hackable!

Bunsen

Admin-Witchfinder-General
Well this is interesting.

NB: I do not know if this applies to all Keyspan serial adapters or just some of them. Caveat emptor. /ETA/ The author of the linked article has demolished and described a few different models; there's a table at the bottom of the page.

So I bought a Keyspan USB-to-DB9-serial adaptor dongle.
A little while ago, however, I became curious about the contents of the dongle. / Well, when I popped the plastic case, what to my startled eyes should appear but an Anchor Chips AN2131SC and a TI 75LV4737A! /

Basically, the Keyspan USB adaptor is a general-purpose reprogrammable USB-enabled 8051-compatible microcontroller, plus a level shifter for RS232 use.

the EZ-USB chip. / For extra hackability, the spare I/O pins / are brought out to extra solder pads on the board.
The EZ-USB is made by Cypress Semi. It's not clear from the description which of their USB ICs it is.

Suggested uses: GO!

 

Gorgonops

Moderator
Staff member
Interesting. Somewhere in a junk box I might have one of the "USA-19" models, the irritating "PDA Adapter". (So named because it doesn't have handshaking signals on the serial port, apparently PalmPilots didn't need them.) If I stumble across it I'll be sure to toss it into the "assorted microcontroller crud I never find time to play with" drawer. As for "suggested uses", well, by adding a little circuitry you get, depending on the exact version of the adapter, a few pins that can be configured as either inputs or outputs, a little CPU, and, assuming you put the code in to do it, the ability to transfer packets over USB to a host computer. You can blink some lights, watch for some switch to be thrown, and depending on how you code it you can have those transactions entirely handled by the 8051 or communicate with the host computer and let it chew on it. I guess you also have the UART so you could in theory program the device to watch for serial input and rather than simply stuff it into USB packets analyze it and act on it independently.

(You could, for instance, wire the serial lines to one of those weather stations that output via serial and have the dongle use one of the remaining I/O lines to throw a switch that closes your motorized patio umbrella when the weather station reports wind speeds in excess 10 miles per hour. Presumably if you powered the dongle from its own 5v source instead of having it draw from the host USB port it would be able to do this independently once the program was loaded even if you unplugged the computer.)

On the flip side platforms like Arduino are so cheap these days it's sort of hard to suggest that hacking an *old* Keyspan adapter is a productive use of time. (That page was written in 2000, when that wasn't necessarily true.) Anything you could do with the spare I/O pins on that Keyspan Arduino could do better and it'll be *much* easier to program.

 
Top