Winusb stuck at code [10] - device is not able to start

Hi all,
I found in the wdfverifier that Winusb is installed but its not able load status in that when I connect device still.
what that means?
Do I have to get signed package for development and testing on windows xp free build?

Hi all,
Also I tried using osr umdf usb sample example by changing vid and pid as per my device and GUID to install on windows xp, but still the same problem exists.

What should I do? whether I write my own kernel level USB device driver as well as user mode device driver and install it?

To pick up several questions at once:

>
Also I tried using osr umdf usb sample example by changing vid and pid as per my device and GUID to install on windows xp, but still the same problem exists.

What should I do? whether I write my own kernel level USB device driver as well as user mode device driver and install it?
<<

[The following is purely my opinion]

Face and fix your existing problems- the approach you suggest will in all probability just give you new ones you will also be unable to solve. All your current flailing around is doing is adding to the complexity of understanding what is happening to you. Don’t use a shotgun when you need a rifle- you’re too far away from your target for it to be effective and there are a bunch of things you don’t really want to be hitting sitting in between.

>
I found in the wdfverifier that Winusb is installed but its not able load status in that when I connect device still.
what that means?
<<

One caveat- the loaded / unload status comes from a snapshot taken when WdfVerifier is started, it is not updated in the background [I am doing this for UMDF, but the amount of work to cover all the information for KMDF is enough it’s not going to happen in the Win7 timeframe]. So I’m assuming this isn’t the source of this observation.

I believe it’s another indication of what you already know. Your device fails to start- the driver stack isn’t retained by the OS if it isn’t functional- what would be the point of that? So you won’t see WinUSB in loaded state until you find out why start is failing.

Does WdfVerifier show your device instance anywhere as a device for which WinUSB is a part of the driver stack?

Once a driver is selected, it shows a list [bottom middle of the KMDF tab] of all device instance IDs for which that driver is a function or filter driver [now that people are using KMDF for class filters, I’ll have to add all devices potentially affected by them, since I use these lists to disable and re-enable affected devices when verifier settings are changed- but I believe trying to push that feature to file system stuff and legacy drivers is folly], regardless of whether the device is present and regardless of which device profile it may be in. That may be a useful clue in ascertaining what your current state is- if your device is there, then at least that much of your installation has gone properly.

>
Do I have to get signed package for development and testing on windows xp free build?
<<

No. Not on any Windows OS [with this exception- for AMD64 in Vista and up, self-signed certificates either embedded in a driver or used to sign a catalog in the driver package are a minimum requirement at these stages- but no need to focus on that now].

>
Do I have to reinstall my Windows xp os completely and try again with the changes since I have installed and reinstalled the inf so many times in the os??
<<

Not really- you can search for your HWID [both forms, since it appears you have modified it- or perhaps the part that is common to both, since it’s a text search and this is a manual process so you ought to be able to exercise some judgment] in the oem*.inf files under %windir%\inf and delete all of those which are clearly previous versions of the one you are using. This will work on all Pre-Vista OS [after that you have to use things like pnpdutil].

If your setupapi logging level is turned up high enough, it’s going to show which INF is used to install your driver in the setupapi log, anyway. IIRC, you can also navigate to the HW key for your device in the registry [under HKLM\System\CCS\Enum\USB] and the INF used in installation is often recorded there, as well [I prefer to work with the logs, which is one reason it’s “IIRC”)]. Either of these checks can tell you if there’s even a reason to do any housecleaning of this sort. If it’s already using your latest INF and things are still broken, then the problem is either in your latest INF [highest probability] or in the WinUSB driver itself [or KMDF, or ???- no software is perfect]. If not, then you can either clean house or work from the INF that’s actually getting used to get a deeper understanding of what’s happening.

Again, if I were in your position, I’d do some basic validation using the debugger- for instance, since WinUSB isn’t showing as loaded for you [which doesn’t mean it never got loaded- this can happen and be undone rather quickly], you can turn verbose mode on in the debugger and just disable and enable your device in device manager. Upon enabling, you will see modload events for all drivers in your stack, which can tell you which drivers are being used [more precisely all drivers not already loaded- already loaded drivers (in use by some other device stack, for instance) just get an AddDevice call, since there’s no need to load them again]. For me that’s usually sufficient…

The questions at this point:
* So what are the driver(s) actually there for your device? [yes there are other ways to determine this than using the debugger- but the debugger works across all variants, and since its one of my indispensable tools and its my advice…] You are assuming its winusb, but why not verify that assumption?
* Which of them is failing the start IRP? I addressed ways to determine that yesterday [as did Doron].

Thanks Bob.
I accept that its not easy to go writing own Kernel device driver for the beginner.

Yes in the Wdfverifier, I am able to see with Winusb my device is there which itself is giving confidence that upto that mark my installation is proper. But There I see that device is also not loaded.

As you and all are suggested me to debug the installation and load of the winusb, I am trying to go through it now.

will update you soon on that.
Thanks again.

Hi all,
I have one more question whether I can use other available usb device driver to communicate instead of Winusb.sys? if yes then is there Win32 API’s available for that particular driver to use in user mode applications?

xxxxx@gmail.com wrote:

I have one more question whether I can use other available usb device driver to communicate instead of Winusb.sys? if yes then is there Win32 API’s available for that particular driver to use in user mode applications?

It depends on your device. There are stock drivers for many of the
standard USB device classes. If your device does not fall into one of
the standard device classes, then winusb.sys is the only “canned”
solution offered by Microsoft.

Libusb-win32 is an open source project that serves much the same
purpose. And, of course, you always have the option of writing your own
kernel driver.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.