KMDF Hid Mini Driver Installation Issue

Dear All,

I builded the sample wdk-src-kmdf-hid-minidriver for osr usb fx2 device. This will definitely fail with the custom device. I thought of debugging the driver for the necessary changes required after the installation.

But the new hardware wizard never completes. The device manager shows the driver under HID class but says that no drivers are installed for the device.

Can somebody suggest an alternative.

Regards.

Are you just trying to build and install the unmodified driver for a legitimate OSRUSBFX2 board, or is something different? Either way, take a look in setupapi.log and see what’s there related to your device and post it.

Good luck,

mm

The setupapi.log contents are normal except the missing of the last installation finished succesfully statement. There were INF file signature related issues, but since it is not signed the same errors I used to get with ohter examples also.

I have pasted the log below. If someone can find anything missing kindly respond.

[SetupAPI Log]
OS Version = 5.1.2600 Service Pack 2
Platform ID = 2 (NT)
Service Pack = 2.0
Suite = 0x0100
Product Type = 1
Architecture = x86
[2007/09/29 04:13:01 688.3 Driver Install]
#-019 Searching for hardware ID(s): usb\vid_ffff&pid_ffff&rev_0000,usb\vid_ffff&pid_ffff
#-018 Searching for compatible ID(s): usb\class_ff&subclass_01&prot_02,usb\class_ff&subclass_01,usb\class_ff
#-198 Command line processed: C:\WINDOWS\system32\services.exe
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#W059 Selecting best compatible driver failed. Error 0xe0000228: There are no compatible drivers for this device.
#W157 Default installer failed. Error 0xe0000228: There are no compatible drivers for this device.
[2007/09/29 04:13:04 2456.2]
#-199 Executing “C:\WINDOWS\system32\rundll32.exe” with command line: rundll32.exe newdev.dll,ClientSideInstall \.\pipe\PNP_Device_Install_Pipe_0.{F1C49E24-0884-4DA9-A927-6F7CE51DC3F6}
#I060 Set selected driver.
#-019 Searching for hardware ID(s): usb\vid_ffff&pid_ffff&rev_0000,usb\vid_ffff&pid_ffff
#-018 Searching for compatible ID(s): usb\class_ff&subclass_01&prot_02,usb\class_ff&subclass_01,usb\class_ff
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#W059 Selecting best compatible driver failed. Error 0xe0000228: There are no compatible drivers for this device.
#W157 Default installer failed. Error 0xe0000228: There are no compatible drivers for this device.
#I060 Set selected driver.
#-019 Searching for hardware ID(s): usb\vid_ffff&pid_ffff&rev_0000,usb\vid_ffff&pid_ffff
#-018 Searching for compatible ID(s): usb\class_ff&subclass_01&prot_02,usb\class_ff&subclass_01,usb\class_ff
#-019 Searching for hardware ID(s): usb\vid_ffff&pid_ffff&rev_0000,usb\vid_ffff&pid_ffff
#-018 Searching for compatible ID(s): usb\class_ff&subclass_01&prot_02,usb\class_ff&subclass_01,usb\class_ff
#I022 Found “USB\VID_FFFF&PID_FFFF” in c:\uday-hid\hidusbfx2.inf; Device: “KMDF HID Minidriver for OSR USB-FX2 Device”; Driver: “KMDF HID Minidriver for OSR USB-FX2 Device”; Provider: “Vendor Name”; Mfg: “Vendor Name”; Section name: “hidusbfx2.Inst”.
#I087 Driver node not trusted, rank changed from 0x00000001 to 0x00008001.
#I023 Actual install section: [hidusbfx2.Inst.NT]. Rank: 0x00008001. Effective driver date: 09/28/2007.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [hidusbfx2.Inst] in “c:\uday-hid\hidusbfx2.inf”.
#I320 Class GUID of device remains: {745A17A0-74D3-11D0-B6FE-00A0C90F57DA}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of “USB\VID_FFFF&PID_FFFF\5&31DBB019&0&1”.
#E366 An unsigned or incorrectly signed file “c:\uday-hid\hidusbfx2.inf” for driver “KMDF HID Minidriver for OSR USB-FX2 Device” will be installed (Policy=Warn, user said ok). Error 0xe000022f: The third-party INF does not contain digital signature information.
#W187 Install failed, attempting to restore original files.
#E362 An unsigned or incorrectly signed file “c:\uday-hid\hidusbfx2.inf” for driver “KMDF HID Minidriver for OSR USB-FX2 Device” will be installed (Policy=Warn). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-336 Copying file “c:\uday-hid\hidusbfx2.sys” to “C:\WINDOWS\system32\DRIVERS\hidusbfx2.sys” via temporary file “C:\WINDOWS\system32\DRIVERS\SET31.tmp”.
#E362 An unsigned or incorrectly signed file “c:\uday-hid\hidusbfx2.inf” for driver “KMDF HID Minidriver for OSR USB-FX2 Device” will be installed (Policy=Warn). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-336 Copying file “c:\uday-hid\hidkmdf.sys” to “C:\WINDOWS\system32\DRIVERS\hidkmdf.sys” via temporary file “C:\WINDOWS\system32\DRIVERS\SET32.tmp”.
#E362 An unsigned or incorrectly signed file “c:\uday-hid\hidusbfx2.inf” for driver “KMDF HID Minidriver for OSR USB-FX2 Device” will be installed (Policy=Warn). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-336 Copying file “c:\uday-hid\WdfCoInstaller01007.dll” to “C:\WINDOWS\system32\WdfCoInstaller01007.dll” via temporary file “C:\WINDOWS\system32\SET34.tmp”.
#E362 An unsigned or incorrectly signed file “c:\uday-hid\hidusbfx2.inf” for driver “KMDF HID Minidriver for OSR USB-FX2 Device” will be installed (Policy=Warn). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [hidusbfx2.Inst.NT.Interfaces] from “c:\uday-hid\hidusbfx2.inf”.
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of “USB\VID_FFFF&PID_FFFF\5&31DBB019&0&1”.
#E362 An unsigned or incorrectly signed file “c:\uday-hid\hidusbfx2.inf” for driver “KMDF HID Minidriver for OSR USB-FX2 Device” will be installed (Policy=Warn). Error 0xe000022f: The third-party INF does not contain digital signature information.

