cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L073VZ I am working with this MCU and every time it connect with USB and create new COM port.

NPate.4
Associate
 
5 REPLIES 5
NPate.4
Associate

I am testing in production environment and would like to avoid creating COM ports. HOw?​

If the devices report a unique serial number, via a descriptor, Windows will given each a unique enumeration.

One approach is to cull all the enumeration nodes from the registry periodically.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Thomas L.
Associate III

Even if you're not using the UART bridge from FTDI, read FTDI's Appnote 123. It describes how Windows decides the COM port name and states methods how you can avoid getting assigned a new COM port each time. Basically you're telling Windows to ignore the HW Serial number and use a specific com port whenever a device with a specific vendor ID / device ID gets connected. A great tool to manage already existing COM ports is UsbDeview

I was digging for that, but in the wrong place. Not in SiLabs driver...

https://blogs.msdn.microsoft.com/xiz/2013/11/03/to-ignore-a-devices-serial-number/

https://www.ftdichip.com/Support/Documents/AppNotes/AN_123_How%20COM%20Ports_Are%20Allocated%20on%20Driver_Installation.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Specially for this purpose WIndows has a way to disregard "serial numbers" for specific vendor & device ID.

Look for "IgnoreHWSerNum" here.

-- pa