Author Topic: Device Cannot Start (Code 10)  (Read 15970 times)

juliang

  • Member
  • ***
  • Posts: 13
Device Cannot Start (Code 10)
« on: January 06, 2011, 08:21:43 pm »
Hi I am newbie coding windows driver,

I am trying to use install a custom manufactured device on Windows XP service pack 3 using winusb.sys.

I've created the driver package (including inf file and coinstallers), when installing the device everything seems to be ok; however, I can see the device in the device manager but it has the yellow exclamation mark... The error is "This device cannot start (code 10)".

Also I see the following error in setupapi.dev.log:
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of "ROOT\USB\0000".
#E362 An unsigned or incorrectly signed file "c:\ti\usbdevice\omap_winusb.inf" for driver "WinUSB Demo" will be installed (Policy=Warn). Error 0xe000022f: The third-party INF does not contain digital signature information.
#I163 Device not started: Device has problem: 0x0a: CM_PROB_FAILED_START.
#I121 Device install of "ROOT\USB\0000" finished successfully.

I used the inf file provided in your sample codes, of course changing the VID & PID so I dont know what the problem is.

Any idea?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Device Cannot Start (Code 10)
« Reply #1 on: January 07, 2011, 10:37:08 am »
It looks like the driver installed but something went wrong with device communications. A protocol analyzer will likely offer a clue. If you don't have one, use whatever debugging tools you have to determine how the device is responding to enumeration requests and other traffic and events on the bus.

Jan

juliang

  • Member
  • ***
  • Posts: 13
Re: Device Cannot Start (Code 10)
« Reply #2 on: January 07, 2011, 11:03:39 am »
Thanks for your quick answer.

I used the trace debugger provided by microsoft (winusbtrace) but I am not sure I used it correctly, have you used it? Could you guide me in to how to use it? Because I tried it using the steps provided in http://blogs.msdn.com/b/usbcoreblog/archive/2010/02/05/how-to-generate-and-view-a-winusb-debug-trace-log.aspx but it did not log anything.

Do you think it might be something wrong with my inf file and that is why is not starting correctly?

This is my inf file:

[Version]
Signature = "$Windows NT$"
Class = USB
ClassGUID = {36FC9E60-C465-11CF-8056-444553540000}
Provider = %ProviderName%
DriverVer = 01/05/2010,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_0451&PID_d00e

[MyDevice_WinUSB.NTamd64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_0451&PID_d00e

; =================== 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.9

[USB_Install.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{E9484DFE-0A21-42af-86E9-E8BCE2DF0FEB}"

[USB_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WinUSBCoInstaller2.dll","WUDFUpdate_01009.dll","WdfCoInstaller01009.dll,WdfCoInstaller"

[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll
WUDFUpdate_01009.dll

[DestinationDirs]
CoInstallers_CopyFiles=11

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

[SourceDisksNames.x86]
1 = %DISK_NAME%,,,\i386

[SourceDisksNames.amd64]
2 = %DISK_NAME%,,,\amd64

[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1
WdfCoInstaller01009.dll=1
WUDFUpdate_01009.dll=1

[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll=2
WdfCoInstaller01009.dll=2
WUDFUpdate_01009.dll=2

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

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

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

[Strings]
ProviderName="Texas Instruments"
USB\MyDevice.DeviceDesc="WinUSB Demo"
WinUSB_SvcDesc="WinUSB Demo"
DISK_NAME="My Install Disk"

I just want to be sure that at least my file is correct and that the issue is other.