LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   USB keyboard and mouse through serial port (old computer) (https://www.linuxquestions.org/questions/linux-hardware-18/usb-keyboard-and-mouse-through-serial-port-old-computer-279941/)

meiqur 01-19-2005 08:38 PM

USB keyboard and mouse through serial port (old computer)
 
I have a logitech lx 700 keyboard/mouse combo that runs through my usb KVM switch to several of my computers.

Also I am in the final stages of building an LFS system for my old old Laser 386.

Because of the age of the 386 it uses an AT port for the keyboard and a serial port for the mouse. My solution to date has been to use an old AT/Serial Keyboard and mouse which sit underneath the desk an occasionally get kicked by accident. I want to run my USB keyboard and mouse (via the KVM) into the serial port on the 386. My local computer parts store can sell me a usb->serial adapter.

I am wondering what else is going to be necessary to get this setup working?

-Ted

jonr 01-20-2005 07:50 AM

My guess is that nothing else would be necessary. Unless the switching causes problems (I don't have a switch, just one desktop computer and one keyboard and one mouse), the keyboard and mouse ought to work about equally well whether through a USB-to-serial adapter or otherwise.

(Now watch me be wrong.)

meiqur 01-20-2005 05:58 PM

Will linux be able to recognize the keyboard if it goes through the serial port?

jonr 01-20-2005 06:20 PM

Quote:

Originally posted by meiqur
Will linux be able to recognize the keyboard if it goes through the serial port?
After doing some Google searching, I have to say in answer to this question, "I don't know" and
I suspect there would have to be some juggling of functions in the operating system to make it
happen. If I had a USB-to-serial adapter I would experiment, but I don't.... If you had a PS2 port,
you could go that way.

The mouse, on the other hand, should be easy to do, to judge from the appearance of several
serial mouse choices during installations I've done for myself.

Wish I could give you a definite answer; I'm tending to think the keyboard could be made to work
through a serial port but it might take some pretty involved work getting it to succeed. I'm sorry
I assumed yesterday that it would be a snap. I think now it wouldn't (for keyboard, not mouse).

meiqur 01-21-2005 12:58 PM

Well, I'll find out during the course of the next week.

Currently I am still compiling the lfs system but thought that I should look into this ahead of time to see what possibilities are going to be available to me.

michaelk 01-21-2005 10:22 PM

You can not plug a keyboard into a serial port.

The keyboard in theory should work connected to the KVM switch. I have not see a single adapter so you will probably need two, AT->PS2 and a PS2->USB.

I have my doubts about the USB-serial adapter working because it needs a USB controller to talk between the device and the PC. However, your connecting another device i.e. mouse to the USB end which should be connected to the controller.

meiqur 01-22-2005 12:35 AM

I don't suppose that somebody has written a usb emulator in software for this type of situation (parallel or serial). Maybe for embedded systems that only have a serial or parallel port?

Obviously I don't need a ton of bandwidth for the mouse/keyboard so I don't care how fast the system is.

-Ted

Darin 01-22-2005 09:25 AM

Doing a google search for, "usb ps2 protocol" turned up a lot of garbage and ads and I couldn't find any docs to back this up, so I am going to speculate some here.

Warning: I can't find hard data to back this up, even casually browsing search engines and sites like Logitec's so this is my assumption, and could very well be wrong! If someone knows for sure or can find documentation that proves it either way, please post it :)

I was under the impression that USB, PS/2 and [9/25pin RS-232] serial ports all used different (albeit still serial and somewhat similiar) protocols. I also belive that for a device to work with an adapter, it has to be able to detect and adjust to the type of protocol seen i.e. a new mouse will have a USB connector with a PS/2 adapter, but it also knows how to 'detect' which type of port it's plugged into and modify the data it sends accordingly. Thus if you had say an older PS/2 mouse that wasn't made for USB then buying (or otherwise getting) a USB pinout adapter will not make said mouse work on the USB bus. I know I had a mouse with a 9pin serial connector and it came with a serial-PS/2 plug and it would work either plugged into the serial port or with the adapter plugged into the PS/2 port, while an older mouse with a 9 pin serial connector would not work with the same adapter on the PS/2 port. On the other hand, the "PS/2" and "AT" keyboard connectors are AFAIK simply pin changes (to a smaller plug) for the same data, so in theory a USB keyboard that came with a USB-PS/2 adapter (and was designed to work on USB or PS/2) "should" work when plugged into converters to get to AT (USB to PS/2 and then PS/2 to AT?) A USB mouse, on the other hand, probably can detect and work in a PS/2 port (with the proper pinout adapter) but would likely not work if converted to 9/25pin serial.

The safe bet is to buy a cheapo USB add in card, although my computer history is rusty and I'm not sure if your 386 will have PCI slots and I highly doubt you could find an ISA USB card. The other option would be to try and find a USB keyboard and/or mouse that also come with adapters, or otherwise specify that they support AT and/or 9pin serial connections.

In summary, my guess is that your USB devices won't know how to send data that the old AT and serial ports will recognise, even with software manipulation in Linux. Still, it's possible that if the USB keyboard came with a PS/2 adapter it would also work when converted to the AT connector, this would at least eliminate the klunky old keyboard.

edit: another option that we used to do with old Novell servers is once you get it set up to boot properly just unplug the keyboard and monitor and do all the administration from a client. For Linux just use telnet, or preferrably ssh.

jonr 01-22-2005 09:39 AM

Meiqur, please be sure to post any further progress and especially if you find a solution to this problem, as apparently it is one that's short on information and difficult to solve (probably even with the required hardware on hand!), but that might provide useful knowledge for many other users with old equipment on hand and limited resources.

ValidiusMaximus 01-22-2005 06:22 PM

there are no PCI slots on 386 computers. You can buy intelligent usb->PS/2 converters that will work with everything. no gaurentes that it will work with a USB->PS/2->Serial though.


All times are GMT -5. The time now is 03:04 PM.