Link to home
Start Free TrialLog in
Avatar of jondanger
jondanger

asked on

check if vendor_id / device_id exists,

Hi Experts,

I have two USB modems from different manufacturers, i want my c# script to determine whether it's a Zyxel or a Thomson.

Does anyone have code samples, links or examples that show how c# can retrieve vendor and device id?

Having a look around i'm not even sure it's possible in dotnet without hardware or a USB bus API or somesuch.

Many thanks,

Jon
Avatar of arif_eqbal
arif_eqbal

Life would be easy if you had an interface/DLL from the vendors but looks like you want a generic way since you would be communicating with devices from different vendors

Try to see if this helps
http://www.developerfusion.com/article/84338/making-usb-c-friendly/
A quick look on the net lead to this...
http://www.codeproject.com/KB/cs/USB_HID.aspx

Looks like this is also based on the previous article but it might be easier to use from C# if the code here is a DLL or something...
Avatar of jondanger

ASKER

Thanks arif_eqbal, i'd seen both of those links but can't get very far with either.

You're right in that i'd like a generic way.

I think something like parsing the output of Windows' lsusb equivalent will be the answer, but it's not very elegant.


ASKER CERTIFIED SOLUTION
Avatar of jondanger
jondanger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
found some code on stackoverflow that i can modify.