Alan Stern wrote:
On Thu, 24 Sep 2009, Ken McD wrote:
Greg KH wrote:
On Thu, Sep 24, 2009 at 12:57:10AM -0400, Ken McD wrote:
I am wondering if its possible to make a linux PC control another PC
through a usb keyboard and mouse.
So kind of kvm without the video part.
Seems most likely this is possible with the usb gadget api and a usb device
controller, but I cannot find any prior work on the keyboard and mouse
driver portion. There are some references to gadget api hid drivers, but I
can't find anything definite in the mailing archive or google'd.
Can someone point me in the right direction for a solution?
Read the USB spec first for why this isn't possible without a hardware
"blob" between the devices.
Good luck :)
greg k-h
Greg, I think there might be a misunderstanding. I am NOT trying to
connect 2 USB host controllers together. Yes, as you mention, this is
not possible because of the USB specification and because 2 host USB
controllers cannot communicate together, unless one is On-the-Go. I
think what you are referring to is the host-to-host usb dongles that
allow point-to-point tcp/ip networks. That's not what I'm looking for.
What I am asking about is making a software keyboard and mouse inside
Linux that communicates through the Gadget API to a USB peripheral
device controller and then on to the destination PC. It is possible just
as a stand-alone usb keyboard or mouse works to control a PC. For
reference, the Gadget API is described here:
http://www.linux-usb.org/gadget/
Is brief, a linux PC can be a USB peripheral device and a usb keyboard
or mouse is a type of USB peripheral device.
So I understand the PC peripheral controllers exist and there is Linux
Gadget API to simulate USB peripheral device. What I'm looking for are
resources for the USB gadget device driver to simulate the keyboard and
mouse. I am thinking the programming for this is relatively easy because
hardware-only implementations of USB keyboards and mice are very cheap.
I don't recall ever seeing any code posted to do this. Possibly
because it would be pretty drastic overkill; a real USB keyboard and
mouse are a lot cheaper than a Linux computer with a USB device
controller.
Still, it should be possible to implement such a gadget without too
much difficulty.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Yeah, this idea is certainly overkill to the point of seeming funny. I
am serious though about trying to get it going. I've got 2 reasons for
it. The first is I am looking to make a hardware device involving
keyboard and mouse. And I wanted to prototype the idea inside the Linux
programming environment. The other reason is the remote keyboard/mouse
idea. There is an example from this company.
http://okvm.sourceforge.net/kvmoverip.html
Mostly because I found something interesting to try programming in
Linux. I'm not a programmer, but I play one on TV...
So, can someone recommend a starting point for the "upper layer" code?
Is there is simple implementation for a different purpose that I might
use as shell for my code. For the peripheral controller portion, there
seems to be much completed, stable work, so getting the hardware
interface appears OK.
Maybe I've got enough to get started, but any other comments or code
would be helpful. I do see this kind of question has been asked before
on this mailing list. I would imagine someone has an HID peripheral
implementation started.
Thanks,
Ken
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html