Fmstrat / diy-ipmi

A DIY IPMI / IP KVM system utilizing the Raspberry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Suggestion] Mouse control

SterlingButters opened this issue · comments

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

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

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

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

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

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.

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?

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

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

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

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.

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

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.

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