Niko S.
Niko S.

Reputation: 1

Define the COM port for other computers

I got a Silicon Labs CP2102 USB to UART Bridge and i need it to transfer data from my GUI to a Nucleos F446RE. I want to know if there is a way to define the COM port for the Bridge for other computers as well since on my computer it is COM8 and for a diffrent computer it is COM7. I know that i could change it manually but not anyone got admin rights and if there is any way to do it automatically it would be great.

Upvotes: 0

Views: 265

Answers (1)

Codo
Codo

Reputation: 78815

If you can, avoid a USB-to-UART bridge for exactly the reason you describe: it basically prevents a good user experience.

It is possible to change the COM port number after installation, just not to preselect it. During installation of the virtual COM device, Windows automatically chooses a COM port number that is not already in use. The avoiding conflicts part is important, and reveals why it is impossible to have the hardware choose the number. (Thanks to Ben Voigt for this part.)

You have several options:

  • The Nucleo F446RE board has a UBS interface. So you can directly connect it to your PC without a USB-to-UART bridge. Of course, the firmware needs to implement a USB device, preferably with a custom protocol and with WinUSB descriptors. That way, no device driver installation is needed and your application can communicate with the board using the WinUSB APIs.

  • If this is not possible, another alternative is to select the COM port with matching attributes, in particular with the matching vendor and product ID (VID and PID) - see links below. That way, you can at least narrow it down to a device with a Silicon Labs CP2102, which will often be sufficient to uniquely identify the port.

  • Another option is to use a USB-to-UART bridge that allows to configure a string descriptor. That way, you can uniquely identify the COM port. For a true plug and play experience, you would need to select a bridge chip that either does not need driver installation as it implements the standardized USB CDC ACM protocol (e.g. PL2303GD) or can automatically install the drivers (such as the FTDI chips).

Links:

Upvotes: 1

Related Questions