Replies: 4 comments
-
|
Hi, what OS is on the Pi, as well as the OS you are connecting it to? For some reason, Windows is quite strict on HID descriptors, and I haven't gotten around to adjusting it yet, so the mouse doesn't work on all operating systems. If this is the problem, I will work on fixing it. Thank you! Edit: Just noticed you mentioned Windows 10. I'll double check to see if it currently works on that OS, and if not I'll try to fix it. |
Beta Was this translation helpful? Give feedback.
-
|
I use "A port of Debian Trixie with Raspberry Pi Desktop (32-bit)" as Pi OS from Raspberry Pi Imager. With this cmd i can move the mouse: I started in the top-left corner at position 0, 0 and wanted to move towards the center of the screen in 10 steps. Unfortunately, that didn’t work. With a resolution of 1920x1080, the coordinates for the center would be 960, 540, but I wasn’t able to reach that position. |
Beta Was this translation helpful? Give feedback.
-
|
That... actually kinda makes some sense. With mismatching descriptors, sometimes the device may still function, but have someodd problems like you mentioned. I'll still try messing with the descriptors, but maybe I'll be able to fix it from the library in that case. For now, maybe mess with step sizes? |
Beta Was this translation helpful? Give feedback.
-
|
yes, i try it.. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Thank you very much for your great work.
I have flashed a fresh image onto a Raspberry Pi 4B and executed HIDPi_Setup.py.
I now have two devices on the Pi: hidg0 and hidg1.
I executed the test code, but the mouse does not move in Windows 10 (i can see the new mouse device).
i try this but the mouse isn't moving:
`import time
MOUSE_DEVICE = "/dev/hidg1"
x = 1027
y = 768
wheel = 0
report = bytes([0, x & 0xFF, y & 0xFF, wheel & 0xFF])
with open(MOUSE_DEVICE, "rb+") as fd:
fd.write(report)
fd.write(bytes([0, 0, 0, 0]))
`
Oct 27 17:41:33 pi4 python3[1296]: Creating systemd service...
Oct 27 17:41:33 pi4 python3[1296]: HIDPi service installed. It will run on next boot
Oct 27 17:41:33 pi4 python3[1296]: Config already modified
Oct 27 17:41:33 pi4 python3[1296]: Setting up HID gadget...
Oct 27 17:41:33 pi4 python3[1296]: Found UDC device: fe980000.usb
Oct 27 17:41:33 pi4 python3[1296]: Bound gadget to UDC: fe980000.usb
Oct 27 17:41:33 pi4 python3[1296]: Creating udev rule for hidg...
Oct 27 17:41:33 pi4 python3[1296]: Udev rules reloaded
Oct 27 17:41:33 pi4 python3[1296]: HIDPi Initialized
Oct 27 17:41:33 pi4 systemd[1]: Finished HIDPi.service - HIDPi Initialization.
Beta Was this translation helpful? Give feedback.
All reactions