[Home]Sane

On this page I describe in detail how I set up a scanner under Linux. To make it more interesting, I even chose a scanner that was not supported by the linux kernel and therefore required a trivial patch to a kernel header file. Get the latest sane-frontend, sane-backend, and xsane distributions from the [SANE Homepage].

I just bought an Epson 1260 Photo scanner at Staples for $100. And now I see that, horrors, it is NOT supported by the 2.4.20 kernel!

Hmm... what to do?

Well, looking on the web, I see some interesting patches to SANE and the 2.4.19 Linux kernel here: http://www.linux-france.org/article/gvallee/scanner/epson1260-en.html , and looking at his kernel patch, I see that all it is is a single line addition to the kernel source file drivers/usb/scanner.h:

{ USB_DEVICE(0x04b8, 0x011d) }, /* Perfection 1260/1260 Photo */
so I check that file in the 2.4.20 source, expecting that it must have made it in as a patch and... NO!

Well, maybe it is just as easy to patch the 2.4.20 kernel as it was to patch the 2.4.19... yep. There is a line in scanner.h that refers to USB_DEVICE 0x011e, so I just popped the line from the patch right above that one and rebuilt my kernel. Worked fine!

I then installed the linux-hotplug package hotplug-2002_8_26.tar.gz from: http://linux-hotplug.sourceforge.net/ . Installing this package only requires copying the scripts and files from the hotplug distribution into the right places, no editing of the files is required at all.

Based on the SANE patch at the French site, I was able to determine that the Epson 1260 is actually a rebranded Plustek scanner. So I grabbed the latest SANE frontend and backend, and the latest XSANE GUI sources and built them.

Before building the sane-backends package, I updated the plustek driver to the latest version from http://www.gjaeger.de/scanner/plustek.html . At the time of this writing, the recommended version was 0.45-TEST4, which fixed a nasty bug in the motor control registers that caused the scanner to actually burn out!! The author wisely recommends that if the scanner makes a lot of noise when scanning at high resolution settings to stop scanning immediately!

If you are installing SANE for any other scanner it is probably a good idea to check the site of the maintainer for the particular driver for updates. The scanner drivers are often based on black art, and can take quite a number of iterations before they are really generally good and usable.

After installing SANE under /usr/local, I edited the file /usr/local/etc/sane.d/dll.conf to contain nothing but the word plustek.

Then I edited the file /usr/local/etc/sane.d/plustek.conf to set some options:

 # turn off the light after 5 minutes
 option lampOff 300
 # not sure whether this does anything!!
 option warmup 30
 # very important, if you don't set this the darn light
 # stays on forever!
 option lOffOnEnd 1
 # Epson supports TPA. what is TPA anyway?
 option enableTPA 1
 # kernel 2.4.20 and devfs define this device
 device /dev/usb/scanner0
 

After that, I ran:

 
 modprobe usb-uhci
 modprobe scanner
 

Then I plugged in the power for the scanner, and plugged the USB cable into the scanner and then into my USB hub. The file /var/log/messages reported:

 
 kernel: hub.c: new USB device 00:11.2-2.4, assigned address 7
 /etc/hotplug/usb.agent: Setup scanner for USB product 4b8/11d/100
 

I was then able to run xsane and start scanning!


Silverlake Linux Users Group Wiki | Recent Changes | Preferences
Password required to edit | View other revisions
Last edited December 26, 2002 9:36 pm by gateway (diff)
Search: