[sane-devel] CanoScan N1240U is working with plustek backend

Johann Philipp johann.philipp@web.de
Mon, 18 Nov 2002 21:20:18 +0100


> Hi Johann,
>
> great to her from you!
> First of all the whole backend is based on code I got from
> Plustek, therefore it's sometimes not really clear what they've
> done. Esp. the differences between the originally supported devices
> are "hardcoded" by using CCD-type, PCD-id and motor type...
>
> Anyway. Calibration is a problem for me so far, as this does not really
> work for correctly for my 670 here. We might have to write new routines
> for the CIS devices.

I'm not sure on that, I looked during the calibration process at the sledge 
movement, and it goes way beyond the calibration strip. So my hope is, that 
the original routines will give good results, only by adjusting the positions 
and lengths coded.

>
> Before you continue, I suggest to use at least the 0.45-TEST2 version
> from www.g-jaeger.de/scanner/plustek.html. This one provides a better
> picture quality on the CanoScan devices even without calibration...

I'll try...

>
> Your questions:
>
> On Sonntag, 17. November 2002 16:58, Johann Philipp wrote:
> > Hi
> >
> > I'm happy to post a definitely positive message: My CanoScan N1240U is
> > working with the plustek backend. Some details:
> > Scanner is a LM9833 based CIS type with 1200x2400dpi @ 48bit color depth,
> > Sane is version 1.0.9 taken from cvs yesterday,
> > adaptions were made only to plustek-devs.c and plustek.conf.
> > Great work, Gerhard! I have been working on a CanoScan backend within the
> > canonscanner project on sourceforge.net and were able to scan with it
> > too. But your version is much more flexible and stable.
> > I need to test some more on all the hardware settings, before I will
> > provide you with a "non-dangerous" patch for the N1240U. Also I hope to
> > get the calibration working, but there are a few questions open:
> >
> > 1) Basically the routines seem to work, but I need some more control on
> > the Y-positions / sizes of the white and black part of the calibration
> > strip. As far as I have seen, I cannot control this completely in
> > plustek.conf. Can you give some help, where and for what to start
> > looking?
>
> The X/Y positions of the strip can be set in plustek-devs.c at the DCapsDef
> entry, the size is currently fixed inside the calibration routines to the
> width of the scanbed - see the four main calibration routines:
> coarse calibration:
> usb_AdjustGain()
> usb_AdjustOffset()
> fine calibration:
> usb_AdjustDarkShading()
> usb_AdjustWhiteShading()
>
> At least the fine calibration is not yet activated as I have too much
> trouble with it (disabled by the flag WAF_SKIP_FINE in DCapsDef
> entry of the device...
> For debugging the output of the calibration data, you might set
> the debug-level of the backend to 20 and you'll get a bunch of
> *.raw files...

I suggest to make them pnm files if possible, so you can look at them?

>
> > 2) What for do you need the "black optical pixels" (regs 0x1c and 0x1d)
> > during calibration? Sniffed data says that my windows driver software
> > never uses these during calibration.
>
> Hmpf - good question! I thought I got those settings from the various
> test-programs around, but nope! Well in fact I guess those are settings
> from another scanner so far. They're used in function usb_AdjustOffset()
> but aren't of much use so far...
>
> I'd be happy if you can manage to provide some kind of calibration code
> for this scanner type...

My starting points will be these:
1) read some more thoroughly through the code...
2) Make a little story from sniffed data which covers the replugging sequence 
(some calibration is done there) and the "real" calibration sequence.

BTW: there is some documentation on 
http://www.geocities.com/SiliconValley/Mouse/5403/ regarding programming the 
LM9831. It's not exessivly detailed, but at least it stays in line with 
Henning's description for the gt68xx backend. Another reason for library 
functions!

>
> > Greetings
> > Johann
>
> Cheers
>   Gerhard
>
> BTW: I assume, that you're talking german and we might continue
> in a private discussion...

Good idea, but: During the week I'm seldom at my computer, so please don't 
expect from me to answer quickly...

Johann