Adding support for HID over I2C and uhid devices #166
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!166
Loading…
Reference in a new issue
No description provided.
Delete branch "uhid_i2c_support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)
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.
Ctrl-C to exit.
(it's just a rust version of the Linux kernel uhid example code https://github.com/torvalds/linux/blob/master/samples/uhid/uhid-example.c; but it's a bit easier to setup if you already have rust on your system).
The HID over I2C is a bit trickier unfortunately.
Cleaned up code formatting.
@ -361,3 +371,4 @@}}}}I just like when things like this are explicit
@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.