Closed graytron closed 6 years ago
Ah right, I forgot about the sizes there (in v1 someone actually made a pull request for that very issue...), silly me.
As for the protocol - the output of the configure script doesn't affect it, that's only the interface to the kernel.
For cat
mode, hotkeys aren't implemented yet.
I'll try to fix some of this up tomorrow.
Actually, struct uinput_user_dev
shouldn't be differently sized AFAICT on arm systems, I'm gonna have to investigate this more.
I managed to share keyboard and mouse of a Debian stretch amd64 system with the same Raspberry Pi and same build on the Raspberry Pi, using protocol 2, so the problem is probably with my old Debian jessie i386 laptop, or i386 architecture itself having different size. It is running an old Intel Atom N280 CPU.
Tested with a jessie container. Looks like I forgot to pack the packet struct. Fixing this unfortunately breaks the protocol so you'll need to rebuild on all machines. Can you please test?
PS: I could also pad the struct to keep it compatible, but I also want to add a kind of handshake "hello" packet to get better error messages in cases like this one. The change is in the packing-fix
branch.
Once this is working I'll probably create a tag for a first 2.0 release and update the Arch & Debian build files.
packing-fix
branch fixed the protocol error: struct user_input_dev size mismatch
issue with Debian jessie i386. It also didn't break keyboard sharing on Debian stretch amd64. I tested sharing with both RPi 1B (armv6l) and RPI 3B (armv7l), both running Raspbian stretch.
Rebuilt was done on all 4 machines and building was cleaner than before; ./configure
didn't spew error messages any more.
However, when I said "I managed to share keyboard and mouse of a Debian stretch amd64 system" earlier, it turns out that mouse sharing wasn't actually working. Mouse was just being grabbed and evtest on RPi shows events. Only now I noticed that the mouse cursor isn't actually moving at all after launching Xorg. Do you want a separate issue for this?
packing-fix
branch doesn't grab the mouse of my Debian jessie i386 laptop and it gives the following error message: ERROR: failed to grab input device: Device or resource busy
. Do you want a separate issue for this?
For the mouse events being transferred but not producing movement on the other side - was that a touchpad? I was able to reproduce this with my laptop's touchpad. This is probably due to some information I'm not yet including in the setup code (mostly because I wasn't sure what to test with, didn't expect a touchpad to be an issue tbh ;-), eg. there's also no force-feedback support for game controllers either, since this requires some additional data uploaded via ioctls). This should probably be be a separate issue
As for the EBUSY - can you check with fuser
which programs are also already using the device? Usually it's just Xorg which doesn't grab it (the error happens when someone's already grabbing the device). Oh and yeah a separate issue would make this easier to track. Then I can merge the packing-fix branch which already contains a tag to close this one.
protocol error: struct user_input_dev size mismatch
issue was fixed with packing-fix
branch, so this issue #3 can be closed once merged. Thanks a lot for the fix! Keyboard sharing works for me now!
I'll create separate issues for the other issues with answers to your questions there.
I am trying to share laptop keyboard and touchpad with Raspberry Pi. On the laptop I have Debian jessie running Linux kernel 3.16.0-5-686-pae. On the Raspberry Pi I have Rasbian stretch running Linux kernel 4.14.31+.
I have created a file /etc/netevent.conf which contains these lines:
To test this configuration I run following command:
The output of the command is this:
Running
./configure
gives me this:Does all this mean that my current laptop kernel does not support netevent 2 compatible protocol and I should use netevent 1 compatible protocol instead? If yes, then could you be so kind to provide some tips on how to convert my configuration to legacy? Just by adding
--legacy
option afternetevent create
didn't do it, since obviously it only changes the protocol used on the Raspberry Pi.I managed to share the keyboard by using
netevent cat --legacy
with netcat through ssh tunnel, but I couldn't get the hotkey to work.PS. This is a very nice tool and project! I'm surprised it isn't more popular. netevent could be a standard tool on every Linux distribution. Good job!