USB CDC Devices, Next COM Portnumber.

Every time you install (plug in) a CDC device with a new VID/PID combination, windows will give it a com portnumber that was not used before, so the used number always increases. If you want you can change it to a more acceptable number using the windows 'device manager'. Portnumbers already taken can be found in the registry.

To view or change the settings open the registry (with dos command "RegEdit") and navigate to the following area of the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter

Then open the “ComDB” key.The current values show e.g. that the original value of “ComDB” is as follows:
FF 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

The ComDB value is a bit mask of COM ports already allocated.
The first byte controls COM8~1, the second byte controls COM16~9, the third byte controls COM24~COM17 and so on. A value=0 means that the port is not used. A value=1 means that the port is occupied:
So, for e.g. the first byte (ports 1..8), a value of hex 43 (binary "0100 0011") means:
"0100 0011"
 |||| ||||____ Com1 used
 |||| |||_____ Com2 used
 |||| ||______ Com3 not used
 |||| |_______ Com4 not used  
 ||||_________ Com5 not used
 |||__________ Com6 not used
 ||___________ Com7 used
 |____________ Com8 not used.

The first byte “FF” in the example equates to the com ports COM8~COM1 and indicates that these COM ports are occupied (all bits are "1": hex FF is binary "1111 1111") . The second byte “3F” equates to the com ports COM14~COM9 and this indicates that these COM ports are occupied (hex 3f is binary "0011 1111").

To allocate the e.g. COM port numbers COM13~COM24, it is necessary to modify the ComDB value as follows:
03 F0 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
The first byte “03” is used for COM2 and COM1 of motherboard. COM8~COM3 are not used.
The second byte “F0” is equates to COM12~COM9 that are not used and COM16~COM13 that are occupied.
The third byte “FF” equates to COM24~COM17 which are occupied.


-------------------------------------------