[sane-devel] bug with Canon N1240U in Lineart mode at 75 dpi?

Gerhard Jaeger gerhard@gjaeger.de
Fri, 3 Dec 2004 09:12:33 +0100


Hi,

On Tuesday 30 November 2004 17:16, Eric Ding wrote:
> The lowest "next" resolution up is 100dpi; anything in between rounds
> either down to 75dpi or up to 100dpi.  Things seem to work just fine at
> 100 dpi, though...
> 
> The latest version of sane seems to allow an attempt at 50 dpi; this
> also fails in Lineart mode, but not in other modes.

you might wanna try and tweak the motor settings, checkout file
plustek-usbdevs.c and search for MODEL_CANON1200, you will find something
like:
	{ MODEL_CANON1200, 8, 51, 3,
		/* Motor settings (PWM and PWM_Duty) */
		/* <=75dpi       <=100dpi      <=150dpi      <=200dpi      <=300dpi  */
		{{ 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 },

		/* <=400dpi      <=600dpi      <=800dpi      <=1200dpi     <=2400dpi */
		 { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }, { 8, 31, 1 }},
		/* Color mode MCLK settings */
		{ 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0 },
		{ 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 5.0, 6.0, 6.0, 6.0 },
		/* Gray mode MCLK settings */
		{ 6.0, 6.0, XXX.0, 6.0, 6.0, 6.0, 6.0,  6.0,  6.0,  6.0 },
		{ 6.5, 6.5, 6.0, 6.0, 6.0, 6.0, 8.0, 12.0, 12.0, 12.0 }
	},

tweak the settings for "Gray mode" and <= 150dpi (where the XXX is located),
you may increase the value to 7 or 8...

Ciao,
Gerhard


> 
> Eric
> 
> Gerhard Jaeger <gerhard@gjaeger.de> wrote:
> 
> > Hi,
> > 
> > On Saturday 27 November 2004 20:24, Eric Ding wrote:
> > > I'm using sane-backends 1.0.15 with libusb on Gentoo Linux with a Canon
> > > N1240U scanner.
> > > 
> > > When I try to scan in Lineart mode at 75dpi, I get a few back-and-forth
> > > pauses, then a significant buzzing sound as the scanner's (green) light
> > > is on, but the light bar doesn't move at all.  Scanning in other modes
> > > (i.e., Gray, Color) or in Lineart mode with higher resolutions (i.e.,
> > > 96, 300, etc.) works fine.
> > > 
> > > Scanning with these settings using Canon's Windows driver works, so I
> > > conclude that this is likely an issue with the SANE plustek backend.
> > > Below find the stderr output of running
> > > 
> > >      scanimage --mode Lineart --resolution=75
> > > 
> > > with SANE_DEBUG_PLUSTEK set to 13. Have I found a bug? Can anyone
> > > confirm or deny this behavior?
> > > 
> > > Thanks,
> > > Eric
> > [SNIPSNAP]
> > 
> > I've tested that here and have no problems so far. It might be, that the 
> > motor settings for this mode are somewhat at or slightly beyond the limit
> > so that some devices have no problems while others have...
> > Can you do some more tests, i.e. increase the resolution and check when it's
> > working?
> > 
> > Ciao,
> > Gerhard
> > 
> > 
>