Finally I made the installation wizard complete with error by commenting the following service keys in the inf file:

SERVICE_BOOT_START, SERVICE_SYSTEM_START, SERVICE_AUTO_START,
SERVICE_DEMAND_START, SERVICE_DISABLED

The wizard reports that there was an error in the configuration of the device(code 1). Is this the result of commenting the above keys. I am almost sure that everything is correct from device side.

Regards.

xxxxx@gmail.com wrote:

Finally I made the installation wizard complete with error by commenting the following service keys in the inf file:

SERVICE_BOOT_START, SERVICE_SYSTEM_START, SERVICE_AUTO_START,
SERVICE_DEMAND_START, SERVICE_DISABLED

The wizard reports that there was an error in the configuration of the device(code 1). Is this the result of commenting the above keys. I am almost sure that everything is correct from device side.

What? Those are not “service keys”. Those are just symbolic names for
numeric constants, and if you use them in an INF, you have to define
them in your [Strings] section.

Perhaps you should post your entire INF file.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Regrets for the terminology and the lengthy postings. Here is the entire INF file as it is taken from kmdf-hidusbfx2 sample. The only change is the modification of Vendor and Product ID. The hardware found wizard never completes with the below INF file.

[Version]
Signature=“$CHICAGO$”
Class=HIDClass
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider=%VENDOR%
LayoutFile=layout.inf
DriverVer=10/02/2007,6.0.6001.16549
CatalogFile=kmdfsamples.cat

