[sane-devel] Mustek BearPaw 4800TA ProII scanner

Henning Meier-Geinitz henning@meier-geinitz.de
Thu, 22 Apr 2004 21:10:18 +0200


On Tue, Apr 20, 2004 at 03:13:38AM -0600, Cosmin Pop wrote:
>   I contacted Tom Wang from Mustek asking him if I can release the SANE
> backend under a GPL license. Here is the relevant part of his answer: "It is
> ok to get the commands for the ASIC from source code. You can release the
> SANE backend with GPL." So, it's OK, I can do it.

Very good.

>   I also attach the result from sane-find-scanner -v -v. The relevant part
> is this:

> Thanks. I've added it to our page about that scanner.>   As for the error I get, description follows. If you look in the
> attachement, you'll see these lines:
>     checking for SQ-1113 ...
>     this is not a SQ-1113 (Error during bulk write) 

Your attachment is this one:

> ********   McAfee GroupShield for Microsoft Exchange    **********
> **********************************************************************
> Alert generated on: Tuesday, April 20, 2004 02:25:41 AM Mountain Daylight Time
> The file sane.tar.bz2 has been replaced. Reason: The file met the blocking options set in the anti-virus system.
> Please consult your administrator for further help quoting your ticket number: OA2_1082449541_EXMAIL_3


>   Yeah, I put SQ1113, but maybe I'll change it later... when I'll know the
> chip for sure. Not important right now. The error I get is "Error during
> bulk write". This happens during the call to usb_bulk_write.

Before you can use the bulk write command, you must know the protocol
of the scanner. Usually you will end a short and simple command here.
E.g. "set register 23" and after that "read register 23". Than you
compare if the read value is the same as the one you wrote.
But as long as you don't know the protocol you don't know how to write
values (if taht's possible at all) and if bulk messages are used for

> The definition
> of this function is something like usb_bulk_write(libusb_handle,
> bulk_out_ep, *buffer, size, libusb_timeout). It's easy to figure out what
> libusb_handle and libusb_timeout stand for. I presume size is the size of
> *buffer, but I don't know for sure few other things:

If you use the sane interface, that one is documented here:

It also takes care which endpoint to use.

>   - what should I put in bulk_out_ep? Should I put 0x82 (bEndpointAddress
> for endpoint 1)? It says "bEndpointAddress  0x82 (in 0x02)", it's "in", so I
> presume it's for writing. And "bEndpointAddress  0x01 (out 0x01)" would be
> for reading. Please correct me if I'm wrong.

The 0x80 (highest bit set) means "in" (read from device). The endpoint
is at the host (=computer) so "in" means "comes in from the device"
--> read from the device.

>   - what should be the length of *buffer? I presume it's chip specific, do I
> have to try different settings? As for the values that I should send, I'm
> out of ideas. Maybe I should wait the sources from Tom Wang for this.

Either that or create a log file on a Windows system.