signal11/hidapi — pull request #62 by thp (2012-06-01 18:23:41+00:00)
Title: Fix pid/vid getting in hid_enumerate() for Bluetooth devices

Searching for the USB host and extracting the vendor ID and product
ID from there only works for USB-based HID devices. In the case of
HID devices connected via Bluetooth, we would get the VID/PID of the
Bluetooth host adapter (if it's a USB device).

To work around this, we don't use the USB VID/PID, but extract the
information directly from the sysfs path - this will return the right
VID/PID for Bluetooth devices and USB devices.

Tested on Linux 3.2.0 for both USB and Bluetooth devices.