Author Topic: INF file for custom device using Windows HID driver  (Read 20282 times)

Dinesh

  • Member
  • ***
  • Posts: 13
INF file for custom device using Windows HID driver
« on: September 14, 2012, 07:54:22 am »
Hi,
Summary of what I am doing:
----------------------------
I am using a custom device that has USB interface (HID class). I would like to use the device with Windows computer as host. For this purpose Windows native HID class driver is used in the host side. When I connect my custom device Windows OS detects it as HID compliant device and enumerates successfully Then I am able to transfer data using Control end point, interrupt IN and OUT end points.

After some investigation I found that Windows uses input.inf file for the custom device. But the device is shown as USB HID. So I need to have a INF file specific for my device to display custom device name, manufacturer and so on.

What I need?
-------------
Now my doubt is, should the INF file be signed/approved by Windows to avoid warning messages?

When I insert the custom device, I can see 2 branchs in the Device manager tree, one as HID-Compliant Device and other one as USB Human Interface Device. Is this behavior correct ?

Thanks for some help.

Best regards,
Dineshkumar M.

« Last Edit: September 14, 2012, 09:04:15 am by Dinesh »

Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: INF file for custom device using Windows HID driver
« Reply #1 on: September 14, 2012, 12:01:25 pm »
Quote
Now my doubt is, should the INF file be signed/approved by Windows to avoid warning messages?

Your install package (ie. INF file) should be signed, to get priority over the default input.inf. Otherwise, Windows automatically assign input.inf without asking for your custom INF file.

Here is an example of custom HID INF file on MSDN
http://msdn.microsoft.com/en-us/library/windows/hardware/jj131716(v=vs.85).aspx

In this example, selective suspend is assigned to the target HID device, not just changing Manufacturer and device name of the device. If you don't need selective suspend feature, replace "HID_SelSus_Inst" into "HID_Inst"
Code: [Select]
[VendorXYZDevice_Install.NT]
include     = input.inf
;; needs    = HID_SelSus_Inst.NT
needs       = HID_Inst.NT

[VendorXYZDevice_Install.NT.HW]
include     = input.inf
;; needs    = HID_SelSus_Inst.NT.HW
needs       = HID_Inst.NT.HW

[VendorXYZDevice_Install.NT.Services]
include     = input.inf
;; needs    = HID_SelSus_Inst.NT.Services
needs       = HID_Inst.NT.Services

Signing Drivers during Development and Test
http://msdn.microsoft.com/en-us/library/windows/hardware/ff552264(v=vs.85).aspx

Signing Drivers for Public Release
http://msdn.microsoft.com/en-us/library/windows/hardware/ff552279(v=vs.85).aspx



Quote
So I need to have a INF file specific for my device to display custom device name, manufacturer and so on.

Just for custom device name, you may add FriendlyName registry entry after installation, using SetupDiSetDeviceRegistryProperty( SPDRP_FRIENDLYNAME )

http://www.microchip.com/forums/fb.ashx?m=477203
http://www.microchip.com/forums/fb.ashx?m=476872

If it is HID joystick, your device can provide its label, using "Windows OS string" - Extended Properties Descriptor
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463179.aspx

Tsuneo
« Last Edit: September 14, 2012, 12:25:08 pm by Tsuneo »