[sane-devel] PF1800i - Preview

Gerhard Jaeger gerhard at gjaeger.de
Fri Aug 22 07:05:12 BST 2003


Hi Alex,

On Donnerstag, 21. August 2003 23:01, Alexander Feldman wrote:
> Thanks,
>
> This small shit (the scanner) drives me nuts. Reverse engineering the
> protocol takes much more time than I initially anticipated.
>
> The bridge is GL640, I have raised the level of the protocol one level up.
> The real trouble is figuring out what the registers do. To help myself
> reading the log I have also disassembled the windows driver. It is probably
> crappy C code + the stupid MSVC6 that compiled in crappy assembler :(

Wow! It seems you really want to make this crappy hardware work with SANE ;-)

>
> Below is what I have discovered till now (not much):
> ===
> Little Endian Format (LSB First)
> Register  Type  Description
> -------------------------------------------------
> 96h, 97h  word  Scan width in pixels.
> 9ch, 9dh  word  Motor speed.
> 85h       byte  Device control. See bits below.
>                 Mask            Description
>                 --------------------------------
>                 04h             Motor on.
>                 20h             Lamp on.
>                 40h             Green led on.
> ===
> I looked at some SANE backends and didn't see anything that resembles this.
> Does it speak to you?
>
> At this moment I have working "lamp on" and "lamp off" and almost working
> "scanner go home". Unfortunately I am lacking some general scanner
> knowledge what should happen next. How do the scanner finds the beginning
> of the slide? Is there a sensor or you scan in some low resolution mode
> until the image begins? 

The general scan steps are as follows:

- home the image-sensor, mostly supported by a sensor to tell you reaching the
  end of the scan-bed
- move to the calibration area, in general the driver knows how to setup the
  motor correctly and how many steps to make to reach this area, this applies
  to all motor movements. The motor control can be tricky, as most ASICs have
  a generic stepper-motor support inside, which allows control of a wide range
  of motors
- coarse calibration, to find the darkest and brightest values
- fine calibration on a pixel base, to adjust each pixel
- move to the scan area and scan

> Do you know a place where I can find some more info
> about the TWAIN interface?

http://www.twain.org/download.htm
A lot of stuff to check including the TWAIN Developer Toolkit, but why do you
need it?

>
> I am now trying to understand how the scanned image is read. It seems that
> first the whole image is scanned and then it is transferred in blocks of 30
> lines.




More information about the sane-devel mailing list