How to assign a name to a USB Serial Device using Modustoolbox 2.0 in Win10

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
GaLe_4299191
Level 1
Level 1

I'm currently building a DFU application using USB CDC for the psoc61 family and I'm searching a way to distinguish the USB Serial Device from the other one in the dfuh-tool. Currently in window 10, my device can only been seen as a default USB Serial Device with a "random" COM port:

pastedImage_0.png

What I would like to have would something like "DFU USB CDC" instead of "USB Serial Device". From what I understand of the USB descriptor it should be name as the iProduct but it doesn't change anything I still see my device listed as the default "USB Serial Device". I've tried to change the idProduct to make sure the device is not overwrited by previous window configuration but no luck... I've also tried hooking up my device on a completely new computer and still doesn't work. I've also verified if the string descriptor was working well using Linux and yes it is. On Linux I can see all the information listed in the descriptor (iManufacturer, iProduct, iSerialNumber...).

Here is my Device Descriptor settings. (Note that I've also tried to change the iInterface name of CDC Interface Descriptor)

pastedImage_1.png

I'm currently out of idea, is there a way in Modustoolbox 2.0 to assign a name to the device so I can properly see it in the dfuh-tool/Device Manager on Win10 instead of the default "USB Serial Device" one? There must be a way since MiniProg4 has a custom name for is COM port...

Thank you in advance!

0 Likes
1 Solution
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Gabriel,

The Device Firmware Update Host Tool, does not take the device name from the idProduct parameter of the USB device descriptor.

In case you want to distinguish the device from other devices, you can do the following:

1. Go to the device manager in your PC.

2. Identify your device.

3. Double click on the device and go to the port settings tab of the properties dialogue box.

4. Click on the Advanced button.

5. There select the COM port number for your device. Every time you will connect the device with the PC this COM port will be assigned to the device.

Best Regards

Ekta

View solution in original post

5 Replies
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello Gabriel,

The Device Firmware Update Host Tool, does not take the device name from the idProduct parameter of the USB device descriptor.

In case you want to distinguish the device from other devices, you can do the following:

1. Go to the device manager in your PC.

2. Identify your device.

3. Double click on the device and go to the port settings tab of the properties dialogue box.

4. Click on the Advanced button.

5. There select the COM port number for your device. Every time you will connect the device with the PC this COM port will be assigned to the device.

Best Regards

Ekta

Hi Ekta,

Thank you for your answer.

I knew that was possible but what I would like is that Windows enumerate the port COM with a custom name rather than the default "USB Serial Device" to make it more intuitive for an external user since this is the name the dfuh-tool seems to be using. Is it something possible using Modustoolbox 2.0 or it's simply a matter of how Windows enumerate his port COM? Do I need a custom windows driver for that?

Regards,

Gabriel

0 Likes

I am using PSoC Creator 4.2 and it generates an .inf file where you can specify the name.  It uses the default Windows usbser.sys file so you don't have to compile your own driver.  The .inf file is not signed so you might have other problems using it.  I don't know if it is the same for Modustoolbox.  The "USB Serial Device" name comes from the default usbser.inf file from Windows:

;*****************************************

; Strings section

;*****************************************

[Strings]

; localizable

MSFT                      = "Microsoft"

UsbSerial.DeviceDesc      = "USB Serial Device"

UsbSerialModem.DeviceDesc = "USB Serial Modem Device"

UsbSerial.DriverDesc      = "Microsoft USB Serial Driver"

0 Likes

The .inf file is local to the computer. Is it possible to have the device recognized on any computer so that when windows enumerate is COM port it names it correctly like the MiniProg4 does?

Regards,

Gabriel

0 Likes

From other CDC devices I worked with like FTDI and Cypress CYUSBS234, they all require you to install a custom driver to see a different name in Windows 10.  I don't think Windows 10 will allow you to easily install an unsigned driver even if it is a better match than a signed driver.

If you just want to distinguish the device from your PC app, it is not necessary to use a custom driver to change the name seen from device manager.  The proper way to distinguish your device is by PID/VID.  If you still want to use your Product String "DFU USB CDC", it should be listed under the field "Bus reported device description" under the device details and can be accessed using Windows API:

usbcdc.png

0 Likes