BBC BASIC for Windows
« Detecting enumerated COM ports »
Welcome Guest. Please Login or Register. Apr 5th, 2018, 9:53pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
Detecting enumerated COM ports
« Thread started on: Feb 1st, 2016, 12:47pm »
Hello,
I am playing with the MCP2221 from Microchip. This is a USB to SERIAL/I2C integrated chip combo.
When you use commercial USB to RS232 converters, they have one huge disadvantage, plugging into one usb-port assigns this for example to com5, unplug and plugging into another usb-port assigns another com-number com6.
With the MCP2221, you can enumerate the serial number of the chip, this results in keeping the first time plugged in serial com portnumber. The enumeration is in the form of a ten digit number.
Now I want to autodetect these devices.(two of them connected)
I can detect the used serial numbers with the "PnpEntity" class viewing the "PNPDeviceID" member (filtering on the VID and PID of the used chips). VID= Vender ID PID= Product ID
For detecting the com-port assigned numbers I use the "Serialport" class member "Name" with filtering for "USB Serial Port ("
Now I know the two used serial numbers and the two assigned USB COMM ports.
The question now is how to detect witch serial number belongs to witch COMM port?
Re: Detecting enumerated COM ports: follow-up
« Reply #1 on: Feb 2nd, 2016, 11:22am »
The MCP2221-chip can be configured with their provided tool (MCP2221 Utility).
I changed the PID (product ID) of one of both chips from 00DD to 00DE and programmed this into the chip. Result is that the default driver did not work anymore. This is normal as the driver searches for PID 00DD.
the driver uses the file mchpcdc.inf Here you can change the PID settings. (using notepad)
After this you have to install this second modified driver.
both chips can now be identified by their individual PID and they have their individual driver.