We are using a USB-to-Serial converter. Windows assigns a COM port number to the serial device. For testing purposes, we need to control the COM port number assigned by Windows. For example, we would like to tell Windows to assign COM 255 to a device rather than have Windows decide what the number is. Is there any way to do this?
1
votes
3 Answers
4
votes
1
votes
This normally depends on the driver. Some drivers allow you to edit the COM port number assigned by going into the device properties in device manager and using one of the properties pages to specify the COM port number. If the model you are currently using doesn't support this I suggest finding a model that does.
1
votes
No, but if you know what device id it reports to the OS then its possible that you could find it programmatically in the device manager.
Here's a link to a code project that may give you some ideas.
Device Manager
in Windows. – Nasreddine