cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 usb virtual com port customized information

yang hong
Associate II

is it possible to add a specific name for usb port identification? when I use my PC HMI to connect this device, I can easily detect device is connected?

1 ACCEPTED SOLUTION

Accepted Solutions
Javier1
Principal

>>when I use my PC HMI to connect this device, I can easily detect device is connected?

Which operative system?

As far as i know:

  • In windows-->no, the system will access the COM port trough the windows generic virtual port driver, and thats all the info your programm will see from the PC side. (even if you set your descriptors rigth, even if you get the nice popup window with the descriptors)

Three ways to solve this:

  1. :( Create your own PC driver
  2. :| implement something like a "hello im here" inside your protocol, try to connet to all available com ports and keep the one that answers "helllo im here" right away.
  3. 🙂 make the user choose the COM port

  • In linux, the same but with a penguin.
we dont need to firmware by ourselves, lets talk

View solution in original post

5 REPLIES 5
Pavel A.
Evangelist III

Yes, you can customize strings in the USB descriptors.

MOhamed_Mehery
Associate III

You can modify this string

0693W00000VOE0lQAH.png

Javier1
Principal

>>when I use my PC HMI to connect this device, I can easily detect device is connected?

Which operative system?

As far as i know:

  • In windows-->no, the system will access the COM port trough the windows generic virtual port driver, and thats all the info your programm will see from the PC side. (even if you set your descriptors rigth, even if you get the nice popup window with the descriptors)

Three ways to solve this:

  1. :( Create your own PC driver
  2. :| implement something like a "hello im here" inside your protocol, try to connet to all available com ports and keep the one that answers "helllo im here" right away.
  3. 🙂 make the user choose the COM port

  • In linux, the same but with a penguin.
we dont need to firmware by ourselves, lets talk

Windows "classic" apps can use setupapi to detect connected USB devices and how they relate to COM ports. However, ability to read the descriptor strings is limited.

More complicated for "modern" apps, there you need to associate the app with certain devices.

For more info please see Windows documentation or visit the MS "docs" forums.

Actually, you are right, only change descriptor in controller side won't change PC general driver information. I think we need new customized driver.