[rescue] USB KVM with my Octane: possible?
Jonathan C. Patschke
jp at celestrion.net
Tue Jun 19 01:49:18 CDT 2007
On Mon, 18 Jun 2007, Micah R Ledbetter wrote:
>> Well, that sounds like the right answer, but all the PS/2<->USB
>> adapters I have take a PS/2 keyboard and mouse and adapt them to a
>> USB computer. What you need is the opposite -- something to adapt a
>> USB keyboard and mouse to a PS/2 computer.
>> I've never seen an adapter like that.
> Oh, I've seen adapters like that. I have tons. They probably still
> come with USB peripherals. However, they just take a single USB input
> and push it to a single PS/2 output...
As someone else already mentioned, they're not bus converters. They're
passive connectors that frob some personality bits in the USB device
itself (just to hazard a guess--they probably strobe one of the USB data
lines in a vendor-specific way as soon as the device powers up). Once
the device sees that it needs to operate in PS/2 mode, the "adapter"
just runs the signals straight through.
USB is -much- more complicated than the simple master/slave serial bus
that PCs use for keyboards. USB is a network. Devices have addresses
and profiles to know how to talk to each other.
> - USB device (e.g. mouse) <--adapter--> PS/2 port
> I tried one that I have, and it doesn't work (as per original post).
> I assume that it has something to do with the fact that this KVM puts
> both mouse and keyboard over the same USB wire, so what I need isn't
> the adapter itself as much as the device that takes kbd+mouse over
> USB and spits out the two different signals to two different wires.
Don't think of it in terms of wires.
The PS/2 keyboard bus is nothing more than the old AT keyboard bus with
a smaller port, and a PS/2 mouse is nothing more than a PS/2 keyboard
that emits certain scan codes in response to motion and button presses.
On many implementations, it doesn't matter whether you plug the keyboard
or mouse into the keyboard or mouse port because it's still essentially
a one-device bus--the keyboard and mouse merely coexist because the
scancode space is pretty-well separated. In fact, you can buy PS/2
keyboards with mice built in that fill both roles.
Now, in USB, you have a root hub (the controller and its ports), you
have other hubs (like the ones in keyboards and displays and standalone
on your desk), and you have endpoint nodes that get assigned USB
addresses (0 to 127, IIRC). When an endpoint device hops on the network
and gets its address, it screams its profile type (there are several
standard ones--which is why simple devices like keyboards, mice, flash
drives, media readers, and stereo audio devices Just Work without
drivers), vendor id, and model id back at the root hub, so that your
machine knows which drivers to load.
A good analogy is that PS/2 port is like an EIA-232 console port on a
server into which you can plug a null-modem cable, and a USB port is
like an Ethernet connection on that same server to which you can connect
to a switch with another computer and then telnet across the LAN. At
some level of abstraction (ie: once you have your favorite terminal
emulator running), they're functionally the same. However, the
underlying technology is nowhere near similar.
To build an adapter that lets you use PS/2 peripherals on a USB system
is easy. USB knows how to talk to "human interface devices", and
provides plenty of power to drive some logic and a keyboard--just toss
a USB endpoint IC and a keyboard controller in, and you're done. To
build an adapter that lets you use USB peripherals (in a general
sense--not a vendor-specific sense) on a PS/2 bus is a lot harder. The
PS/2 keyboard bus is inflexible and very stupid. You'd need to drive a
USB controller and root hub, and that controller would need to have
enough smarts to talk to HIDs from different vendors and do all the bus
and speed and power negotiations that are required at USB bring-up, and
then you'd need to present all the stuff the HIDs are doing through a
translation layer to that wonderful 16.7kHz bit-banging bus that
should've died decades ago.
> Fortunately, as stated above, I found one.
>  http://www.newegg.com/Product/Product.asp?Item=N82E16812107901
That one lets you plug PS/2 keyboards and mice into a USB system. It
likely has a USB endpoint implementation that presents the HID profile
on the system-facing side and a clone of an 8042 keyboard controller on
 Minor point: hubs themselves (outside of the root hub) are
Jonathan Patschke ) "When they turn the pages of history, when these
Elgin, TX ( days have passed long ago, will they read of us
USA ) with sadness for the seeds that we let grow?
- ( --Neil Peart, "A Farewell to Kings"
More information about the rescue