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.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Detecting enumerated COM ports  (Read 494 times)
acexbe
New Member
Image


member is offline

Avatar




PM


Posts: 10
xx 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?

User IP Logged

obby
New Member
Image


member is offline

Avatar




PM


Posts: 2
xx 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.

I know this is a workaround, but it works.

A neater way is always welcome ...

Regards to the group,

Manuel

« Last Edit: Feb 2nd, 2016, 11:31am by obby » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls