stm32 usb virtual com port customized information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-26 11:31 AM
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?
Solved! Go to Solution.
- Labels:
-
USB
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-27 12:26 AM
>>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:
- :( Create your own PC driver
- :| 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.
- :) make the user choose the COM port
- In linux, the same but with a penguin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-26 12:20 PM
Yes, you can customize strings in the USB descriptors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-26 11:09 PM
You can modify this string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-27 12:26 AM
>>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:
- :( Create your own PC driver
- :| 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.
- :) make the user choose the COM port
- In linux, the same but with a penguin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-27 8:43 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-27 8:48 AM
Actually, you are right, only change descriptor in controller side won't change PC general driver information. I think we need new customized driver.
