Author Topic: Cannot get WinUSB driver to Load  (Read 15207 times)

Stephen28

  • Member
  • ***
  • Posts: 3
Cannot get WinUSB driver to Load
« on: June 08, 2012, 12:06:50 am »
I just cannot get the WinUSB driver to load.  It either says that it cannot find the files, or that the data is not acceptable.

I have the WDK redist files in subfolders names x64 and x86.  I have tried version 1.11 and 1.7 of the CoInstallers.  No joy.

The root directory for the driver contains the .inf file and the two subdirectories x64 and x86 and defined in the current version of the WDK.  I currently have the entire contents of the WDK redist subdirectories copied into the x64 and x86 directories.

The contents of the .inf file using coinstaller 10007 given below.  I have also tried using WinUSBCoInstaller2.dll.  Nothing works.

Thanks.

; Adapted from the example INF in the Microsoft document "How to Use WinUSB to Communicate with a USB Device"

[Version]
Signature = "$Windows NT$"
Class = USB
ClassGuid={9363b036-dfac-432b-986c-0d77d9559d7a}
Provider = %ProviderName%
DriverVer=06/07/2012,1.0.0
;CatalogFile=MyCatFile.cat

; ========== Manufacturer/Models sections ===========

[Manufacturer]
%ProviderName% = MyDevice_WinUSB,NTx86,NTamd64

[MyDevice_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_0483&PID_7777

[MyDevice_WinUSB.NTamd64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_0483&PID_7777

; =================== Installation ===================

[USB_Install]
Include=winusb.inf
Needs=WINUSB.NT

[USB_Install.Services]
Include=winusb.inf
AddService=WinUSB,0x00000002,WinUSB_ServiceInstall

[WinUSB_ServiceInstall]
DisplayName     = %WinUSB_SvcDesc%
ServiceType     = 1
StartType       = 3
ErrorControl    = 1
ServiceBinary   = %12%\WinUSB.sys

[USB_Install.Wdf]
KmdfService=WINUSB, WinUsb_Install
UmdfServiceOrder=WINUSB

[WinUSB_Install]
KmdfLibraryVersion=1.7

[USB_Install.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{0ae231b3-c317-419f-b002-a383b31dac7b}"

[USB_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WinUSBCoInstaller.dll","WUDFUpdate_01007.dll","WdfCoInstaller01007.dll,WdfCoInstaller"

[CoInstallers_CopyFiles]
WinUSBCoInstaller.dll
WdfCoInstaller01007.dll
WUDFUpdate_01007.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

; ================= Source Media Section =====================

[SourceDisksNames]
1 = %DISK_NAME%,,,\x86
2 = %DISK_NAME%,,,\x64

[SourceDisksFiles.x86]
WinUSBCoInstaller.dll=1
WdfCoInstaller01007.dll=1
WUDFUpdate_01007.dll=1

[SourceDisksFiles.x64]
WinUSBCoInstaller.dll=2
WdfCoInstaller01007.dll=2
WUDFUpdate_01007.dll=2

; Copy Files section
;------------------------------------------------------------------------------
[_CopyFiles_sys]
winusb.sys

;************************************************* *****************************
; Destination Directories
;------------------------------------------------------------------------------
[DestinationDirs]
DefaultDestDir = 12 ; %SystemRoot%\system32\drivers
_CopyFiles_sys = 12

; =================== Strings ===================

[Strings]
ProviderName="ADDA"
USB\MyDevice.DeviceDesc="ADDA WinUSB"
WinUSB_SvcDesc="ADDA WinUSB"
DISK_NAME="ADDA Install Disk"

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Cannot get WinUSB driver to Load
« Reply #1 on: June 08, 2012, 10:04:02 am »
Check the setupapi log file:

http://support.microsoft.com/kb/927521

Jan

Stephen28

  • Member
  • ***
  • Posts: 3
Re: Cannot get WinUSB driver to Load
« Reply #2 on: June 09, 2012, 06:01:34 pm »
Jan, Thanks for the pointer to the log file.  That helped a lot.

Now I am having trouble getting the device to start.  I get the error code 10.  It is probably in my code.  What should I look for that causes an error code 10?


Stephen28

  • Member
  • ***
  • Posts: 3
Re: Cannot get WinUSB driver to Load
« Reply #3 on: June 09, 2012, 06:19:17 pm »
Found it!

The Max data packet cannot be larger than 64.  Set it to 64 and now "This device is working properly."

Thanks

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Cannot get WinUSB driver to Load
« Reply #4 on: June 09, 2012, 09:48:41 pm »
I'm glad to hear it's working. Thanks for reporting what you found as others might find it useful.

Jan