How I installed Canon Lide 400 on Debian Sid

Share your own howto's etc. Not for support questions!

How I installed Canon Lide 400 on Debian Sid

Postby aario » 2019-04-19 17:21

The scanner is quite new and at the time of writing this topic, still not supported with Debian Testing, let alone Debian stable. So this is how I made the scanner work:
Clone latest sane-backends source code from its upstream repository at:
https://gitlab.com/sane-project/backends
To do so you need to have git installed. Then click on clone button on top right, copy HTTPS link and in terminal type:
Code: Select all
git clone <past HTTPS link here>

Now cd into the cloned folder.
I first installed Debian Sid sane and gimp:
Code: Select all
sudo apt install sane sane-utils

Installed sane backend build requirements:
Code: Select all
sudo apt install build-essential make autoconf-archive
sudo apt build-dep sane
sudo apt install libjpeg-dev

Then compiled the backend code:
Code: Select all
./autogen.sh
./configure
make -j9

Canon Lide 400 uses pixma backend. So all I need from the compiled source was pixma library. I picked it and copied over the debian version:
Code: Select all
sudo cp ./backend/.libs/libsane-pixma.so.1.0.28 /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1.0.28
sudo rm /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1 /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1.0.27
sudo ln -s libsane-pixma.so.1.0.28 /usr/lib/x86_64-linux-gnu/sane/libsane-pixma.so.1

Based on udev rules provided by sane source code after build, in file:
Code: Select all
tools/udev/libsane.rules

Created the file:
Code: Select all
/usr/lib/udev/rules.d/49-sane.rules

With only this line:
Code: Select all
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1912", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

Added my user to scanner group.
Rebooted computer.
In Gimp I can now go to File> Create> Xscan Image> Device Dialog> Scan
And it works.

Note: When I run command:
Code: Select all
lsusb | grep -i canon

Here is what I can see:
Code: Select all
Bus 003 Device 003: ID 04a9:1912 Canon, Inc.

Check if you have the same scanner and that it is connected.
In case you still have problem, this command gives you useful information:
Code: Select all
sudo sane-find-scanner -v -v

In case it cannot detect the chip of your scanner, then the library is not found. Means you didn't copy the library in the correct path or didn't create the correct symlink based on file names and paths of your linux distro.
aario
 
Posts: 3
Joined: 2019-04-18 06:26

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable