You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HIDAPI does not recognize "virtual" HID device #744
Activity
mcuee commentedon May 21, 2025
Does this device show up as /dev/hidraw*? If this device is not a USB hid device and yet not show up as hidraw device, then hidapi cannot find it.
Also you need to have permission. You may want to try to run as sudo to see if that helps.
mcuee commentedon May 21, 2025
Basically you can run the Linux kernel hid-example to see if that works or not.
https://github.com/torvalds/linux/blob/master/samples/hidraw/hid-example.c
tuxedo-wse commentedon May 21, 2025
Yes
I did that but didn't help
tuxedo-wse commentedon May 21, 2025
More testing using hid_open_path:
Both /dev/hidraw2 and /dev/hidraw3 exist and i run the programm with root.
hidraw2 is a normal physical device (I think the usb keyboard), hidraw3 is the virtual device from the driver.
The hidraw 2 example works fine while the hidraw3 example crashes at the printf step
tuxedo-wse commentedon May 21, 2025
hid_error tells me "couldn't create hid_device_info"
tuxedo-wse commentedon May 21, 2025
Following that trace my educated guess is that the culprit is this switch statement:
hidapi/linux/hid.c
Line 716 in d6b2a97
It expects the bus type to be USB, BT, I2C, or SPI, but this device is none of that (in the kernel driver it is specified it as BUS_VIRTUAL https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/platform/x86/tuxedo/nb04/wmi_ab.c?id=cfd84b3f419bf0aec60ecddc92c61b539c339ec9#n841 , I guess that is the same define that is asked for here?)
tuxedo-wse commentedon May 21, 2025
there is a switch statement before that with a clear comment:
hidapi/linux/hid.c
Line 680 in d6b2a97