LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 04-21-2013, 08:15 PM   #1
dizzy13
LQ Newbie
 
Registered: Apr 2013
Location: Silly Valley
Posts: 5

Rep: Reputation: Disabled
Drivers for USB PC-to-PC direct connect for HID?


I need to use a Linux box to operate a second box, a desktop. It needs to operate in two modes. In both modes (this already works) the DVi output of the second box is displayed on the Linux console with annotations.

Mode 1) user uses mouse & keyboard to point click and type into displayed window. Input is captured—only at the level of x,y + button-press-release for the mouse, and key press-release for the keyboard, with millisecond timings—and both recorded to file and forwarded over a USB-USB cable to second box.

Mode 2) previously recorded data is played back either straight, or with dithering of x,y, timings, and possibly alterations to which button is clicked, which key is pressed.

Had been sending data over ethernet and emulating USB directly on the second box, but this only works for a couple subject second boxes (linux, apple).

I can purpose build boxes for this, but the goal is to be able to use anything as a second box and it will just see an ordinary keyboard / mouse (hopefully on a single cable). Well, the goal might be to use a Windows second box without having to touch any windows software

So what I want here is a pointer to the right drivers/packages/APIs/library or whatev?
 
Old 04-27-2013, 09:12 AM   #2
Sigg3.net
Member
 
Registered: Mar 2008
Location: Oslo, Norway
Distribution: Fedora 17, Ubuntu 12 LTS and Ubuntu server 10.04
Posts: 161

Rep: Reputation: 22
There are most probably ethernet over USB drivers available, but I'd suggest using a cross-cable instead (crossed network cable).
Steps 1 and 2 are unnecessary if you get ssh to work between the machines.
$ ssh -X user@othermachine

where othermachine is the IP or local domain, will use X-forwarding to send X movements (keyboard, mouse etc) over the network.
 
Old 04-27-2013, 07:09 PM   #3
dizzy13
LQ Newbie
 
Registered: Apr 2013
Location: Silly Valley
Posts: 5

Original Poster
Rep: Reputation: Disabled
The reason I want to use USB is to avoid running special software on the client, of which I'd certain consider an X-Server an example, especially on windows, and even more especially on low-capacity embedded devices.

I just want a library that has an API on the order of ->pressMouseButton(1); ->releaseMouseButton(1); ->moveMouse(13,24); ->pressKey('A');

It seemed like a simple idea, why I asked before trying to implement it...
 
Old 04-28-2013, 03:10 AM   #4
Sigg3.net
Member
 
Registered: Mar 2008
Location: Oslo, Norway
Distribution: Fedora 17, Ubuntu 12 LTS and Ubuntu server 10.04
Posts: 161

Rep: Reputation: 22
Okay. You can probably use serial code to pass events from one device to another, and there are many USB to serial drivers for LINUX (I use one myself in Ubuntu server 10 to talk with my Denon receiver).

This would involve passing some events to a /dev/... and have that piped through the USB as serial code, and have a listening /dev/... on the "remote" system, and finally a script to carry out the input. However, getting an all-in-one would probably take a lot of work.
What is your intention with this setup? If you can share your overall idea, it would be easier to think of something
 
Old 04-28-2013, 08:21 AM   #5
dizzy13
LQ Newbie
 
Registered: Apr 2013
Location: Silly Valley
Posts: 5

Original Poster
Rep: Reputation: Disabled
Wow, I thought I was 100% clear in my initial question. And in the follow-up! Just goes to show.

I need to be able to spoof USB mouse and keyboard actions to another computer. Like imagine there were a mouse and keyboard combo attached to a computer with a single USB cable and you were using it to control the computer. Now imagine that you replace that keyboard / mouse combo with another computer which sends the same events over USB using a USB crossover cable.
 
Old 04-28-2013, 10:11 AM   #6
Sigg3.net
Member
 
Registered: Mar 2008
Location: Oslo, Norway
Distribution: Fedora 17, Ubuntu 12 LTS and Ubuntu server 10.04
Posts: 161

Rep: Reputation: 22
So I think it would be difficult to find a operating-system agnostic solution.

If you go the file-route, you will need an "interpreter" on the receiving system which is specific to that OS (GNU/Linux, Win or OSX).
If you use serial or signal transmitting, you will need to address a device driver on the receiving system.

But of course, either is possible. Unfortunately, it is way over my head
 
  


Reply

Tags
hid, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL5.4, report "drivers/usb/input/hid-core.c: usb_submit_urb(ctrl) failed" problem lorinx8 Red Hat 3 12-24-2009 02:17 AM
RHEL5.4, report "drivers/usb/input/hid-core.c: usb_submit_urb(ctrl) failed" problem lorinx8 Linux - Kernel 0 12-22-2009 09:39 PM
Get usb.c: ignoring set_interface when pluging in a Belkin USB Direct Connect Cable qwerty102 Linux - Networking 0 02-15-2005 08:49 AM
Networking in Mandrake Linux with USB Direct Connect? comradesniper Linux - Newbie 1 11-05-2003 05:02 PM
Belkin USB Direct Connect on Linux?? comradesniper Linux - Hardware 0 11-04-2003 01:22 PM


All times are GMT -5. The time now is 07:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration