Mohamed
Mohamed

Reputation: 41

Get product ID and Vendor ID

Hello guys is there is a way to get the Vendor ID and product is of a USB device using java or C#

Upvotes: 4

Views: 7734

Answers (2)

Ria
Ria

Reputation: 10367

USB device are identified by their vendor id and product id. Those IDs are consisting of a prefix (vid_ for vendor id or pid_ for product id) and a 4 digit HEX number. The MAX3420E for example has the vendor id vid_06ba and the product id pid_5346.

for C# see these useful articles:

Upvotes: 1

pafau k.
pafau k.

Reputation: 1687

Did you take a look at jUSB? Granted, it is quite old and not updated, but it seems usb.core API is working for both Linux and Windows.

It's worth taking note I think, how conveniently the DeviceDesriptor class, residing in just the mentioned usb.core package provides getVendorId() and getDeviceId() methods.

Upvotes: 1

Related Questions