Adding support for HID over I2C and uhid devices#166
Conversation
Youw
left a comment
There was a problem hiding this comment.
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)