[sane-devel] Microtek ScanMaker 3800 backend work-in-progress
Mon, 19 Apr 2004 16:22:59 +0200
On Mon, Apr 19, 2004 at 04:49:21AM -0700, Damjan Jovanovic wrote:
> So far, I've managed to isolate the message to return
> the scanner carriage to the beginning, which gives me
> a way to implement sane_cancel(), but that's about it.
> The differences between the logs from different
> colours / resolutions / scan frames are scattered
> throughout the logs and run into dozens of kilobytes.
Changing the resolution may change the number of pixels scanned, the
number of motor steps to go, the way the motor is accelerated, the
number of lines to scan, and quite some more settings. So if it's a
low level chip, it's quite possible that lots of settings are changed.
Changing the x-size of an image from e.g. 10 mm to 12 mm should only
show up on one or a few places in the log, however.
> If I were to simply copy the logs into a SANE backend,
> the backend would be over a megabyte large and have no
> options to set except "16-bit grayscale / 48-bit
Quite a lot of this communication may be calibration.
Have you found out which USB transfers are actual commands/register
settings and which are (scan/calibration/gamma) data?
> For USB scanners that use both control messages and
> bulk reads and writes to communicate, what do these
> generally mean? Do the control messages read and write
> registers while the bulk pipes read and write memory?
That's possible. Another way could be that control messages are used
to set one register and bulk messages are used to set all or a lot of
registers. Sometimes control messages are used to select what the bulk
messages that follow do (e.g. set range of registers or memory).
> What is the usual meaning for bRequest, wValue,
> wIndex, and wLength, and the data sent in a
> "vendor-specific" control message?
It's vendor-specic :-)
wLength is the amount of data that is send to/read from the scanner.
bRequest may be the major type of command (e.g. read register).
> And how large are scanner registers / memory generally?
The numebr of registers may be in the range of 32-256. Memory really
depends on the scanner. 8 kB to some MB I guess.
> Also, so far I've been using libusb. Should I switch
> to the sanei_usb functions at some stage?
Yes. This way you don't have to rewrite your backend if other ways of
communication are used, e.g. if libusb becomes obsolete.
> I'll set up a website with some
> information/logs/scanning tools/progress at
> can someone add it to the "PROJECTS" file that comes
> with SANE?
I've added a link to our page about that scanner:
The PROJECTS file is for projects that don't intend to support a