Hello all,
I have a simple USB device with only control and one additional
endpoint.
It is only my application that will connect to the device. I have
solutions for
earlier Windows, but they doesn’t work on Vista.
I think it is a very good idea to use a standard driver and to avoid a
lot of the problems
with buggy drivers from a lot of different vendors.
I have followed some of the discussion here.
I have used the inf file suggested by Brian Hindman earlier.
It seems to me that winusb.sys is loaded. However, I get the message
that the device can not be started because of error code 10.
This is from setupavi.dev:
dvi: {Install DEVICE exit (0x00000000)}
dvi: Writing common driver property settings.
dvi: DriverDescription=Visagraph USB
dvi: DeviceDisplayName=Visagraph USB
dvi: Install Device: Restarting device. 14:08:03.367
dvi: Install Device: Restarting device completed. 14:08:03.944
!!! dvi: Device not started: Device has problem: 0x0a: CM_PROB_FAILED_START.
dvi: Default installer: Exit
I have checked what commands the device receives.
i and o on each lines are IN and OUT tokens received and handled.
It is a low speed device with maximum 8 byte transfer,so it should be
several IN tokens.
Get Dev Desc 00-01-00-00-40-00 iiio
Set Address 01-00-00-00-00-00 i
Get Dev Desc 00-01-00-00-12-00 iioi
Get Conf Desc 00-02-00-00-FF-00 iiiio
Get Serial Str 03-03-09-04-FF-00 iiio
Get Lang Id 00-03-00-00-FF-00 io
Get Product Str 02-03-09-04-FF-00 iiiio
Get Product Str 02-03-09-04-FF-00 iiiio
Get Dev Desc 00-01-00-00-12-00 iiio
Get Conf Desc 00-02-00-00-09-00 iio
Get Conf Desc 00-02-00-00-19-00 iiioi
Get Status 00-00-00-00-02-00 io
SetConf 01-00-00-00-00-00 i
After that, the device is configured but the USB line is either dead
(in most cases) or there are a lot of IN tokens that are NAK:ed
What exactly does 0x0a: CM_PROB_FAILED_START means? I have tried to
search for any explanation for this message, but I have not found any.
Is there any possibility to get more information on what winusb.sys is
doing? I have seen some reference to a file called winusb_update.log,
but I can’t find that file on my system.
It would be nice to have a clue on what winusb.sys is expecting. I have
downloaded the WinDDK 6000, but I can’t find any useful documentation
about winusb.sys. If vendors are supposed to use winusb.sys, there must
be some decent documentation. I would like to know what commands are
winusb sending to my device, what are crucial answers from my device
and what does error codes mean.
The descriptors come here after.
Dev_Desc:
db {DDesc_End-Dev_Desc} ; Descriptor Length
db DT_Device ; Descriptor Type (Device)
db $10,$01 ; USB specification Release (1.10)
db $ff ; Class Code (Vendor specific)
db $00 ; Subclass Code
db $00 ; Protocol Code
db $08 ; Maximum Packet Size for EP0 (8 bytes)
db $c0,$16 ; Vendor ID (EZ Prototypes)
db $4a,$29 ; Product ID - Visagraph USB
db $01,$01 ; Device Release Number (1.1)
db $01 ; Index to Manufacturer String
Descriptor
db $02 ; Index to Product String Descriptor
db $03 ; Index to Device Serial Number String
Descriptor
db $01 ; Number of possible configurations (1)
DDesc_End:
; Configuration Descriptor
Con_Desc:
db {CDesc_End-Con_Desc} ; Descriptor Length
db DT_Config ; Descriptor Type (Configuration)
db {E1Desc_End-Con_Desc}; Total data length
(Config-Interface-EP)
db 0 ; High byte data length (=0)
db $01 ; Interfaces supported
db $01 ; Configuration Value
db $00 ; Index to String Descriptor
db $80 ; Bus powered
db {!100/2} ; Maximum power consumption = 100mA
(50*2)
CDesc_End:
; Interface Descriptor
Int_Desc:
db {IDesc_End-Int_Desc} ; Descriptor Length
db DT_Interface ; Descriptor Type (Interface)
db $00 ; Number of Interface
db $00 ; No alternate setting
db $01 ; Number of endpoints
db $ff ; Class Code (Vendor specific)
db $00 ; Subclass Code
db $00 ; Protocol Code
db $00 ; Index to String Descriptor
IDesc_End:
; Endpoint Descriptor
Endp1_Desc:
db {E1Desc_End-Endp1_Desc} ; Descriptor Length
db DT_Endpoint ; Descriptor Type (Endpoint)
db $81 ; Endpoint Address and Direction
(#1,IN)
db $02 ; Endpoint Attribute (Bulk)
db $05,$00 ; Maximum Packet Size for EP1 (5 byte)
db !10 ; Polling Interval=10[ms]
E1Desc_End: