Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Need to find all Virtual Comports with VID 403 and PID 6001

$
0
0

  This is kind of a continuation of a thread I started the other day but I need to start from ground zero in hopes of a radically different solution. I am sorry if it is somewhat redundant. In a nutshell I need to find the Comport Number (not parsed from the FriendlyName and will explain) for all Virtual Serial Ports having VID 403 and PID 6001. It is a FTDI Virtual Serial Port.

 

   I was using the WMI call to Win32_PnPEntity and excluding ports not having  DeviceID "FTDIBUS\VID_0403+PID_6001". The $oItem.name would than yield something like "USB Serial Port (COM17)". This is the Device Manage description. I could then parse out the "COM17" and start communicatin with that port via RS232. The problem....COM17 is the FriendlyName and the actual port was 25. Yes that is correct. Device Manager shows "USB Serial Port (COM17)" but if you right click on it and go to properties the actual port number is 25. I verified it by using putty and indeed it was COM25. So the "FriendlyName" does reflect the true Comport Number.

 

   I found a little utility by uwe-sieber ComPortMan which comes with a little utility called listports.exe. Here is the output:

 

PortName           : COM25
KernelName       : \Device\VCP0
DeviceID            : FTDIBUS\VID_0403+PID_6001+A901R735A\0000
ParentDeviceID  : USB\VID_0403&PID_6001\A901R735
DriverKeyName  : {4D36E978-E325-11CE-BFC1-08002BE10318}\0088
FriendlyName     : USB Serial Port (COM17)
 

   As you can see the true Comport is 25 yet the firendly name is "USB Serial Port (COM17)". So... I need to find a way to retrieve the actual "PortName" and not parse the "FriendlyName". As mentioned the WMI call to Win32_PnPEntity returns the FriendlyName. A WMI call to Win32_SerialPort wont work with Virtial ComPorts. I am at a loss. I know it can be done because the listports utility does it. I have no idea where to start at this point. Help!


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>