Ports
May 23, 2013, 09:33:17 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Welcome to the PORTS Forum. Please post your questions, answers, and comments relating to USB and other hardware interfaces in the appropriate forums below. - Jan
Pages: [1]
  Print  
Author Topic: Cannot get WinUSB driver to Load  (Read 935 times)
Stephen28
Member
*
Posts: 3


« on: June 07, 2012, 11:06:50 pm »

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"
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1629


WWW
« Reply #1 on: June 08, 2012, 09:04:02 am »

Check the setupapi log file:

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

Jan
Logged
Stephen28
Member
*
Posts: 3


« Reply #2 on: June 09, 2012, 05: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?

Logged
Stephen28
Member
*
Posts: 3


« Reply #3 on: June 09, 2012, 05: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
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1629


WWW
« Reply #4 on: June 09, 2012, 08:48:41 pm »

I'm glad to hear it's working. Thanks for reporting what you found as others might find it useful.

Jan
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!