plustek@linuxhacker.org

plustek@linuxhacker.org


Subject: Re: EPSON Perf 1260: lampOff, lOffOnEnd, initial position,hotplug, and more
From: Gerhard Jaeger
Date: Thu, 10 Apr 2003 17:08:31 +0200

Hi Gunther,

here we have the problem, that the warmup and lampOff Feature only work,
while the backend is active. When using scanimag, the backend gets loaded
each time scanimage is invoked and unloaded, when the work is done and
so the timed stuff like lampoff could not work. And warmup will always be
done, because from the drivers' point of view, it's always the first time it's
used...

Gerhard

On Dienstag, 1. April 2003 20:35, Gunther Reiszig wrote:
> I have verified the things I said yesterday, and I have one additional
>
> question:
> > > (i) Options lampOff, lOffOnEnd, warmup
> > > --------------------------------------
> > > Do these options work with the EPSON Perfection 1260 ?
> >
> > Of course they do!
> >
> > > With
> > >   option lampOff 300
> > >   option lOffOnEnd 1
> > > in the file plustek.conf, the lamp is moved back to its initial
> > > position and switched off immediately upon reaching that position.
> > > However, with option lampOff 10
> > >   option lOffOnEnd 0
> > > in the file plustek.conf, the lamp is moved, but stops moving before
> > > reaching its initial position, and is never switched off. When
> > > scanimage is invoked the next time, the lamp moves back to its initial
> > > position.
> >
> > Sounds somewhat strange! The options have nothing to do with the sensor
> > movement:
> >
> > warmup means time in seconds to wait before scanning, when the light was
> > off lOffOnEnd means switch off the light, when the backend has been
> > closes, i.e. on xsane exit.
> > lampOff specifies the time in seconds, when to switch off the lamp auto-
> > matically if not used... This timer will be reset upon every scan.
>
> I am calling scanimage from the command line. Is that part of the
> problem? If yes, what can I do?
>
> Whether the sensor movement problem occurs or not depends on the
> parameters with which scanimage is called. I found it occurs, for
> example, for
>
> scanimage --mode Binary --resolution 300dpi --brightness -15% -x
> 	  205.05mm -y 290mm --resolution 100
>
> but does not happen for
>
> scanimage --mode Binary --resolution 300dpi --brightness -15% -x 100mm
> 	  -y 100mm --resolution 100
> where
>  option lampOff 10
>  option lOffOnEnd 0
>  option posOffX -160
>  option posOffY -50
> in both cases.
>
> Just another thing: If the lamp has been on at the time when I call
> scanimage, it is switched off twice for a short period of time before
> scanning begins (if option warmup !=0).
> Is that wanted? Isn't that bad for the lamp?
>
> > > Next, when I specify
> > >   option lampOff 10
> > >   option lOffOnEnd 0
> > >   option warmup 60
> > > the light is switched on, and after about 65 sec, the scanner starts to
> > > scan. Upon completion, the lamp is moved towards its initial position,
> > > stops before reaching it, and is kept on forever (see above). The next
> > > scanimage command would move the lamp to its initial position.
> > > Unfortunately, I have to wait another 65 secs before scanning starts,
> > > despite the fact that the lamp has been on for quite some time now.
>
> I am calling scanimage from the command line. Is that part of the
> problem here, too?
>
> > > (iii) hotplug
> > > -------------
> > > Can the module scanner be automatically loaded/removed if a scanner is
> > > plugged into/pulled off the USB connector. How would I do that?
> >
> > Yes! Use the hotplug utilities:
> > See this page for some information on how to access a scanner via
> > scanner.o and/or libusb (lower half of the page):
> > http://www.angelfire.com/linux/crapsite/installation.html
> >
> > I suggest the usage of libusb, as regarding the kernel-development, the
> > scanner.o module will disappear sooner or later.
> >
> > If you have specific problems upon setting up the hotplug stuff, feel
> > free to ask....
>
> Thanks.
> Following
>   http://www.angelfire.com/linux/crapsite/installation.html
> I have taken these steps:
>
> * Added the following line to /etc/hotplug/usb.usermap
> plustek  0x0003  0x4b8  0x11d  0x0000       0x0000       0x00         0x00 
>           0x00            0x00            0x00            0x00           
> 0x00000000 (0x4b8 is vendor, 0x11d is product)
>
> * Created group scanner, added all users to it who should be able to use
>   the scanner.
>
> * Created file /etc/hotplug/usb/plustek with contents
> #!/bin/bash
>
> if [ "$ACTION" = add ] && [ -f "$DEVICE" ]; then
> chown .scanner "$DEVICE"
> chmod ug+rw "$DEVICE"
> echo "/etc/hotplug/usb/plustek: $ACTION $DEVICE" >>/var/log/messages
> fi
> # end file plustek
>
> * chmod 744 /etc/hotplug/usb/plustek
>
> ll /dev/usbscanner /dev/usb/scanner0
> crw-------    1 gunther  scanner  180,  48 Sep  9  2002 /dev/usb/scanner0
> crw-------    1 gunther  scanner  180,  48 Sep  9  2002 /dev/usbscanner
> (gunther is my user name, so no chmod etc is needed, I guess)
>
> * Added line
> none /proc/bus/usb usbdevfs defaults,devmode=0666 0 0
> to /etc/fstab
> # mount none
>
> /var/log/messages gives:
> Apr  1 20:19:38 linux kernel: usbdevfs: remount parameter error
>
>
> Now, if I disconnect the scanner and reconnect it, /var/log/messages says:
> Apr  1 20:12:06 linux kernel: usb.c: USB disconnect on device 2
> Apr  1 20:12:09 linux kernel: hub.c: USB new device connect on bus1/1,
> assigned device number 4 Apr  1 20:12:09 linux kernel: usb.c: USB device 4
> (vend/prod 0x4b8/0x11d) is not claimed by any active driver.
> /etc/hotplug/usb/plustek: add /proc/bus/usb/001/004
>
> * sane-find-scanner does not find anything
>
> -> What is missing/wrong?
> (I must confess I didn't understand a word from the web page cited above.
> If I could find a text that is more than simply a log file, i.e., one
> that does not only say WHAT the author has done on his system, but
> also WHY, I could probably adapt what he says to my local situation.)
>
>
> Still one more question:
> (iv) --gamma-table
> ------------------
> Why does the following command give a black scan:
>
> scanimage --mode Gray --resolution 300dpi --contrast 25% --brightness
> -15% -x 205.05mm -y 290mm --resolution 50  --custom-gamma=yes
> --gamma-table [0]0-[255]255
>
> Doesn't "--gamma-table [0]0-[255]255" represent the identity mapping?
>
>
> Any help greatly appreciated.
> Thanks, folks.
>
> Gunther
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: plustek-unsubscribe@linuxhacker.org
> For additional commands, e-mail: plustek-help@linuxhacker.org


plustek@linuxhacker.org