0

I wrote a firmware to a USB device that uses the generic HID class for communicating with the host PC.

When connecting the device to the PC, it shows the hard-coded string I put in the firmware, but after the driver installation is over (using the generic Windows driver), the device's name is changed to a generic "USB Input Device".

How can I rename the device back?

liorda
  • 1,552
  • 2
  • 15
  • 38

1 Answers1

1

You can't do that. The device manager shows the string that is registered at installation by the device driver - in your case it's the generic Windows driver (which obviously has no knowledge of your proprietary FW functionality beyond support of USB protocol). You need to write a driver on top of the Windows USB driver to give you the functionality you want.

SomeWittyUsername
  • 18,025
  • 3
  • 42
  • 85
  • I am using a HID class device (USB relay) that does not use any proprietary drivers and shows as "USBRelay2" in Control Panel\All Control Panel Items\Devices and Printers. I'm using Windows 7, but I'm pretty sure the same name was also visible under Windows 8. – Ekus May 07 '14 at 16:19
  • in your answer you're stating it's impossible to assign/register a name when the driver is generic (and knows nothing about the custom device). Or am I reading it wrong? I just pointed out a case when a device uses no custom driver (after all, isn't it the idea behind HID?) but still has its custom name displayed properly. – Ekus May 08 '14 at 17:54
  • @Ekus And where did this name come from? You have provided it somewhere, the OS can't figure it out on its own out of the blue. – SomeWittyUsername May 08 '14 at 19:40
  • I'm assuming Windows simply read it from the device, which seems to be what the OP is asking about (and which you describe as impossible without custom driver). I'm not a firmware programmer, just describing that what the OP wants is indeed possible and working. My _comment_ obviously is not an answer, just an observation. – Ekus Jun 11 '14 at 18:48
  • @Ekus Windows reads device data from the PCI Config Space, which contains basic data identifying the device, such as device type, its capabilities etc. In case of USB device further detalization can be extracted from USB controller, but name isn't part of this data. If it's present in FW, the OS can't extract it without driver help, because FW is proprietary software of which OS has no knowledge whatsoever (and it doesn't know how to extract data from it) – SomeWittyUsername Jun 11 '14 at 22:08
  • but the question is about HID devices - they don't need special drivers, and yet clearly they can provide their names. USB HID devices can even be supported on WinRT where you cannot add any custom drivers. Too bad OP is not around to give some feedback :/ – Ekus Jul 03 '14 at 22:43
  • 1
    @Ekus You're right, I missed that piece of info regarding HID device. HID devices indeed provide data reports via dedicated protocol that the device must support. Regarding what is being shown by Windows, I'm not sure that the OS binds the data in the HID report to the string in device manager - maybe it can be found in MSFT technical documentation – SomeWittyUsername Jul 04 '14 at 06:10