;
; Layout.inf (etc.) list all files shipped with the operating system so the
; source description sections are only needed if other files are needed.
;
; In order to use IHV drivers, the SourceDisksNames section must list the
; disk(s) containing the drivers and the SourceDisksFiles section must list
; which disk number each file to be copied is found on.
; Disk number 99 is used to avoid a conflict with the disk numbers defined
; in layout.inf
;
; Files used in a driver installation need to be digitally signed otherwise
; installation may fail. See documentation elsewhere in the DDK regarding
; driver signing.

[SourceDisksFiles]
hidusbfx2.sys = 99
hidkmdf.sys = 99

[SourceDisksNames]
99 = %DISK_NAME%,“”

[DestinationDirs]
CopyFilesSYS = 12
CopyFilesDLL = 11

[Manufacturer]
%VENDOR%=Vendor, NTx86

; For Win2K
[Vendor]
%hidusbfx2% = hidusbfx2.Inst, USB\VID_0547&PID_1002
%customCollection% = customCollection.Inst, HID_DEVICE_UP:FF00_U:0001

; For XP and later
[Vendor.NTx86]
;%hidusbfx2% = hidusbfx2.Inst, USB\VID_0547&PID_1002
%hidusbfx2% = hidusbfx2.Inst, USB\VID_FFFF&PID_FFFF
%customCollection% = customCollection.Inst, HID_DEVICE_UP:FF00_U:0001

;===============================================================
; hidusbfx2
;===============================================================
[hidusbfx2.Inst.NT]
CopyFiles = CopyFilesSYS, CopyFilesDLL

[hidusbfx2.Inst.NT.HW]
AddReg = hidusbfx2_Parameters.AddReg

[hidusbfx2.Inst.NT.Services]
AddService = hidusbfx2,0x00000002,hidusbfx2_Service_Inst,
AddService = hidkmdf, hidkmdf_Service_Inst

[CopyFilesSYS]
hidusbfx2.sys
HidClass.sys
HidParse.sys
hidkmdf.sys

[CopyFilesDLL]
Hid.dll

[hidusbfx2_Parameters.AddReg]
HKR,“UpperFilters”,0x00010000,“hidkmdf”

[hidusbfx2_Service_Inst]
DisplayName = %hidusbfx2%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_IGNORE%
ServiceBinary = %12%\hidusbfx2.sys

[hidkmdf_Service_Inst]
DisplayName = %hidkmdf.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\hidkmdf.sys
LoadOrderGroup = PNP Filter

;===============================================================
; Custom Collection install section
; - Only a Null service is installed.
;===============================================================
[customCollection.Inst]

[customCollection.Inst.NT]

[customCollection.Inst.NT.HW]
AddReg = customCollection.Inst.AddReg.NT.HW

[customCollection.Inst.AddReg.NT.HW]
HKR,“SelectiveSuspendEnabled”,0x00000001,0x1

[customCollection.Inst.NT.Services]
AddService = ,0x00000002, ; NULL Service

;================================================================
;— WDF Coinstaller installation ------
;
[DestinationDirs]
hidusbfx2.Inst_CoInstaller_CopyFiles = 11

[hidusbfx2.Inst.NT.CoInstallers]
AddReg=hidusbfx2.Inst_CoInstaller_AddReg
CopyFiles=hidusbfx2.Inst_CoInstaller_CopyFiles

