Agfa SnapScan e20 in Linux
CONVENTIONS USED

I bought one of these scanners today not knowing if it would work in Linux. I resolved that if it didn't, I'd write my own driver for it because I didn't want to waste any money. But my wife and I thought it would be nice to have a scanner just because we have had times when we would have liked to have one. So I got an Agfa SnapScan e20 that was refurbished for under $40 Canadian. Not a bad deal. I found out that it didn't work with Mandrake 9.0 out of the box even though it is listed in the Mandrake Control Center. So, I went to Google to find out how to do it. After reading many different websites and getting a good grasp on what I had to do, I found out that this wasn't too hard, but that no one had all of the information in one place in the form of a complete tutorial for this scanner. So I got the idea to create this document, so here it goes.

This tutorial is not for complete newbies. I am assuming that you know how to download files, make directories, open consoles, and recompile programs. I will assume that you know how to do some fairly basic things, but still, if you don't understand this tutorial just by reading through it, don't attempt it. That said, this tutorial is messy, and it works for me. I have no intentions of making it any prettier because, quite frankly, I'm lazy.

I will also assume you are using Mandrake 9.0 for this tutorial, as this is the only distro that I use now, so this is untested with anything other than 9.0.

First you need to uninstall sane-backends, if you have it installed. The way I did this was I ran rpmdrake-remove and just uninstalled anything to do with Sane. This removed kdegraphics-3.0.3-11mdk and the development package as well, but this is necessary. I haven't yet tried to force it to install without dependencies, so try that at your own risk.

Once this is done, you are ready to continue. Make a directory in your home directory and call it whatever you want. I called mine "scanner." This is where you will download all the necessary files to.

First, go to the SnapScan Project Page and download the latest tarball. The one I used, and will be referred to throughout this tutorial, is snapscan-20020926.tar.gz. Make changes where necessary.

Now go to the Sane and Xsane FTP site. From here, you need to download both the latest sane-backends tarball. Also, you need to download the latest Xsane tarball. The versions that I used are: sane-backends-1.0.8.tar.gz and xsane-0.88.tar.gz, and this tutorial will be based on these versions. Substitute the proper version numbers where appropriate from now on.

Next, you need the firmware file from the ScanWise CD-ROM. Assuming you have it mounted in the normal mount point, you would do this at a console: cp /mnt/cdrom/DRIVERS/snape20.bin ~/scanner/. We will come back to this part in a little while.

Now, plug in and power on your scanner. If you look in /dev/usb/, you should see scanner0 listed there. If not, then I think something is wrong... Maybe you have USB disabled or something. Assuming it is there, do this as root in a console: ln -s /dev/usb/scanner0 /dev/scanner. This will allow you to access the scanner as the device /dev/scanner instead of /dev/usb/scanner0 all the time. Some programs require this, according to some online resources.

After this, you need to extract the archives you downloaded. To do this, do these commands as your normal user in a console:

cd
cd scanner/
tar zxvf sane-backends-1.0.8.tar.gz
cd sane-backends-1.0.8/backends/
tar zxvf ../../snapscan-20020926.tar.gz
cd ..
./configure
make
make install
cd ..
tar zxvf xsane-0.88.tar.gz
cd xsane-0.88/
./configure
make
make install


Again, if you don't understand what happened there, then you probably shouldn't be using this tutorial. But here's the short explanation: untar the archives, untar the snapscan patch into the proper directory, then just build and install both sane-backends and xsane. That's about it.

I had no errors during this process, so I don't know what to do if you have problems.

Now, as root in a console, type in cp ~/scanner/snape20.bin /usr/local/share/sane/xsane/. This will copy the scanner's firmware into that directory for safe keeping. It will be loaded every time you load Xsane, so don't delete it.

The last step requires you to edit the file /usr/local/etc/sane.d/snapscan.conf as root. You need to specify where the firware file is. Find the line that starts with the word "firmware" and change it to read:

firmware /usr/local/share/sane/xsane/snape20.bin

Now save the file and close all the consoles and everything. You are ready to test your scanner.

Now, as your normal user, run xsane. Your scanner should be recognized and all should be well.

Note that this is a quick and dirty tutorial, and I don't expect it to work for everyone. If you encounter problems, let me know. Also, know that you can try to make the Gimp plugin work with it as well, but I didn't bother.


© D. Olson 2001-2003 -- Originally found on The Mandrake eXPerience