therau2000 wrote:
> > > In that case, will you please add "SCSI Pass Through" capability
> > > to libusbx?
> > 
> > I won't, but maybe someone else will.
> 
> Sorry, I thought you were making all decisions regarding where
> libusbx is going...

Pete Batard might tell you that I have no authority in this project.

I can only speak for the approach taken by libusb, and just like the
HID class special case code for Windows in libusbx isn't something
that libusb will include, another special case for mass storage class
devices will also not be included. It's outside the scope of libusb.

I once watched a film together with some friends, and we discussed
afterwards. I said that I liked the film, but that I would have liked
it even more if the characters were different. A friend pointed out
"you basically want a different film" - which was spot on!

You basically want a different library. :)


> Who do I ask?

Regardless of where the code would be, I don't think you can really
ask anyone to do it for you. If you want it done you have to do it
yourself. The only other way is if you can get someone else so
excited about your idea that they want to do the work for you. So
far there aren't many enthusiastic comments, but who knows, maybe
Pete, Hans, or Ludovic are interested.


> > > As a matter of facts, I do need libusbx for certain functions...
> > 
> > What are those functions?
> 
> Checking for the presence of my USB Device (every 200ms or so) on
> Linux, Mac OS X, and Windows; ejecting the Device's removable
> drive; checking if/when Device is actually disconnected.

I think all those things are also possible, if not easier, if you
use storage subsystem APIs instead of USB APIs.


> > In any case, the very first thing I suggest that you do is to get to
> > the bottom of what exactly you need. While that is still unclear it's
> > much too early to consider individual tools.
> 
> There is nothing unclear about my needs; on the contrary, my needs
> are very clear and simple:
> 1-maintain USB Device's removable drive read/write capability;
> 2-momentarily communicate synchronously with USB Device's Firmware
> during a maximum of 1 to 2 seconds to do the following: [a] get Firmware
> Version; [b] get configuration parameters; [c] set the Device's internal
> clock; [d] set configuration parameters; [e] send the format storage
> command to make the Device format its SD card;

The above needs are only very high level. You'll have to drill down
in particular into the "momentarily communicate synchronously" part,
and find out exactly *how* it is done. Currently that's not really
known, and you'll need to know before you can look for tools to help.


> 3- while doing actions #2, USB Device's removable drive capability
> may not be available during 1 to 2 seconds maximum.

This contradicts 1- above, but being able to disconnect the storage
device from the system of course gives you more options for how to
reach the goal, regardless of how the non-storage communication works.

Replacing drivers is quite invasive, and can take several minutes on
Windows if you are unlucky, never mind the authorization prompts on
Vista and up. SD card accesses may also take a very long time, and if
you replace the driver while sending the non-storage commands the
storage device will disappear from the system, meaning that no files
can be kept open on the device while you send commands, and that if
the user had not saved some open files then their data is lost.
Angry user.

Hence the notion of SCSI passthrough, where it can be possible to
pass a SCSI command through the storage subsystem, directly to the
device, as long as that command doesn't modify the storage device
behind the back of the storage subsystem.

Since libusbx does exactly this for HID class devices on Windows
maybe there will be interest in including emulation of USB transfers
also on top of the storage subsystem, but even if that is the case I
think you will have to implement it yourself.

Find out exactly how those commands get sent, and find a method to
send them which is outside the USB domain if possible, since that
will be both simpler for you to implement *and* will provide a
significantly better user experience.


//Peter

------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to