-
Notifications
You must be signed in to change notification settings - Fork 410
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
Adding support for HID over I2C and uhid devices #166
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Although, I cannot check or verify any of this.
Would be great if someone could check it just to confirm.
I added a few more changes (forgot about the get_device_string function), after I did some more integration testing. Thanks for reviewing! If anyone would like to test the uhid part, a very easy way is to build this uhid-virt example https://github.com/haata/uhid-virt/tree/master/example; you'll need to run the executable as root though.
Pressing enter while running will move the mouse. The HID over I2C is a bit trickier unfortunately. |
Cleaned up code formatting. |
- uhid USB, Bluetooth (standard) and I2C now enumerating * USB uhid support was added by removing the udev USB endpoint check - HID over I2C was excluded before (likely because it didn't exist when hidraw was developed) I'm still looking for a device with HID over I2C (I have one somewhere...). For now I've tested that code path using uhid instead. Device Found type: 308f 0030 path: /dev/hidraw14 serial_number: uhid virtual Manufacturer: Product: HID-IO Virtual Keyboard - Standard USB Release: 0 Interface: -1 Usage (page): 0x6 (0x1) Device Found type: 308f 0030 path: /dev/hidraw17 serial_number: uhid virtual Manufacturer: Product: HID-IO Virtual Keyboard - Standard I2C Release: 0 Interface: -1 Usage (page): 0x6 (0x1)
@haata do you have anything to add to this PR? I think it is ready to be merged |
I think everything is still good. I've been running with these changes for quite a while now and haven't had any issues. |
- uhid USB, Bluetooth (standard) and I2C now enumerating * USB uhid support was added by removing the udev USB endpoint check; - HID over I2C was excluded before (likely because it didn't exist when hidraw was developed);
hidraw was developed)
I'm still looking for a device with HID over I2C (I have one
somewhere...). For now I've tested that code path using uhid instead.
Device Found
type: 308f 0030
path: /dev/hidraw14
serial_number: uhid virtual
Manufacturer:
Product: HID-IO Virtual Keyboard - Standard USB
Release: 0
Interface: -1
Usage (page): 0x6 (0x1)
Device Found
type: 308f 0030
path: /dev/hidraw17
serial_number: uhid virtual
Manufacturer:
Product: HID-IO Virtual Keyboard - Standard I2C
Release: 0
Interface: -1
Usage (page): 0x6 (0x1)