I’ve got 4 usb-serial converters (Prolific) connected to a usb hub. When i look in Device Manager i see the dynamically assigned Com numbers. But after repluging the hub into another usb port or after system reebot those com numbers will sometimes change. Is there a way to update those numbers for every converter without manually searching for those numbers? Basicly I would like to have a method in my C# project that will look for some unique id for every converter and then get new com numbers. Is there a way to do this (tried some wmi queries but without success)?
Today I thought about a workaround. So I got another question. How to obtain info about a usb hub? Basicly I could somehow find my usb hub and then retrieve info about connected into hub ports devices . Then getting com numbers of those devices would be quite easy through wmi query. I used USBView to see that it is possible to obtain such info. I can see a tree beggining from a Root Hub -> Generic USB Hub -> Prolific USB-to-serial Comm Port , but how to do it in code now. Any ideas?
Its Simple, by using win32 native calls you can get,
I just providing a part of code, to help you,
Use this code…
find Friendly names, split string get exact port you look for.
I have completed it,it works fine due to some confidentiality reason can’t able to provide full code here.
For More Find this link
http://www.codeproject.com/KB/cs/HardwareHelper.aspx