hi, every body,
I just find that there are two application:
one is USBView, and the other is SPTI.
Both of them could communication with device without the need to develop a driver.
Now for USB mass storage device, there is two class specific request
one is bulk only mass storage reset, and the other is Get max lun.
It is easy to implement in a application and driver combination, which implemented control request in driver, application just using an IOCTL to call this two function.
But now I want to use the USBSTOR buk only windows native USB storage device driver.
So it is no feasible to using my own driver.
i consider mimic these two application
USBView, IOCTL_USB_USER_REQUEST, and function USBUSER_OP_SEND_RAW_COMMAND, but on microsoft web it said, do not use this request, so I will not going on this method.
Does anybody use this request to do the bulk only reset and get max lun class specific request before, or any other control transfer in application?
while on the SPTI appliction
which using the IOCTL_SCSI_PASS_THROUGH/IOCTL_SCSI_PASS_THROUGH_DIRECT.
Does this method feasible to finish this order?
This method need to fill out the structure SCSI_PASS_THROUGH/SCSI_PASS_THROUGH_DIRECT,
Which one should I use for RESET/GET MAX LUN?
and how to fill out these two structure?
Can any body give me a code snippet for fill out these two sturcture?
thank you,
any body who have experience on application of USBView and SPTI sample on WDK, and bulk only usb storage device developing, and the experience on communication by application to usb device
workingmailing@163.com wrote:
any body who have experience on application of USBView and SPTI sample on WDK, and bulk only usb storage device developing, and the experience on communication by application to usb device
I think you are focusing on the wrong tools here. Like many people, you
are not asking us about the problem you are actually trying to solve.
Instead, you have chased some random threads, narrowed in on something
you THINK might help you, and are now asking for details on those
strange solutions. That’s not the right path. Tell us about the
overall goal, and we can guide you in the right direction.
Remember that Windows has these abstractions for a very good reason. It
seems you want to send some kind of low-level commands to a USB mass
storage device. Remember that a USB mass storage device is just a mass
storage device. There is a relatively large set of ioctl commands
available to communicate with mass storage devices of ALL kinds. Some
of what you need is probably available there. If you do need a specific
command, you should be able use SCSI passthrough to send SCSI commands
directly to the device.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
As far as USB IOCTLs, IOCTL_USB_HUB_CYCLE_PORT and possibly a few others
will reset the device with certain side effects. But on Win7, none of
them are supported.
Like the site said, IOCTL_USB_USER_REQUEST will not work.
On 10/5/2011 9:57 AM, workingmailing@163.com wrote:
any body who have experience on application of USBView and SPTI sample on WDK, and bulk only usb storage device developing, and the experience on communication by application to usb device
So could some body told me
- How to do USB control transfer from app?
- Yes, USBView supply us a method to get device information just from app, but for control transfer, it definitely “do not use IOCTL_USB_USER_REQUEST”
- What I mostly care is can IOCTL_SCSI_PASS_THROUGH/IOCTL_SCSI_PASS_THROUGH_DIRECT be used for Get Max LUN and reset these two USB STOR class?
[quote]
3. What I mostly care is can IOCTL_SCSI_PASS_THROUGH / IOCTL_SCSI_PASS_THROUGH_DIRECT be used for Get Max LUN and reset these two USB STOR class?
The simple answer is NO. There is no way to get the USBSTOR.SYS driver to issue the Bulk-Only Mass Storage Reset or the Get Max LUN requests to the device on your behalf from an application.
-Glen
thank you Slick.
It seems that SCSI command could not used for USB stor class specific Get LUN and Reset.
Otherwise, there is no need to define these two class specific request.
Now I using a WDM driver.
While on the App, I construct the CBW, using bulk out
and bulk in to read data stage and CSW stage.
thank you for all who helps
You’re using a WDM driver to issue the USB specific operations for you? Why not build a WDF driver to do this?
-p
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of workingmailing@163.com
Sent: Thursday, October 06, 2011 2:00 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] IOCTL_SCSI_PASS_THROUGH/IOCTL_SCSI_PASS_THROUGH_DIRECT for USB mass storage device reset
thank you Slick.
It seems that SCSI command could not used for USB stor class specific Get LUN and Reset.
Otherwise, there is no need to define these two class specific request.
Now I using a WDM driver.
While on the App, I construct the CBW, using bulk out and bulk in to read data stage and CSW stage.
thank you for all who helps
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