On Sun, 2012-10-28 at 21:12 +0800, Xiaofan Chen wrote:
> On Sun, Oct 28, 2012 at 8:09 PM, therau2000 <therau2...@videotron.ca> wrote:
> > On Sun, 2012-10-28 at 11:51 +0800, Xiaofan Chen wrote:
> >
> > Given this scenario:
> > 1-uninstall any driver installed by zadig.exe;
> > 2-use example program xusb as a viable test program;
> > 3-use a USB memory stick for testing as it will show up as a removable
> > drive;
> > 4-when failing to "claim interface", libusbx automatically falls back to
> > "SCSI Pass Trough" for all synchronous transfers.
>
> Unfortunately libusbx does not automatically fall back to the
> SCSI Pass Through.
I do understand that libusbx does not automatically fall back to "SCSI
Pass Through". But under Linux, when program xusb fails to claim
interface 0, it does:
libusb_detach_kernel_driver
libusb_claim_interface
the result is "annoying" but it allows access my USB Device.
When program xusb fails to claim interface 0, it would seem possible to
"activate SCSI Pass Through". Further calls to libusb_bulk_transfer
could then be transparent to the application program. I guess there
should be a "deactivate SCSI Pass Through" as well to resume normal
operations.
> You need to fork libusbx and create your
> own SCSI Pass Through backend by yourself if you really want
> to use libusbx.
Before I tried to use libusbx, I investigated (and many times
unsuccessfully tried) just about every USB library I could find. It just
happens that libusbx delivers what it is supposed to deliver; well...
almost. I looked at many Java interfaces to libusbx but none appeared to
work quite right; I took the most promising one and fixed it to make it
work. I have written Java code using that libusbx interface and it works
under 32/64 bit Linux, Mac OS X, and Windows. I spent the time to write
a C prototype program (stripped down xusb.c and built on it) that does
everything I need it to do: get my Device's Firmware Version and
configuration parameters, set its internal clock, set its parameters,
and get it to format its SD card. Not knowing anything about C, my code
is not pretty but it does work. All the gets take less than one second;
all the sets take between one and two seconds total.
I am almost ready to deploy my Java program but there is a major problem
between libusb and every OS; well... may be except Linux.
When I look back at ALL the other USB library projects, they all have
something in common: they all agonized slowly to the point of being
forgotten all together. And strangely, they pretty well all agonize at
the same point: an unsolvable clash with the underlying OS. Even the
almighty IBM dropped the ball.
I am just an application developer who knew nothing about Java 5 months
ago. Unfortunately I do not have the skills to fork yet another USB
library project...
And you guys do have the capability to add "SCSI Pass Through" to
libusbx and by doing so, you may be change the destiny of libusbx.
Please take a minute (or two) to think about it...
Thanks for everything,
therau2000
------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people. Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel