user1668957
user1668957

Reputation: 77

How to Know USB device "HID" and "PID"

Please advice me, is there any built in function to retrieve "PID" and "VID" when USB is hooked up to the system? If not, what is the best way to get USB "HID" and "PID"? I need these two to detect USB HID device.

Upvotes: 2

Views: 10870

Answers (2)

Rudolf Mühlbauer
Rudolf Mühlbauer

Reputation: 2531

Don't know about native .NET, I only used LibUsbDotNet so far, check the examples.

Usually you would install the .NET assembly from the sourcefourge page, add the assembly to your Visual Studio project (References/.NET) and follow the examples (LibUsbDotNet Example Code/Getting Startet Example). Details depend on your C#/.NET/Visual Studio versions.

Upvotes: 0

HeatfanJohn
HeatfanJohn

Reputation: 7333

Since your tag specifies C# I'm going to assume that you want to do this using Microsoft Windows.

Using Windows I find this information using Device Manager under Computer Management (right-click on My Computer and select Manage). Using View -> Devices by connection open up the PCI bus node and then all of the USB nodes until you find the device you are looking for. Below is an example from my PC showing three USB devices on Intel(R) 82801G (ICH7 Family) USB Universal Host Controller entries.

enter image description here

Then look at the properties of the device -> then details -> then select property hardware ids and you should get the VID and PID of the device.

enter image description here

Upvotes: 1

Related Questions