new to usb and wdf

hi
i started with usb drivers with kmdf sample and got a osr usb learning kit fx2.
when i tried to load the driver on windows 7 32 bit machine i always get a error "device can not start code 10.

are any changes required in driver.
any help.
hilly

How did you install the driver? With devcon? Use the update parameter, not install

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?6/?3/?2013 6:12 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] new to usb and wdf

hi
i started with usb drivers with kmdf sample and got a osr usb learning kit fx2.
when i tried to load the driver on windows 7 32 bit machine i always get a error "device can not start code 10.

are any changes required in driver.
any help.
hilly


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

nope.
when i plugin the device, windows 7 is auto. installing driver which fails and then i go to device manager to update the driver and then specify the driver.

i am doing this on vbox guest windows 7 32 bit machine.
i am halted …

i tried devcon like…
devcon update osrusbfx2.inf “USB_VID\0547&PID_1002”

it says driver updated successfully but still dev mgr shows error with code 10.
but devcon also throws a msg box of bad image for wdfcoinstaller.dll - i dont know how to correct this . i downloaded wdfcoinstaller redist package , tried copying in same folder, system32 but it shows same error.
i am still halted.

i corrected the problem of wdfcoinstaller dll, now setupapi.dev.log also doesnot show any error and shows success, i tried with devcon which also completed with no error. still driver shows device can not start.

is there any change required in preparehardware function ?
plz

Using the debugger might be a good idea here.
joe

i corrected the problem of wdfcoinstaller dll, now setupapi.dev.log also
doesnot show any error and shows success, i tried with devcon which also
completed with no error. still driver shows device can not start.

is there any change required in preparehardware function ?
plz


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

yeah i attached a debugger and saw the messages from dbgprint,
control works fine but not beyond call to function WdfUsbTargetDeviceSelectConfig in the function EvtDevicePrepareHardware…

got the error , WdfUsbTargetDeviceSelectConfig fails with 0xc000000d
checking this…

i debugged with driver in step 4…, it fails as WdfUsbTargetDeviceSelectConfig fails with 0xc000000d
while final driver fails as WdfUsbTargetDeviceCreate failed. c0000010

when i plugin the device, osr usb fx 2 is visible in device manager as Computer Name -> Sample Device -> WDF Sample driver for osr usb fx2 learning kit

is that a problem, it should be in usb device stack…
i think i need some changes in inf file. plz

Did you do “device install” instead of “Devon update”?

Uninstall the driver as you have it now, delete the driver files.

Then, plug the device in,and update the driver from device manager, pointing to you install directory.

xxxxx@gmail.com wrote:

i debugged with driver in step 4…, it fails as WdfUsbTargetDeviceSelectConfig fails with 0xc000000d

That’s STATUS_INVALID_PARAMETER. How much have you modified the sample
driver? Assuming you really do have the OSR FX2 learning kit, you
should be able to compile the sample driver without changes and have it
load and run.

Have you already described how you installed this driver? If you used
“devcon install”, then that is your problem, and we can advise you on
how to fix it.

when i plugin the device, osr usb fx 2 is visible in device manager as Computer Name -> Sample Device -> WDF Sample driver for osr usb fx2 learning kit

is that a problem, it should be in usb device stack…
i think i need some changes in inf file.

No, you don’t. In Device Manager, things are listed by their function,
not by device type. The difference can be subtle, but look at the
display. The USB section is entitled “Universal Serial Bus
controllers”. That section is designed to show only the USB host
controller and its hubs. It is NOT intended to show all USB devices.
Instead, USB devices should be shown in a category that describes what
they DO. USB cameras appear in “Imaging devices”. USB keyboards appear
under “Keyboards”. USB speakers appear under “Sound, video and game
controllers”.

The OSR learning kit does not fit any pre-defined category, so they made
up their own. That’s absolutely the correct thing to do.


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

When looking in device manager, change the view to by connection and see if there is a hub and usb host controller as a parent and grandparents to your device. If yes, you have installed your driver on a usb enumerated device. If not, you have created a root enumerated device and usb commands don’t work on it.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Tuesday, June 4, 2013 9:36 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] new to usb and wdf

xxxxx@gmail.com wrote:

i debugged with driver in step 4…, it fails as
WdfUsbTargetDeviceSelectConfig fails with 0xc000000d

That’s STATUS_INVALID_PARAMETER. How much have you modified the sample driver? Assuming you really do have the OSR FX2 learning kit, you should be able to compile the sample driver without changes and have it load and run.

Have you already described how you installed this driver? If you used “devcon install”, then that is your problem, and we can advise you on how to fix it.

when i plugin the device, osr usb fx 2 is visible in device manager as
Computer Name -> Sample Device -> WDF Sample driver for osr usb fx2
learning kit

is that a problem, it should be in usb device stack…
i think i need some changes in inf file.

No, you don’t. In Device Manager, things are listed by their function, not by device type. The difference can be subtle, but look at the display. The USB section is entitled “Universal Serial Bus controllers”. That section is designed to show only the USB host controller and its hubs. It is NOT intended to show all USB devices.
Instead, USB devices should be shown in a category that describes what they DO. USB cameras appear in “Imaging devices”. USB keyboards appear under “Keyboards”. USB speakers appear under “Sound, video and game controllers”.

The OSR learning kit does not fit any pre-defined category, so they made up their own. That’s absolutely the correct thing to do.


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


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer