Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Mouse control #11

Open
SterlingButters opened this issue May 16, 2018 · 12 comments
Open

[Suggestion] Mouse control #11

SterlingButters opened this issue May 16, 2018 · 12 comments

Comments

@SterlingButters
Copy link

SterlingButters commented May 16, 2018

Im sure its been a considered feature but I thought Id mention it anyway.

Perhaps this would be useful:
http://usbip.sourceforge.net

@SterlingButters
Copy link
Author

Otherwise the steps would be relatively simple:

  1. Use mousemove event listener on the server to record cursor movements on the webpage
    https://stackoverflow.com/questions/10557491/track-cursor-movement-of-all-the-visitors-on-a-website

  2. Parse the data obtained in 1)

  3. Use an additional HID connection to computer and serial connection to additional RPi0 and forward the data in 2)
    Possibly using: http://circuitpython.readthedocs.io/projects/hid/en/latest/

The difficulty would be in the continuous bilateral interpretation between the recorded cursor events and the HID output packets

@DedupOperator
Copy link

The following link suggests RPi0 can emulate a composite usb hid for a few usb gadgets simultaneously.
COMPOSITE USB GADGETS ON THE RASPBERRY PI ZERO

@SterlingButters
Copy link
Author

Yup, Im trying to figure it all out here by starting my own "fork":
https://github.com/SterlingButters/ip-kvm-interface

@SterlingButters
Copy link
Author

SterlingButters commented Sep 22, 2018

Also Im not sure how that would work: the simultaneity of the keyboard and mouse on a single RPi0 on the limitation of the single microUSB data port. Since I don’t know much about data transfer in USB interfaces I suppose it could be possible to pass the correct information through the single cable, esp if using an API which I intend to do. Though, I will likely buy another RPi0 and handle them separately for now.

@DedupOperator
Copy link

DedupOperator commented Sep 22, 2018

Thats great. let some code passion flow in your veins:)

Composite device allows more than one device class.
https://www.kernel.org/doc/Documentation/usb/gadget_multi.txt
https://www.kernel.org/doc/htmldocs/gadget/composite.html

Btw, is there a reason you are not forking this project directly?

@SterlingButters
Copy link
Author

SterlingButters commented Sep 26, 2018

Because I'm a noob and my level of coding experience is minimal. I'm really just good at piecing logic so as soon as things get too complicated in the syntax, etc then I can't go on. Also I'm having somewhat of a revelation regarding this HID feature:

c) TOP CHOICE: ATmega32U4 (Arduino Compatible):
https://www.sparkfun.com/tutorials/337
https://github.com/thearn/Python-Arduino-Command-API
https://www.amazon.com/OSOYOO-ATmega32U4-arduino-Leonardo-ATmega328/dp/B012FOV17O (SUPER CHEAP)
No serial login

I.e., why are we using the RPi0? It seems this little gadget will be wayyyy easier to program AND its cheap AND theres no need for serial login it seems once its configured since its just a microcontroller

@DedupOperator
Copy link

@SterlingButters I'm not sure the Arduino library will work to load BIOS/UEFI menu.
Please refer issue #16

@SterlingButters
Copy link
Author

Hmmm, interesting, I hadn't thought of that, what is your reasoning might I ask?

@DedupOperator
Copy link

A research I made, haven't experienced with it.
From experiencing with arduino boards in the past I know they have also low level access so it should be doable one way or the other.

Although, I might be unupdated and it's already done and written to an open-source library

Anyways, as a full futured KVM to IP device, for my planned project, a full linux running dev board (incl. OTG support) like RPI0 or one of it's clones is the way to go.

@SterlingButters
Copy link
Author

SterlingButters commented Sep 26, 2018

What additional options does the Linux dev board give you? I mean there is always the possibility of using both.

I may try to develop a python library/package that can easily do what I want on the RPi0. The keyboard has some good documentation, it’s the mouse I have problems with. What kind of data is sent to the mouse compared to the keyboard? In Python the keyboard uses variations of ‘chr(#)’ to create readable data

@DedupOperator
Copy link

In comparison between Arduino and RPI0, as a usb part of kvm-ip control, I can focus on 2 main differences:

a) RPI0-like devices can use the kernel USB gadget composite device functionality as discussed in this issue. Ability to support cd-rom emulation for virtual drive kvm-to-ip functionility as well as keyboard, mouse and more 'gadgets'.

b) I'm script on linux much more than coding in c. it will be much faster for me to work in high level language I'm used to, especially adding functionility.

on the oposite side, arduino boards will consume much less power, more direct electronics and might be less security-issues prone in some circumstances.

@SterlingButters
Copy link
Author

So it sounds as though a combination of the 2 would be a good idea for the reasons you stated

@SterlingButters SterlingButters changed the title Feature Request: Mouse control [Suggestion] Mouse control Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants