Skip to content

HIDAPI does not recognize "virtual" HID device #744

@tuxedo-wse

Description

@tuxedo-wse

So with this driver https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cfd84b3f419bf0aec60ecddc92c61b539c339ec9 there is a virtual HID device i.e. a hid device that exists just in software and is not connected to a bus.

HIDAPI does net seems to recognize this.

My minimal test code:

#include <stdio.h>
#include <hidapi/hidapi.h>

int main() {
    printf("HID Devices:\n");
    struct hid_device_info *devi, *dev = hid_enumerate(0, 0);
    devi = dev;
    while(devi != NULL) {
        printf("%04x:%04x\n", devi->vendor_id, devi->product_id);
        devi = devi->next;
    }
    hid_free_enumeration(dev);
}

Compiled with gcc test.c -lhidapi-hidraw for the hidraw interface, this does not liste the device, while /sys/class/hidraw/ has the device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hidrawRelated to Linux/hidraw backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions