[pulseaudio-discuss] hidapi always get the usage and usage page zero on linux

limh at sunray.cn limh at sunray.cn
Wed Apr 1 02:56:43 UTC 2020


Hi everyone

A few days ago, I initiated a discussion about how to use hidapi.

Now, I make a simple test to use it, but I always get 0 when I plug in a mouse or keyboard and get their 'usage' nad 'usage page'
I'm using ubuntu 14.04 (linux) and imx6 device(4.1.15).

Here is output of a mouse device on linux:
It's a hid device
libusb: VID: 3599 PID: 3
device: PID:3 VID:3599 usage:0 usage page:0
release: 258 interface: 0 path: 0002:0002:00
device: PID:3 VID:3599 usage:0 usage page:0
release: 258 interface: 1 path: 0002:0002:01
Manufacturer: VMware

Product: VMware Virtual USB Mouse

OTOH, I can't get list by hid_enumerate() on ARM but it return success when hid_init();

what's the problem? 
PS:Here is the files of libusb and hidapi
Regards
Mihan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20200401/21d7f5d0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: USBPlugin.cpp
Type: application/octet-stream
Size: 21349 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20200401/21d7f5d0/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: USBPlugin.h
Type: application/octet-stream
Size: 3507 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20200401/21d7f5d0/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: USBPlugin.pro
Type: application/octet-stream
Size: 1446 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20200401/21d7f5d0/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usbplugin_global.h
Type: application/octet-stream
Size: 252 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20200401/21d7f5d0/attachment-0007.obj>


More information about the pulseaudio-discuss mailing list