Selasa, 21 September 2010

CanoScan LiDE 100 on Ubuntu 10.04 Rev1

Thanks to desertdog on this Ubuntu Forums thread, I've gotten my Canon LiDE 100 scanner working on Ubuntu 10.04. I'm posting some more complete instructions here because desertdog's instructions, while they may have worked for him, didn't work for me. Plus, I'm a firm believer in giving you the tools necessary to diagnose such problems for yourself. (Give a man a fish...)


The Linux kernel, of course. sees the scanner, as it is a USB scanner, and this can be confirmed with a 'lsusb' in your favorite terminal:

Bus 001 Device 006: ID 0471:2057 Philips
Bus 001 Device 004: ID 04a9:1904 Canon, Inc.
Bus 001 Device 002: ID 0424:2504 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 004: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96 Optical Wheel Mouse

Bus 003 Device 003: ID 413c:2006 Dell Computer Corp.
Bus 003 Device 002: ID 413c:1004 Dell Computer Corp.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 058f:9360 Alcor Micro Corp. 8-in-1 Media Card Reader
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Using 'sane-find-scanner' gives you some nice output, which should clue you in that there is no backend. Here is the relevant portion:

# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.

# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9, product=0×1904, chip=GL843?) at libusb:001:004
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend’s manpage.

# Not checking for parallel port scanners.

Okay. We get further confirmation of a missing backend when 'scanimage -L' fails:

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

So, the problem is pretty obvious here: there is no USB backend. That's a problem that's easily rectified, however, thanks to the SANE team! This scanner now has a backend in their git repository. So we just clone sane from the repo and go:

git clone git://git.debian.org/sane/sane-backends.git

This shoves a new version of SANE into the directory, sane-backends. Actually, it seems to get the frontends (saned, scanimage) as well. Not sure why. Oh well.

Make sure you have all the build tools. You need the packages libusb-dev, build-essential, and libsane-dev. Use apt-get or synaptic. Now just change to the directory 'sane-backends' and do:

./configure --prefix=/usr --sysconfdir-/etc --localstatedir=/var

Then just do a 'make' followed by a 'sudo make install'.

Once the build is complete, as root, copy the file backend/dll.conf into /etc/sane.d. You will have to edit this file to suite your needs; for example, you may need to comment out the 'net' line.

You'll be able to scan, but only as root. To fix this, you'll need to add the following two lines to your /lib/udev/rules.d/40-libsane.rules file, which you need to edit as root.

# Canon CanoScan LiDE 100
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1904", ENV{libsane_matched}="yes"

Reboot. Everything should work.

Tidak ada komentar:

Posting Komentar