[hidusbfx2.Inst_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01007.dll,WdfCoInstaller”

[hidusbfx2.Inst_CoInstaller_CopyFiles]
WdfCoInstaller01007.dll

[SourceDisksFiles]
WdfCoInstaller01007.dll=99 ; make sure the number matches with SourceDisksNames

[hidusbfx2.Inst.NT.Wdf]
KmdfService = hidusbfx2, hidusbfx2_wdfsect
[hidusbfx2_wdfsect]
KmdfLibraryVersion = 1.7

[Strings]
; *******Localizable Strings*******
VENDOR = “Vendor Name”
hidusbfx2 = “KMDF HID Minidriver for OSR USB-FX2 Device”
customCollection = “HID Vendor-defined Collection for OSR USB-FX2”
DISK_NAME = “HID USB FX2 Device Sample Install Disk”
hidkmdf.SVCDESC= “Filter Driver Service for HID-KMDF Interface layer”

; *******Non Localizable Strings*******

SERVICE_BOOT_START = 0x0
SERVICE_SYSTEM_START = 0x1
SERVICE_AUTO_START = 0x2
SERVICE_DEMAND_START = 0x3
SERVICE_DISABLED = 0x4

SERVICE_KERNEL_DRIVER = 0x1
SERVICE_ERROR_IGNORE = 0x0
SERVICE_ERROR_NORMAL = 0x1
SERVICE_ERROR_SEVERE = 0x2
SERVICE_ERROR_CRITICAL = 0x3

REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001
REG_MULTI_SZ = 0x00010000
REG_BINARY = 0x00000001
REG_SZ = 0x00000000

xxxxx@gmail.com wrote:

Regrets for the terminology and the lengthy postings. Here is the entire INF file as it is taken from kmdf-hidusbfx2 sample. The only change is the modification of Vendor and Product ID. The hardware found wizard never completes with the below INF file.

Yes, and now that you have told us everything, the reason is clear.
Compare this from your INF:

[hidusbfx2.Inst_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01007.dll,WdfCoInstaller”

[hidusbfx2_wdfsect]
KmdfLibraryVersion = 1.7

with this from your setup log:

[SetupAPI Log]
OS Version = 5.1.2600 Service Pack 2
Platform ID = 2 (NT)
Service Pack = 2.0

You are trying to use KMDF from the 6001 beta WDK on Windows XP SP2. As
has been stated several times, that doesn’t work. For the time being,
KMDF 1.7 is **ONLY** usable on the Windows Server 2008 (Longhorn) beta.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

So what might be the solution. Do I need to use previous version of KMDF. If yes, can I directly download the required or I need to download complete previous version of WDK prior to 6001 beta.

Regards.

Yes, you need to use the Vista 6000 RTM WDK and the version of KMDF (1.5) contained in it. Unfortunately, the files are not available for download separately.

Good luck,

mm

Thanks for the responses. I will be in the process of downloading and get back after doing my homework with version 1.5. Will the same with KMDF version 1.5 work with vista also.

Regards.

Yes indeed.

Yes, KMDF v1.5 can be installed on win2k through vista (in fact vista ships with v1.5 in box)

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, October 03, 2007 8:24 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] KMDF Hid Mini Driver Installation Issue

Thanks for the responses. I will be in the process of downloading and get back after doing my homework with version 1.5. Will the same with KMDF version 1.5 work with vista also.

Regards.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Dear Team,

I am in a process of downloading the KMDF 1.5 version. Meanwhile I analyzed the trace events of the sample when the hardware found wizard is loading using dbgview tool. From the messages, I found that some calls are failing because the device is not exact OSR usbfx2 device.

Some of the failed calls include Retrieving the current switch state, etc. In the sample code I commented them, builded the driver and again tried to load it.

Now the hardware wizard is finishing and the device manager is showing the message that the device is working properly.

But I am still opting for KMDF 1.5 because in future problems may occur because of running 1.7 on Windows XP SP2. As Tim mentioned KMDF 1.7 is only usable on the Windows Server 2008 (Longhorn) beta.

Thankyou for all the suggestions.

Regards.

xxxxx@gmail.com wrote:

But I am still opting for KMDF 1.5 because in future problems may occur because of running 1.7 on Windows XP SP2. As Tim mentioned KMDF 1.7 is only usable on the Windows Server 2008 (Longhorn) beta.

…for right now, that is. When the 6001 WDK is officially released,
KMDF 1.7 will be usable clear back to Windows 2000, just like KMDF 1.5
is. Further, it is likely that this support will be added in during one
of the betas. It just isn’t there yet. That’s the hazards of using a
beta WDK.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.