[sane-devel] "first light" with CanoScan LiDE 600F
stef
stef.dev at free.fr
Fri Jan 11 05:57:33 UTC 2008
Le Friday 11 January 2008 06:39:25 Jürgen Ernst, vous avez écrit :
> Hi!
>
> I have to report a first success with a CanoScan LiDE 600F.
> (or "first light" as astronomers like to say when they got the first
> picture from a new telescope :-)
>
> I wrote a perl script to access the scanner via Device::USB.
> After formatting the log (I made with benoit's usbsnoopy) I replayed the
> data to the scanner and suddenly it moved a few times forth and back,
> then turned on the lights an moved about 1 inch forward.
>
> While figuring out what is going on I got some weird error codes from
> libusb after writing data to endpoint 0x03. It was error code -ENOENT
> (-2) "No such file or directory". First I thought it's a problem with
> permissions but I ran the script as root so there couldn't be a problem
> with permissions and mod 0644 is okay.
>
> Then I stepped further and if the error code was -2 then I simply
> ignored it and tried a bulk_read on endpoint 0x83 as seen in the log.
> And what did you think what happened? It nevertheless returned data!
> Maybe this is a bug in libusb or a trick from canon? I don't know.
> However a bulk_read on endpoint 0x83 returned the same bytes as seen in
> the log.
>
> --
> Ciao
> Jürgen
>
> UNIX&BSD's, are what every OS should aspire to be!
> Windows, are an opening in an otherwise solid and opaque surface through
> which light and, sometimes, even air can pass through. Nothing more.
Hello,
surely be some timing issue. When reading data, especially scanned data, you
sometime have to wait for it being available before reading it. USB logs
don't have a timestamp, which hide all possible idle waits.
Sometimes there is a read before that gives the available data count.
Regards,
Stef
More information about the sane-devel
mailing list