When interfacing with a USB HID, you must first locate the device -- the HID could be plugged into any USB port, or could have been moved to another port during use. We locate the correct HID by iterating through attached USB devices, until we find one that matches the Vendor ID (VID) and Product ID (PID) in which we are interested.
How do I find the USB HID Vendor ID and Product ID?
- Open the Windows Device Manager
- Expand the Human Interface Devices node
- Double-click the device of interest -- the USB Human Interface Device Properties window appears
- Click the Details tab
- In the Property drop-down box, select Hardware Ids
USB\VID_0A81&PID_0701&REV_0001
USB\VID_0A81&PID_0701
The hexadecimal Vendor ID is highlighted in red, Product ID in green, and product revision number in blue. Other details obtained through a USB monitoring application:
DEVICE DESCRIPTOR
- USB Version 1.10
- Device class; 0x0 (defined at interface level)
- Device subclass: 0x0 (Unknown)
- Device protocol: 0x0 (Unknown)
- Control pipe max size: 8 bytes
- Vendor ID: 0xA81 (Chesen Electronics Corp.)
- Product ID: 0x701 (USB Missile Launcher)
- Product version: 0.1
- Manufacturer: Dream Link
- Product: USB Missile Launcher v1.0
- Serial number: not specified
- Configurations: 1
- Number of interfaces: 1
- Configuration value: 0x1
- Attributes: Remote wakeup, Bus powered
- Max power: 100 mA
- Number of endpoints: 1
- Interface class: 0x3 (Human Interface Device)
- Interface subclass: 0x0 (None)
- Interface protocol: 0x0 (None)
- Endpont address 0x1, Input, Interrupt, max packet size: 1 bytes, update interval: 16 1-millisecond frames