Hi,
I’m using UsbBuildGetDescriptorRequest() to buid URB and sending URB via
IOCTL_INTERNAL_USB_SUBMIT_URB to get USB configuration descriptors. When I
pass the URB to composite devices driver usbccgp.sys, I can get USB
configuration descriptor back successfully. However, if I pass the URB to
USB-defined mass storage device class driver usbstor.sys, I always get
STATUS_INVALID_DEVICE_REQUEST status return. Does that storage class driver
usbstor.sys require a special URB function to access the configuration
descriptor? Is it possible to extract configuration descriptor from
usbstor.sys?
Thanks
the top edge edge of usbstor, and in reality any usb function driver, do not process URBs. URBs are processed below the function driver, it is not expected that an upper filter is sending URBs to the device. A lower filter can, but that is b/c it is talking to the right part of the stack.
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David Wu
Sent: Wednesday, November 03, 2010 8:09 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Using UsbBuildGetDescriptorRequest to get USB device interface descriptor
Hi,
I’m using UsbBuildGetDescriptorRequest() to buid URB and sending URB via IOCTL_INTERNAL_USB_SUBMIT_URB to get USB configuration descriptors. When I pass the URB to composite devices driver usbccgp.sys, I can get USB configuration descriptor back successfully. However, if I pass the URB to USB-defined mass storage device class driver usbstor.sys, I always get STATUS_INVALID_DEVICE_REQUEST status return. Does that storage class driver usbstor.sys require a special URB function to access the configuration descriptor? Is it possible to extract configuration descriptor from usbstor.sys?
Thanks
NTDEV is sponsored by OSR
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
Thanks. Is that mean there is no way for upper filter to access the USB
configuration descriptor?
----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, November 03, 2010 10:40 PM
Subject: RE: [ntdev] Using UsbBuildGetDescriptorRequest to get USB device
interface descriptor
the top edge edge of usbstor, and in reality any usb function driver, do not
process URBs. URBs are processed below the function driver, it is not
expected that an upper filter is sending URBs to the device. A lower filter
can, but that is b/c it is talking to the right part of the stack.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David Wu
Sent: Wednesday, November 03, 2010 8:09 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Using UsbBuildGetDescriptorRequest to get USB device
interface descriptor
Hi,
I’m using UsbBuildGetDescriptorRequest() to buid URB and sending URB via
IOCTL_INTERNAL_USB_SUBMIT_URB to get USB configuration descriptors. When I
pass the URB to composite devices driver usbccgp.sys, I can get USB
configuration descriptor back successfully. However, if I pass the URB to
USB-defined mass storage device class driver usbstor.sys, I always get
STATUS_INVALID_DEVICE_REQUEST status return. Does that storage class driver
usbstor.sys require a special URB function to access the configuration
descriptor? Is it possible to extract configuration descriptor from
usbstor.sys?
Thanks
—
NTDEV is sponsored by OSR
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
—
NTDEV is sponsored by OSR
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
David Wu wrote:
Thanks. Is that mean there is no way for upper filter to access the USB
configuration descriptor?
Correct. If this is absolutely necessary, then you’ll need both an
upper and a lower filter, and some method of communicating between the two.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
On Thu, Nov 4, 2010 at 7:44 PM, David Wu wrote:
> Thanks. Is that mean there is no way for upper filter to access the USB
> configuration descriptor?
>
The experts’ opinion are of course normally correct. But you might want
to try out libusb-win32 in the filter mode, which is acting as a upper filter.
For the latest libusb-win32 1.2.2.0, you can use the GUI based filter
wizard and then run the test program. The filter is not compatible
with some USB device, but it seems to work with many USB device
including USB mass storage device.
http://sourceforge.net/projects/libusb-win32/
Here is the output of the test program for Jan Axelson’s generic
HID device using the filter driver mode.
DLL version: 1.2.2.0
Driver version: 1.2.2.0
bus/device idVendor/idProduct
bus-0/\.\libusb0-0001–0x0925-0x7001 0925/7001
- Manufacturer : Lakeview Research
- Product : Generic HID
wTotalLength: 41
bNumInterfaces: 1
bConfigurationValue: 1
iConfiguration: 0
bmAttributes: c0h
MaxPower: 50
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 2
bInterfaceClass: 3
bInterfaceSubClass: 0
bInterfaceProtocol: 0
iInterface: 0
bEndpointAddress: 81h
bmAttributes: 03h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
bEndpointAddress: 01h
bmAttributes: 03h
wMaxPacketSize: 64
bInterval: 1
bRefresh: 0
bSynchAddress: 0
–
Xiaofan