meta data for this page
  •  

This is an old revision of the document!


Sane frontends in Debian

  • xsane
  • xscanimage - simple GUI, scans directly to file, not possible to view scanned image
  • simple-scan - perfect to fast scanning of books, etc ,very simple GUI (photo/text) to create multi-pages documents (view of live scan)
  • skanlite
  • gscan2pdf

Sane backend

apt-get install sane xsane sane-utils
usermod -aG scanner user
usermod -aG lp saned

List scanners:

scanimage -L

Canon Lide 400

Bus 001 Device 003: ID 04a9:1912 Canon, Inc.

proprietary

Download and install Canon's ScanGear debian package. This package provides no compatibility with sane, it provides own tool scangearmp2

sane

From sane list, it should be supproted by sane-pixma driver: Backend: pixma (0.23.0)

Build as DEB

apt-get install build-essential fakeroot devscripts
cd /usr/src
apt-get source sane-backends
cd sane-backends-1.0.27/
apt-get build-dep sane-backends
debuild -b -uc -us
dpkg -i ../sane-backends.deb

Build from source

apt-get install libjpeg-dev libpng-dev apt-get install libjpeg-dev libpng-dev
git clone https://gitlab.com/sane-project/backends.git

read INSTALL.linux how to install

libsane.so: undefined reference to `libusb_set_option' Solution: check for old libusb in /usr/local/lib. Mine was from microchip IDE.

Download daily snapshoot from: http://www.sane-project.org/snapshots/

./configure
make
sudo make install

Now it works:

$ scanimage -L
device `pixma:04A91912_413B3B' is a CANON CanoScan LiDE 400 multi-function peripheral
device `pixma:04A91912' is a CANON CanoScan LiDE 400 multi-function peripheral

Issues

After restart of computer scanner stops working.

$ scanimage -L
device 'pixma:04A91912' is a CANON CanoScan LiDE 400 multi-function peripheral
 
$ scanimage
Output format is not set, using pnm as a default.
scanimage: open of device pixma:04A91912 failed: Device busy
 
$ SANE_DEBUG_PIXMA=4 scanimage
Output format is not set, using pnm as a default.
[sanei_debug] Setting debug level of pixma to 4.
[pixma] pixma is compiled with pthread support.
[pixma] pixma version 0.24.1
[pixma] pixma_collect_devices() found CanoScan LiDE 400 at libusb:001:004
[pixma] pixma_find_scanners() found 1 devices
[pixma] pixma_collect_devices() found CanoScan LiDE 400 at libusb:001:004
[pixma] pixma_open(): CanoScan LiDE 400
[pixma] pixma_connect() failed EBUSY
[pixma] pixma_open() failed EBUSY
[pixma] pixma_close(): CanoScan LiDE 400
scanimage: open of device pixma:04A91912 failed: Device busy

Download latest backend snapshot, compile and reinstall - doesn't help.

strace:

openat(AT_FDCWD, "/dev/bus/usb/001/007", O_RDWR|O_CLOEXEC) = 9
ioctl(9, USBDEVFS_GET_CAPABILITIES, 0x56212f5f4098) = 0
ioctl(9, USBDEVFS_CLAIMINTERFACE, 0x7ffff58ba40c) = -1 EBUSY (Device or resource busy)
close(9)                                = 0

SOLUTION:

sudo apt-get remove scanbd