Configuring an Epson Perfection 1670 scanner

Updated 8 August 2019

Installing SANE

To work with scanners in GNU\Linux, you will need the API developed by the [SANE] (http://www.sane-project.org) project. The project website includes a page with all [supported devices] (http://www.sane-project.org/sane-mfgs.html); as well as reports of how specific devices respond. Necessary backends are also to be found there. For this model, support is provided by the snapscan backend.
Calculate Linux Desktop comes with SANE and XSANE (graphical interface for SANE) installed by default, but if your system does not have these, use the following command to install them:

emerge -a media-gfx/sane-backends media-gfx/xsane

KDE users may appreciate the kde-apps/libksane package, which provides integration with the SANE interface.

Detecting the scanner

Make sure that your system sees the device:

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 04d9:0169 Holtek Semiconductor, Inc. 
Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 001 Device 004: ID 041e:4053 Creative Technology, Ltd Live! Cam Video IM
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 04b8:011f Seiko Epson Corp. Perfection 1670
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

This command should output a list of USB connected devices, including the name of your scanner.

Else run the following command:

dmesg | grep error

If you see something like this:

usb 2-9: device descriptor read/64, error -71
usb 2-9: device not accepting address 9, error -71

please check your cable connection. Some devices require a high-speed connection to a USB 2.0 controller.

Run sane-find-scanner to display the detected scanners. You should see something like this:

found USB scanner (vendor=0x04b8 [EPSON], product=0x011f [EPSON Scanner]) at libusb:001:002

You may of course have a different USB bus (libusb:001:002).

Firmware installation

Some scanners will not work without firmware. We also need a firmware. Firmwares are not included in the distributed version of SANE for licensing reasons, but in most cases they are available on the vendor's website or on the CD that comes with the scanner. In other words, we have to install drivers for Windows. You can download them on the official site. Look for ModUsb.cab in the driver archive. You will need the cabextract tool to work with it:

emerge cabextract

Go to the drivers' directory and run:

cabextract ModUsb.cab

Look for esfw30.bin in the extracted files: this is the firmware you need.

Configuring SANE

Then copy the firmware file to /usr/share/shane/snapscan/ and edit the configuration for the relevant backend. Open /etc/sane.d/snapscan.conf and edit the firmware line:

firmware /usr/share/sane/snapscan/Esfw30.bin

Then turn off the scanner, disconnect the USB cable from the scanner, reconnect it turn on the scanner. You can now launch XSANE, from root to begin with. If you have only a scanner and no other equipment (tuner or webcam), a device selection dialog will appear when you start xsane. Select your "EPSON Scanner1" and press OK. Wait a bit for xsane to start. If this does not happen, you will most likely see an error message. If it says "Invalid argument", something is wrong with your firmware. An error message containing "I/O" probably means that you are having problems when trying to access the device. If all is OK, an application window will open. You will be finally able to use your scanner.

As working from root is not the best option, we recommend that you add scanner users to the scanner group:

gpasswd -a user1,user2 scanner