1

I know we can find it out from the device Manager under ports. But I want to be able to get this info on command line so I can incorporate it in my python script. I looked at tools like WMI, Devcon. Devcon was able to list the USB devices connected to it but not which COM port the device is assigned to. Anybody knows a way to achieve this?

If it helps, my device I am trying to locate is USB Serial Converter

DEVCON Findall =USB

USB\VID_0403&PID_6001\AH02JYRN : USB Serial Converter

Thanks in advance!

1 Answer 1

0

I found a way. You can use devcon.exe and

devcon.exe FindAll =Ports

will give you the exact details it will show in Device Manager under Ports section-

ACPI\PNP0501\1 :Communications Port (COM2)

ACPI\PNP0501\2 : Communications Port (COM1)

FTDIBUS\VID_0403+PID_6001+AH02JYRNA\0000 : USB Serial Port (COM3)

3 matching device(s) found.

You can parse this output to find out the COM port number of your desired device.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .