Jump to content

Get device driver info (like Driver Provider) for COM port driver?


george seifert

Recommended Posts

I have a USB device that comes with a driver that makes the USB port look like a COM port. I'd like to be able to automatically detect which COM port it picked. The only way I can see to do that is to match something like the Driver Provider that shows up in the Driver tab under the COM port properties in the Windows Device Manager to the manufacturer of the device. I don't have a clue how to retrieve that info. Can anyone get me started?

George

Link to comment
I have a USB device that comes with a driver that makes the USB port look like a COM port. I'd like to be able to automatically detect which COM port it picked. The only way I can see to do that is to match something like the Driver Provider that shows up in the Driver tab under the COM port properties in the Windows Device Manager to the manufacturer of the device. I don't have a clue how to retrieve that info. Can anyone get me started?

George

Checkout VISA properties. If you have a VISA refnum you can get various properties for that and the Interface Information->Interface Description should contain extra information in the string for other than built in serial ports.

Rolf Kalbermatter

Link to comment
Checkout VISA properties. If you have a VISA refnum you can get various properties for that and the Interface Information->Interface Description should contain extra information in the string for other than built in serial ports.

Rolf Kalbermatter

Thanks Rolf, but I tried that. The Interface Description just returns "COM4 - USB Serial Port". Not quite enough to narrow it down. I went through all the properties and none of them give me anything useful. I suspect I'd have to use some type of Windows function, but have no idea which one and have no idea how to figure out which function I need.

George

Link to comment
Thanks Rolf, but I tried that. The Interface Description just returns "COM4 - USB Serial Port". Not quite enough to narrow it down. I went through all the properties and none of them give me anything useful. I suspect I'd have to use some type of Windows function, but have no idea which one and have no idea how to figure out which function I need.

Hmm, I know having seen VISA returning me interface specific information. If I only knew where!

I guess if you really want to go the Windows API route you will have to check into SetupAPI (no this is not pretty and an external DLL will most likely help faciliate that significantly) or you could try to look in the registry. A starting point here might be http://msdn2.microsoft.com/en-us/library/aa909922.aspx.

Rolf Kalbermatter

Link to comment

A coworker of mine had a similar problem of not knowing which "ID number" a USB device decided to pick when connected.

Since he had only one device in the test system, at launch he would loop through the possible ID numbers and send a specific command to each one. Which ever ID returned a valid response had to be the correct one.

Not pretty but got the job done.

-James

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.