If I am not mistaken, the WinUSB environment offers an attractive
alternative for us in the Vista platform. Is this true or should we be
looking at UMDF?
If WinUSB is suitable, where may I download the winusb.sys and .dll files
for testing on XP?
Thanks
dmm
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"dmm" <d...@discussions.microsoft.com> wrote in message
news:A8FDE0B4-12BE-42CD...@microsoft.com...
I have installed WinDDK 6000 (which targets both vista and xp) on my PC. I
search the entire DDK for files "winusb.sys" and "winusb.dll" but I get no
hits.
Thanks
dmm
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"dmm" <d...@discussions.microsoft.com> wrote in message
news:BA76B8CC-E1C4-4158...@microsoft.com...
dmm
Please could you tell me, how did you install the winusb.sys?
I tried it 100 times but still not able to succeed.
I followed the instructions given in "WinUsb_HowTo.doc" which is from
Microsoft.
I tried it on internet with many options. But no use.
I am using USB stick (Pen drive) device for installation.
Thanks,
Neel
I checked my notes and this is what I have:
Goto the OSR Online site
http://www.osronline.com/cf.cfm?PageURL=showlists.CFM?list=NTDEV and search
for "winusb." There is a lot of good information there on editing your inf
file so that the co-installers will execute properly.
dmm
I gone through many posting on the given link but my problem of installing
the winusb.sys driver for the USB Stick is not solved (Using the INF file
details provided my microsoft in "WinUsb_HowTo.doc") .
I am using the following WDK files (WDK - Windows Server 2008 RC1) for the
installation on WinXP:
1). WinUSBCoInstaller.dll
2). WdfCoInstaller01007.dll
3). WUDFUpdate_01007.dll
& INF file from the ""WinUsb_HowTo.doc"
I am installing the driver from "Device Manager->Update Driver" on the
connected "USB Mass storage Device".
Intallation start copying & installing "WinUSBCoInstaller.dll" &
"WdfCoInstaller01007.dll" but at the end, it displays the message dialog
"Cannot install this hardware", "There was a problem installing this
hardware".
Also, when I select the device in Device Manager and check the driver
details, then I found that the WINUSB.SYS is NOT installed (instead the
default USBTOR.SYS is installed).
I think there is problem withe INF file only.
What could be the problem?
Is this INF file not proper?
Is the WDK files not proper?
Thanks
Neel
Looks like your inf file may be in error. Here's a couple of sites that may
be helpful ...
http://blogs.msdn.com/peterwie/archive/2007/01/10/fixing-the-umdf-usb-samples-to-install-both-on-xp-vista.aspx
http://msdn2.microsoft.com/en-us/library/aa939014.aspx
dmm
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Neel" <Ne...@discussions.microsoft.com> wrote in message
news:F2FE6C0A-7267-45B7...@microsoft.com...
I have gone through those 2 links earliear.
Again now I tried once again with lot more care but still not able to succeed.
Today for the first time after installation at the end there were no errors
reported and message was The wizard has Finished installing the software for
WinUSB.
But when I check the driver details it shows the old USBTOR.Sys and not the
winusb.sys.
Here is my INF file
------------------------------------------------------------------------------------
[Version]
Signature = "$Windows NT$"
Provider = %ProviderName%
DriverVer=27/11/2007,1.0.0.0
Class = WinUSBControlledDevices
ClassGuid={1BBA3665-5FEB-4670-983A-9A0614839A0B}
;CatalogFile=MyCatFile.cat
; ========== Manufacturer/Models sections ===========
[Manufacturer]
%ProviderName% = MyDevice_WinUSB,NTx86,NTamd64
[MyDevice_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_0457&PID_0151&REV_0100
[MyDevice_WinUSB.NTamd64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_0457&PID_0151&REV_0100
; =================== Installation ===================
[ClassInstall32]
AddReg=_AddReg_ClassInstall
[_AddReg_ClassInstall]
HKR,,,,"%S_DeviceClassDisplayName%"
HKR,,Icon,,"-20"
;[1]
[USB_Install]
Include=winusb.inf
Needs=WINUSB.NT
;[2]
[USB_Install.Services]
Include=winusb.inf
AddService=WinUSB,0x00000002,WinUSB_ServiceInstall
;AddService=%S_DriverName%,0x00000002,WinUSB_ServiceInstall
;[3]
[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
;ServiceBinary = %10%\System32\Drivers\%S_DriverName%.sys
;[4]
[USB_Install.Wdf]
KmdfService=WINUSB, WinUsb_Install
UmdfServiceOrder=WINUSB
[WinUSB_Install]
KmdfLibraryVersion=1.7
;[5]
[USB_Install.HW]
AddReg=Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{171FB059-3737-40a6-9225-AC2963FD89F8}"
;[6]
[USB_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WUDFUpdate_01007.dll","WinUSBCoInstaller.dll","WdfCoInstaller01007.dll,WdfCoInstaller"
;HKR,,CoInstallers32,0x00010000,"WinUSBCoInstaller.dll","WdfCoInstaller01007.dll,WdfCoInstaller"
[CoInstallers_CopyFiles]
WUDFUpdate_01007.dll
WinUSBCoInstaller.dll
WdfCoInstaller01007.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
; ================= Source Media Section =====================
;[7]
;Commented the original code
;[SourceDisksNames]
;1 = %DISK_NAME%,,,\i386
;2 = %DISK_NAME%,,,\amd64
; Added following instead
[SourceDisksNames.x86]
1 = %DISK_NAME%,,,\i386
[SourceDisksNames.NTamd64]
2 = %DISK_NAME%,,,\amd64
[SourceDisksFiles.x86]
WUDFUpdate_01007.dll
WinUSBCoInstaller.dll=1
WdfCoInstaller01007.dll=1
[SourceDisksFiles.NTamd64]
WUDFUpdate_01007.dll
WinUSBCoInstaller.dll=2
WdfCoInstaller01007.dll=2
;******************************************************************************
; Copy Files section
;------------------------------------------------------------------------------
[_CopyFiles_sys]
; ### modify here ###
; Specify the correct file name of the driver binary.
winusb.sys
; If you want to copy a firmware file, activate the following line.
;YourFirmwareFile.ihx
;******************************************************************************
; Destination Directories
;------------------------------------------------------------------------------
;[DestinationDirs]
DefaultDestDir = 12 ; %SystemRoot%\system32\drivers
_CopyFiles_sys = 12
; =================== Strings ===================
[Strings]
ProviderName="Microsoft"
USB\MyDevice.DeviceDesc="WinUSB Device: Kadam"
WinUSB_SvcDesc="WinUSB Driver"
DISK_NAME="WinUSB Driver Disk"
S_DeviceClassDisplayName="WinUSB controlled devices"
S_DriverName="wiusb"
------------------------------------------------------------------------------------
~~~Neelesh
Is 6000 WDK available for download?
I downloaded the version 1.7 (WDK 6001.17048) from the Microsoft Connect
site http://connect.microsoft.com/
If available, Please can you send me the version 1.5 files to my mail ID
neeles...@wipro.com?
Thanks
Neel
Today again I am able to install the driver.
For this installation I used:
1) The INF file from USBIO driver (From Thesycon - usbio.sys, which is
similar in functionality of WinUSB) and modified for WinUSB data.
2) winusb.sys - from the Windows folder from my earlier installation.
At the end I am getting the following message
>>>>>>>
There was a problem installing this hardware
Windows cannot load the device driver for this hardware.
The driver may be corrupted or missing. (Code 39)
<<<<<<<<<.
But when I check the driver details in Device Manager, All ther entries are
proper including the driver name "winusb.sys".
The Only diff is that, on the device the yellow circle with "!" symbol.
(Mark of incomplete installation)
Please can you sense what could be the wrong?
Thanks
Neelesh
I have listed the working inf file that I use to install my usb driver on
the xp platform. I made a couple of changes: used your guids and device
identifier. Otherwise it is the same as mine. Note that I used a single
guid and you had two. I also specified a catalog file. Those were the 2
differences I noticied immediately except for the versions numbers of the
DLLs.
dmm
;=================== Version section ====================
[Version]
Signature = "$Windows NT$"
Class = MyDMMDeviceClass
ClassGuid = {1BBA3665-5FEB-4670-983A-9A0614839A0B}
Provider = %ProviderName%
DriverVer = 04/13/2007,4.13.0000.0
CatalogFile = MyDMMWinUSBInstall.cat
; ========== Manufacturer/Models sections ===========
[Manufacturer]
%ProviderName% = MyDevice_WinUSB,NTx86
[MyDevice_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_0457&PID_0151&REV_0100
; =================== 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
[WinUSB_Install]
KmdfLibraryVersion=1.5
[USB_Install.HW]
AddReg=Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x00010000,"{1BBA3665-5FEB-4670-983A-9A0614839A0B}"
[USB_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles,NTx86
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WinUSBCoInstaller.dll","WdfCoInstaller01005.dll,WdfCoInstaller"
[CoInstallers_CopyFiles.NTx86]
x86\WinUSBCoInstaller.dll
x86\WdfCoInstaller01005.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
; =================== Strings ===================
[Strings]
ProviderName="MyCompany"
USB\MyDevice.DeviceDesc="My Device using WinUSB only"
WinUSB_SvcDesc="WinUSB driver"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I tried your INF but again did not succeed.
Please can you send the following files from WDK 6000 i.e. KMDF ver 1.5
1. WdfCoInstaller01005.dll
2. WUDFUpdate_01005.dll
3. WinUSBCoInstaller.dll
to neeles...@wipro.com
I am able to install it on Vista successfully with the following INF.
But I am not able to enumurate it using WinUSB APIs.
Here I am not using the winusb co-installer, instead I am using the
winusb.sys directly from the Windows/System32/Drivers.
This INF is taken from Thesycon (USBIO driver - Third party) and modified.
---------------------------------------------------------------
[Version]
Signature="$Windows NT$"
Provider=%S_Provider%
DriverVer=04/11/2007,2.41.0.0
Class = WinUSBControlledDevices
ClassGuid={1BBA3665-5FEB-4670-983A-9A0614839A0B}
[ClassInstall32]
AddReg=_AddReg_ClassInstall
[_AddReg_ClassInstall]
HKR,,,,"%S_DeviceClassDisplayName%"
HKR,,Icon,,"-20"
[ControlFlags]
; Advanced options can be specified here.
; For details, refer to the Windows DDK documentation.
[Manufacturer]
%S_Mfg%=_Models
[_Models]
%S_DeviceDesc%=_Install, USB\Vid_0457&Pid_0151&Rev_0100
[_Install.ntx86]
CopyFiles=_CopyFiles_sys
[_Install.ntx86.Services]
AddService = %S_DriverName%, 0x00000002, _AddService, _EventLog
[_Install.ntx86.HW]
AddReg=_AddReg_HW
[_AddService]
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\%S_DriverName%.sys
[_EventLog]
AddReg=_EventLog_AddReg
[_EventLog_AddReg]
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\%S_DriverName%.sys"
HKR,,TypesSupported, %REG_DWORD%,7
[_AddReg_HW]
;HKR,,CleanupWizard_DeviceIdentString,%REG_SZ%,"{DAB6A146-D93E-48ab-B3E5-374AB8FFF277}"
HKR,,DeviceInterfaceGUIDs,0x10000,"{171FB059-3737-40a6-9225-AC2963FD89F8}"
HKR,,PowerStateOnOpen, %REG_DWORD%, 0
HKR,,PowerStateOnClose, %REG_DWORD%, 0
HKR,,MinPowerStateUsed, %REG_DWORD%, 3
HKR,,MinPowerStateUnused, %REG_DWORD%, 3
HKR,,EnableRemoteWakeup, %REG_DWORD%, 0
HKR,,AbortPipesOnPowerDown,%REG_DWORD%, 1
HKR,,UnconfigureOnClose, %REG_DWORD%, 1
HKR,,ResetDeviceOnClose, %REG_DWORD%, 0
HKR,,MaxIsoPackets, %REG_DWORD%, 512
HKR,,ShortTransferOk, %REG_DWORD%, 1
HKR,,RequestTimeout, %REG_DWORD%, 1000
HKR,,SuppressPnPRemoveDlg, %REG_DWORD%, 1
[_CopyFiles_sys]
winusb.sys
[DestinationDirs]
DefaultDestDir = 12 ; %SystemRoot%\system32\drivers
_CopyFiles_sys = 12
[SourceDisksNames.x86]
1=%S_DiskName%,,
[SourceDisksFiles.x86]
winusb.sys=1
[Strings]
REG_SZ = 0x00000000
REG_MULTI_SZ = 0x00010000
REG_EXPAND_SZ = 0x00020000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001
S_Provider="Neelesh"
S_Mfg="Neelesh"
S_DeviceClassDisplayName="NMK: WinUSB controlled devices"
S_DeviceDesc="NMK: WinUSB Device (USB Mass Storage Device)"
S_DeviceDesc1="NMK:WinUSB Device"
S_DiskName="NMK: WinUSB Driver Disk"
S_DriverName="winusb"
; *** EOF ***
--------------------------------------------------------------
PLEASE don't ask people to violate their license agreements. These files
are all part of the WDK, which you can get on your own.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
[CoInstallers_CopyFiles]
WinUSBCoInstaller.dll
WdfCoInstaller01005.dll
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"pswork" <psw...@discussions.microsoft.com> wrote in message
news:A2FE7491-7DD4-46C9...@microsoft.com...
Using a single bulk address with both a IN and OUT endpoint. I am a little
unclear on the device sending data to the host. When does the host send
notifcation to the device that it is expecting data? In particular my device
is monitoring some engine functions and based on some conditions will
asynchronously send status data to the host. I know a USB host initiates IN
data transfers. Does it periodically ask a device if it has any data to send?
Paul
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"pswork" <psw...@discussions.microsoft.com> wrote in message
news:78DF78A7-1D8F-4F8E...@microsoft.com...
1. My device writes data to the IN endpoint.
2. USB hardware sends the data.
3. The IN data interrupt/event occurs after the data has been sent to the
host. My device can now write more data to the IN endpoint.
I'm still a little confused on when I can safely write to the data to the IN
endpoint and what is the significance of the IN data interrupt.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"pswork" <psw...@discussions.microsoft.com> wrote in message
news:FE329BF1-867F-40C5...@microsoft.com...
>Thanks. I am working with some example code from the micro-controller I am
>using. So it appears in the USB interrupt handler that there is an event for
>IN and OUT data. On OUT data it calls an endpoint handler that reads the data
>sent by the host. But what triggers the IN data event. Does it go like this?
>
>1. My device writes data to the IN endpoint.
>2. USB hardware sends the data.
>3. The IN data interrupt/event occurs after the data has been sent to the
>host. My device can now write more data to the IN endpoint.
>
>I'm still a little confused on when I can safely write to the data to the IN
>endpoint and what is the significance of the IN data interrupt.
Usually, the sequence is pretty much as you describe. Most USB
microcontrollers have a flag that tells you if there is still room in an IN
endpoint's buffer. You write as much data as you can, or until the buffer
shows full. Then, you sit and wait (so to speak).
At some point, when your driver gets a read request queued up, the host
controller will send an IN token. The hardware in your microcontroller
will then automatically send the FIFO out the wire.
Now that there is room again, THAT'S usually the point that you get the IN
data interrupt, but the details depend on which microcontroller you are
using.
The USB host controller does poll the device periodically -
but it does so only if the driver submits a request to some IN
endpoint. This triggers the polling.
On the device side, the controller receives these IN tokens
and writes the data out if available, otherwise it responds with NAK
(see the USB 2.0 spec, 8.4.6.1).
Regards,
--PA
I am now pouring over a USB book but the issue is still not clear. When the
hosts sends data to a device, how does it know that the device has had a
chance to read the data from it's USB hardware. What prevents the host from
overwriting data if the device is slow to respond?
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com
"pswork" <psw...@discussions.microsoft.com> wrote in message
news:40C70210-AF65-4F0F...@microsoft.com...
Paul
Still confused about flow control on bulk transfers. Is it performed in
software, hardware or some sort of combination. Basically I want my device to
receive some data and process the data received so far, though there is still
more to come. While proccessing I obviously do no want to lose data.
Hardware.
Because you don't know how large the transfer is until you get it. You
might be able to handle 32 bytes, but not 512. USB never sends a "length"
beforehand, it just blasts data. If you can't handle all or part of it,
you NAK the handshake.
The difference between bulk and isochronous is that with a bulk pipe, the
host will keep retrying until your device accepts the data. With
isochronous, if you reject it, the packet is gone.
I have tried to make my application as simple as possible to debug. I am not
processing any of the data, bascially just sitting in the loop reading any
data that comes across, but I still see the problem.
Any ideas?
Once more: on bulk writes from host to device, device sees arriving
packets. After each packet, it must respond with ACK/NAK/STALL.
STALL is fatal error on pipe.
ACK means - OK, device have consumed the packet OK, the host will send the
next bytes of the pipe data as the next packet.
NAK means - sorry, device is not ready to accept more data on this pipe,
but will be ready soon when some internal conditions on the device (buffer
fullness) will change. After the device have responded with NAK, the host will
_retransmit the same packet again and again_ till STALL or ACK will be returned
by the device.
Also note that USB bulk transfers have the notion of logical frame
boundaries (unlike TCP which has none). The logical frame boundaries
established by the host can be sensed by the device, and can carry some
semantics the device can use.
The host establish a logical frame end on the end of each IRP's buffer.
The device senses this frame end when it either gets the zero-length
packet, or the packet of the incomplete length.
All of this is in host+device hardware and in device firmware, and is
hidden from the host software at all.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com
"pswork" <psw...@discussions.microsoft.com> wrote in message
news:E3052006-2548-43E1...@microsoft.com...