Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:
Developing File Systems for Windows, Seattle, WA 4-7 November, 2014
Kernel Debugging & Crash Analysis Lab, Boston/Waltham, MA 10-14 November, 2014
Writing WDF Drivers: Core Concepts Lab, Palo Alto, CA 12-16 January, 2015
Windows Internals & Software Drivers Lab, Seattle, WA, 16-20 February, 2015
Writing WDF Drivers: Advanced Lab, Palo Alto, CA 10-13 March, 2015


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 3  
24 Jun 11 21:46
Disney C
xxxxxx@qq.com
Join Date: 14 Dec 2010
Posts To This List: 42
How to get USB device descriptor in user mode conveniently

I want to get the device descriptor of a USB device in user mode. And I read the usbview sample in WDK. It use the device IOCTL with IOCTL_USB_GET_NODE_CONNECTION_INFORMATION to the hub port to get the descriptor of the corresponding USB device. Is there another way to do this conveniently? I don't want to get the hub information, and I've already get the SP_DEVINFO_DATA struct and the file handle of the device, can I use these to get the device descriptor?
  Message 2 of 3  
24 Jun 11 22:02
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 9193
How to get USB device descriptor in user mode conveniently

What USBview shows you is the way you need to do it. Each usb enumerated driver does not expose usb details at its file io interface. If you have the SP_DEVINFO_DATA struct, use the devinst in the struct and call cm_get_parent to get the hub's devinst and from there open a handle to the hub and send the ioctl. d debt from my phone -----Original Message----- From: xxxxx@qq.com Sent: Friday, June 24, 2011 6:46 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to get USB device descriptor in user mode conveniently I want to get the device descriptor of a USB device in user mode. And I read the usbview sample in WDK. It use the device IOCTL with IOCTL_USB_GET_NODE_CONNECTION_INFORMATION to the hub port to get the descriptor of the corresponding USB device. Is there another way to do this conveniently? I don't want to get the hub information, and I've already get the SP_DEVINFO_DATA struct and the file handle of the device, can I use these to get the device descriptor? --- 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
  Message 3 of 3  
27 Jun 11 01:41
chang pei
xxxxxx@gmail.com
Join Date: 18 Jul 2008
Posts To This List: 105
How to get USB device descriptor in user mode conveniently

Two ways to get the USB device descriptor: 1st is that you should be in kernel, and has get the specified USB device's pdo, and then send a urb_get_device_descriptor request. 2nd, send ioctl to usbd driver in either kernel or user mode. ---------------------------- Best regards! Moore Zhang 2011/6/25 Doron Holan <xxxxx@microsoft.com> > What USBview shows you is the way you need to do it. Each usb enumerated > driver does not expose usb details at its file io interface. If you have the > SP_DEVINFO_DATA struct, use the devinst in the struct and call cm_get_parent > to get the hub's devinst and from there open a handle to the hub and send > the ioctl. > > d > > debt from my phone > <...excess quoted lines suppressed...> -- ================================= Best Regards! Moore.Zhang (Zhang Pei) --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 21:33.


Copyright ©2014, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license