April 22, 2008

Give your scanner a new fresh SANE installation ...

Many Canon Pixma models are supported directly by the Sane Library (through the pixma backend), and the use of an older specific driver is not necessary anymore. Support is either natively brought by the Linux distribution you're running, latest models or bug fixes become available by using the git version

So it became necessary to rationalize all the older articles posted on that blog, in order to guide users to the sole and correct solution to install the pixma backend on their system. Old articles have been retailored, this main tutorial has now all the necessary stuff to get your Pixma scanner ready to use with Sane.

This little guide will explain you how to get the latest Sane git version to be installed on your system. As always, the Sane git version contains the latest release of the Sane pixma backend.Note that the procedure here can be used also for installing the version 1.0.20 of the Sane library.

All recent PIXMA and ImageClass models are supported, see the man pages or sane-project.org doc pages for more information.The following models have at least been tested or reported to work fine with Sane.

PIXMA MP210, MP220, MP240, MP250, MP260, MP270

PIXMA MP450, MP460, MP470, MP480, MP490

PIXMA MP500, MP510, MP520, MP530, MP540, MP560

PIXMA MP600, MP600R, MP610, MP620, MP630, MP640, MP710

PIXMA MP800, MP800R, MP810, MP830, MP960, MP970, MP980, MP990

PIXMA MX300, MX310, MX330, MX700, MX850, MX860, MX7600

MultiPASS MP700, MP730, PIXMA MP750 (no grayscale)

ImageCLASS MF3110, MF4010, MF4018, MF4120, MF4122, MF4140

ImageCLASS MF4150, MF4270, MF4370dn, MF4380dn

ImageCLASS MF4660, MF4690, MF5770, D480

I-SENSYS MF4320d, MF4330d

All models are now supported through USB or network BJNP (Canon's proprietary) protocol, Wired Ethernet or Wifi.

As compile Sane can be sometimes tricky, I'll try to give you the way to avoid pitfalls and have it working at the end, without too much efforts.

Hope it helps !! Let's go.

Download latest Sane git package

2 methods to get the latest Sane git package are possible.

HTTP access method

The HTTP access method should be used only if you are restricted by a firewall that won't let you use the git protocol. HTTP is slower and requires more bandwidth than any other access methods.

You can download an http snapshot at the address hereafter, where Sane git is hosted:

Do a quick check after download, that the directory contained in the archive is at a current date.Then, untar the package into a directory.

Or use git to download it, as developers do ...

This is actually better than the previous method, as you can later easily update (using git again) the content of the downloaded files, simply issuing a git pull command.You patch just the modified files, and you will recompile only what has changed, not the whole thing.

So first, you must install the git application on your system, it should be available already packaged in your distribution repositories, the name should be something like: git-core or git-scm

Then, in a terminal, enter the following command:

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

Files download will begin. You’ll get in your current directory, a new directory named sane-backends. This is the main directory were all the Sane source files are located.

Updating to the latest source files from the repository

If you want later to update your git directory with the latest version available from the public Sane git repository, in order to build the latest Sane code, you just need to enter the following command, from the sane-backends directory:

$ git pull

This will download the latest changes to the files in your directory sane-backends.

Then, to build Sane, you can apply the following procedure from the "make", then "make install" statements as indicated here below. Only changed files will be recompiled.

Build Sane

Enter the directory sane-backends created after downloading Sane git.

The procedure is then “almost” classical, with a few points to take into account instead of running a trivial ./configure, make, make install.

According to your Linux distribution, you need to run the ./configure command with a set of parameters.

As it is not possible to cover here all existing distributions, details are given for Ubuntu and Mandriva, as samples.

For these 2 distributions:

Check first that the development libusb library is present and installed.

On Mandriva, the rpm is called something like:

libusb0.1_x-devel-...

on Ubuntu, it is called: libusb-dev.

Install the package, if not already installed.

Be warned that if not installed, compilation will success, but the backend will not work, and no error message will be prompted!

On both distributions, run the ./configure command like this:

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

This will choose /usr/lib/sane as SANE lib directory, /etc/sane.d as SANE config files dir, and /var/lock/sane as state directory: The ones that are used by Mandriva and Ubuntu.

Check in the logs coming in the terminal window, at the end of the configure, that it will compile with usb support.

Then compile as usual

$ make

This will take ... a significative amount of time ... Can have a cup of coffee.

Install on Ubuntu

$ sudo make install

Or install on Mandriva

$ su# make install

Set non-root users permissions

Now, permissions for non root users to access the scanners need to be set up, as not achieved by the “make install” statement. These permission settings depend also on the Linux distribution: whether it uses hotplug, udev, …

Ubuntu Hardy and later (Intrepid, ...)This tweak is not necessary as hardware detection is performed by HAL and not udev, the scanner should be available for non root users, as long as permissions are set to enable scanning from menu: System/Administration/Users and Groups (need a logout/login for changes to be taken into account).However, if you experience permissions problems for non root users (ressource not available) on these latest Ubuntu releases, you should try Lee's suggestion, for tweaking the /etc/udev/rules.d/40-basic-permissions.rules.

Ubuntu (releases before Hardy Heron 8.04) and Mandriva both use udev to detect USB devices.SANE compilation produces a udev rules file, covering all scanners handled.It is named: sane-backends/tools/udev/libsane.rulesYou'll need to install it, by simply replacing the current installed file (coming from the SANE package installed by your Linux distribution), with this new one.

Locate first this file in the /etc/udev/rules.d directory, it should be called XX-libsane.rules

Backup this file somewhere

Copy over it, the SANE GIT generated libsane.rulesKeep the same name as the original one.This should give you the following statements, for instance, on Ubuntu:

In Xsane, you may need to adjust the colors precisely (white, black, gray), using the 3 pipette tool in the preview window.Read Xsane documentation on how to do that. This is very easy to do, and you'll get after that beautiful scans.

To finish, here are some samples obtained with an MP610, scanning at 600 dpi, and an extra view of a small detail on a stamp, scanned at 4800 dpi.

Is the situation the same for the root user ?Did you try scanimage under root ?

If it works under root, then you'll have to update the udev rules (suppose Xubuntu uses udev too ?). For that, use the file generated by SANE CVS compilation, it contains all the updated devices : sane-backends/tools/udev/libsane.rulesReplace the file in the Xubuntu udev directory, probably named: /etc/udev/rules.d/70-libsane.rules(Keep the Xubuntu name for this file) with this SANE CVS libsane.rules file. Then, either reboot or unplug/replug MP610 to have the new udev rules applied.

I'll add some words in this tutorial for installing the libsane.rules file, as it is not installed by the SANE CVS "make install" command.

Thanks, Nicolas. Here is what I did: make uninstallmake distcleanfollowed all the instructions againDid the all important 45-libsane.rules swaprestarted udev [sudo /etc/init.d/udev restart]It works. xsane ui came up too.Now, all I need to do is scan ... :)Thanks again. Tom

Bit shout of thanks for putting this blog together, it's been really helpful.

Just a few things to add:

* I tried at first to get this up and running with an Ubuntu 7.04 64 bit install, but no joy. Had to upgrade to 7.10 in order for this to work.* Ran into some problems testing the device as I have 2 video capture cards, in the machine, but xsane worked fine once I told it the correct device to scan from.

Thanks for the info on 7.04, but remember this Ubuntu release was a real nightmare for scanners and USB devices, due to Linux kernel version, and attempt to add power saving to USB interfaces...Was using another Canon N656U scanner at that time, which was working flawlessly on 6.10, but failed to work on 7.04...

Just check Ubuntu bug #85488 to revive this tragedy for Ubuntu (with intervention of M. Shuttleworth himself in the thread...)

Hopefully, this is for the museum. Latest Ubuntu releases and Linux Kernel now handle correctly USB power saving, as you can judge by yourself.

Thanks for the information. I did this on a PIXMA MX300 scanner/printer. Everything seemed to work. scanimage -L seems to find everything. However, when I try and run scanimage -T, I get an error. either: Fail Error: Error during device I/O. Or sometimes it will go through the test, I will get to stepped read, 2048 and it will give me a Fail Error. Any ideas.

Thanks for the information. I think this was the first time I had the scanner working before the printer.One thing I can add is that on my gentoo system I had to add the non-root users to the scanner group:gpasswd -a henk scannerto get it working.

I did copy the files as suggested but it still isn't granting me access to the MX700 without root. I think I may have executed Sudo Make and Sudo Make Install. Would that have had any impact on non-root access to the scanner?

Hi, thanks for this nice tutorial! I have one Advice: Ubuntu 8.04 Hardy Heron doesn't use any udev rules for scanner device anymore. This is now handled by the hal-deamon. So one must not copy the libsane-rule to the rules directory when usinh hardy.

Can you please make a comment at this point in your tutorial for other users.

Ok, Ubuntu 8.04.1 there was no libsane in sane-backends/tools/hal or sane-backends/tools/udev and xsane starts up saying "Failed to open device xx, access to recourse has been denied." But if I start it as sudo, it works, and scans, and is by all means happy. Help?

Thanks Nicolos, these instructions have got a friends Canon MX310 scanning on Ubuntu Hardy, as well it looks like it's fixed my I/O error problem on my Canon MP600 also on Hardy.A quick question has the CVS installation include your updated drivers, mp150-0.14.0u, or should we install them as well

Latest Sane CVS has been updated with MX7600 pid, could you get it and give a try. Maybe it will still fail, in this case, it will be necessary to dig a little bit further to check which protocol this MFP uses.

Well, not all Linux users have brains. I thought I had a few... I got wireless working smoothly, nVidia graphics, my printer...

Then I came to the scanner. It's an MP470, and I'm running 64bit Hardy.

I tried installing the libusb through synaptic. It downloaded something, and I thought it was installed. But when I ran the ./configure line, it told me that it would install without usb support. Oops.

So I installed libusb-dev via apt get, along with the two dependencies libc6-dev and libusb-0.1-4, and it told me I already had the newest versions, but did install one of the packages.

So now all three files are installed. I tried apt-get install on all three, and it tells me already installed.

So, I went ahead and compiled from there.

Naturally, scanimage -L doesn' t find my device.

So what do I need to do? Do I need to reverse what I have done somehow, and start over, or can I just start again with ./configure?

Well, I cleaned up my mess, made sure that libusb-dev was installed, and recompiled.

Sane is installed fine.

$ scanimage -V shows:

$ scanimage (sane-backends) 1.0.19; backend version 1.0.19

(it doesn't say CVS, but I downloaded the tarball from the alioth site)

Xsane is in my applications menu.

But, I get no device/scanner found, whether I load Xsane from menu or do $ scanimage -L.

I tried rebooting, to no avail.

I tried $ sane-find-scanner and got this:

found USB scanner (vendor=0x04a9, product=0x1723) at libusb:003:006 # Your USB scanner was (probably) detected. It may or may not be supported by # SANE. Try scanimage -L and read the backend's manpage.

But I still get no device found with $ scanimage -L or from the menu.

Just in case, I tried changing the lisbane rules. I typed $ sudo cp /etc/udev/rules.d/70-libsane.rules ~/

And got:

cp: cannot stat `/etc/udev/rules.d/70-libsane.rules': No such file or directory

Fortunately, I still have Vista to scan with while I figure this out.

Any idea? As a reminder, I'm running Hardy 62bit, and a Canon Pizma MP 470 printer.

Could you redownload or update to the latest CVS version. 1.1.0 is the CVS version, and it gets updated regularly, but the version number does not change. There's been a modification recently to Sane_start, and I'm wondering if this is taken into account in your version.

Then, we'll be able to do some more testing to understand where this can come from, with the latest CVS.

Thanks for the great guide. Everything went smoothly with my MX850 in Ubuntu Hardy.

The only problem I'm still having is that I need to run xsane as root, even after changing the "use scanner" permissions in Users & Groups. Is there somewhere else that these permissions might be being set that are overriding this setting?

Hi, thanks for instructions, it worked great with my MX310. But I have few questions.MX310 should support scanning at 1200 dpi, but it doesn't work - scanned image has vertical lines over it. I can only scan at 600 dpi or less.

This is probably wrong place to ask, but is there any support for faxing with canon MFPs? I couldn't find anything about it.

I figured out that the errors are because scanimage is detecting the Pixma MX850 on the network, but can't access it (it's directly connected to my LAN, as well as to my Ubuntu box by USB), and that the scanimage test is failing because it is only attempting to test this first device.

It looks like scanimage fails whether I'm root or not, though fails for different reasons. Also, not sure why scanimage is still trying to read from the networked connection after I specify the device I want it to use?

When scanimage is run, it asks the pixma backend to detect scanners on usb and on network. Looks that there's a network communication issue, maybe a firewall blocking bjnp ports (8611 to 8614) ?

But that's an interesting case, we'll look at what happens in here.

Also, looks like usb cannot access the device (failed: Access to resource has been denied), so maybe a permissions problem around that. Did you set up a libsane rules file, to grant permissions to non root users to have access to scanners ?

On Hardy Heron, it's difficult to tell as I've read things and their opposite, but some people report having the scanner work after they installed the libsane rules file. So maybe, worth a try ?

Concerning network, there's a cups bjnp add-on (designed by Louis Lagendijk, who also built the network part of the Sane pixma backend) which is available at sourceforge.net (search for cups-bjnp), so you can now both print and scan with PIXMA MFPs on Linux.

Hi, kind of new to this but appreciate all the help already posted but I having some problems. Running Ubuntu 8.04 trying to get my mp470 working. I think I screwed up on the first time I tried to install. Now when I run ./config at the end it tells me that I already have 1.1.0 install in the /usr/local directory and the current install will be in the /usr directory. the device shows up under lsusb I have libusb installed including -dev. when I run sane-find-scanner it tells me it was installed without USB support which I take it to be a major part of the problem.

How do I:1: Unistall the installation in /usr/local2: See in the ./config output if USB is enabled?

Thanks for this. I'm using Linux Mint, this method worked like a charm. However, I was wondering if 640x877 is the "maximum quality". I can't change the resolution. I know the the scanning element is supposed to handle a resolution of 4800 by 9600. But with Linux that's not possible, or what?

I have a Fedora 9 system and a MP 970. I followed the directions and successfully built sane-backend. "scanimage -V" reports "scanimage (sane-backends) 1.1.0-cvs; backend version 1.1.0"

However, when I "scanimage -T", the system reports that no SANE devices have been found. "sane-find-scanner" reports:

found USB scanner (vendor=0x04a9, product=0x1726) at libusb:001:006 # Your USB scanner was (probably) detected. It may or may not be supported by # SANE. Try scanimage -L and read the backend's manpage.

I uninstalled and reinstalled SANE and SANE-BACKENDS and then rebuilt sane-backends and installed it and now the scanner is recognized, but not by a normal user. I'll try copying the udev file to see if that fixes that problem.

I'm very grateful for your clear explanation (although I read past something last night which resulted in a failure). This morning I did it all over again with a fresh mind and it works like a charm at the first try.

However (I think someone stated this before), the libsane.rules file was not to be found, at least not where you said it should be. This is not a problem for wherever it is (if it exists at all), it works well without copying it.

Do you mind if I translate this into Dutch and post it on the Dutch Ubuntu Forum (http://forum.ubuntu-nl.org)?

The libsane.rules files is needed if hardware detection is performed by udev. In many recent Linux distributions, like Debian or recent Ubuntu versions, hardware detection is performed by HAL instead, and thus does normally not require the udev rules file libsane.rules

Of course you can translate the article in another language and post it for the user community, we are here in an Open Source GPLed context. Simply add a link as reference to this blog, some people like to be able to get the original information.

Hi there. I'm facing an interesting problem here with kubuntu (hardy) and a pixma mx700: scanimage -L works finescanimage -T segfaults in sanei_bjnp_openThe getlogin() function called several times in pixma_bjnp.c returns null. After replacing every occurence of getlogin() with a static string containing my username everything works fine.Does anyone know what might be wrong with my getlogin function?

after I did it everything was great but now I have a little problem! every time I open x-sane it says error in cms no icm profile and I dont know what is this at all!!!!!!!!!!thnx in advance for ur hlpniz

Thanks for the detailed instructions. I am having one problem. I am not able to launch the xsane application from the applications tab. I am running Ubuntu 8.10 64 bit. Everything seems to work, but only when launched from the terminal. Since i have a build in webcam, i have to specify which device to use:

scanimage -d pixma:04a91729_c6a803 -T

The output of that command yields normal results. However, after i launch xsane from the command window i get the message " Failed to create file: Permission Denied"

Everything seems to work fine now, i just get this message when closing xsane which means that i am not able to save my settings. All my users are given scan permissions.

I changed the permissions of two of the files in the directory you specified:

xsane.mdfCANON:CanonPIXMAMX700.drc

to give my user group read and write permissions (i kept root the owner of these two files). After executing the xsane command the first time everything worked fine. However, i closed xsane and execute again and now i am getting a "segmentation fault" error when executing.

scanimage -d pixma:04a91729_c6a803 -T

On the second issue what i meant is that the icon under the Applications->Graphics->Xsane Image Scanner does not work. It brings up the Xsane screen, but after i chose my device and hit OK it just goes away.

Hi there. I'm facing an interesting problem here with kubuntu (hardy) and a pixma mx700: scanimage -L works fine scanimage -T segfaults in sanei_bjnp_open The getlogin() function called several times in pixma_bjnp.c returns null.

Today I checked in a fix for this problem. getlogin() relies on utmp which is apparently not used on Ubuntu. Please note that you will have to re-run the configure command as I had to make some change to the configure.in. It might work without but then the pixma backen will not pick up the correct username

Many thanks for this blog, the detailed instructions were very helpful. The only issue I ran into was the following (resolution included):

Printer: Canon Pixma MX300Linux: Ubuntu Hardy Heron 8.04

After following all your instructions, the scanimage -L command worked correctly, but scanimage -T failed with the error "Access to resource has been denied". Running as root was successful, so clearly this was a user-level permissions issue.

Even after setting user permissions properly and adding myself to both the "scanner" and "saned" groups, the error persisted.

I found the solution on another site: http://scannerserver.online02.com/node/4#comment-11. Pasting the instructions here:

Followed instructions, works on MP620 wireless, Ubuntu 8.10. (BTW got the printer working, too.) I scanned with XSane (don't like that software, though!). Thank you so much! Now I only have the power cable connected, no other cables! Love it!

Thanx Erica for your feedback, happy to know that your MP480 is also supported by the backend, as well as this Howto (written perhaps in an approximative academic English :) helped you go straight through.

Will now update this Howto page with latest list of currently working devices, feel free also to propose any suggestions regarding this Howto, if any area might be clarified or enhanced ;-)

FYI (just posted in the printer thread). The scanner setup was very straightforward, with a minor glitch that I think another user has had. I had to use Lee's suggestion, but also, when I ran scanimage -L, two devices were listed. device `v4l:/dev/video0' is a Noname stk virtual devicedevice `pixma:04A9172F_210372' is a CANON Canon PIXMA MP620 multi-function peripheral

I have an asus G1, which has a built in webcam which for some reason is detected as a usb device. scanimage was always using the first in the list. Once I fixed the udev rules with lee's suggestion, I was able to run scanimage with the -d option and all worked.

In case anybody's having trouble getting sane-backends to work with a Pixma MP620 over the network connection -

When I first started I kept running scanimage -L and getting scanimage: no SANE devices found as a result. I ended up going to /usr/local/etc/sane.d/pixma.conf and adding the printer URI at the end of the file, i.e. bjnp://scanjet:8612

Make failure was due to a latex problem. I installed texlive-extra-utils from debian repository and now make succeeds.scanimage -V shows corect version.But scanimage -L fails.Same problem whether I do udev rules fix or not.I distcleaned and did it all again.configure gives this output

This is Michael. I helped with the MX700 testing and was disappointed that the Sane folks "updated" their back-ends without including your Pixma fixes.

I wanted to say that I've upgraded to Ubunty 8.10 (Intrepid) AMD64 and got my MX700 scanner working without difficulty. The basic steps - download your package from sourceforge, install build-essentials, and run "make". Rename the libsane-pixma.so to libsane-pixma.so.1.0.19 and substitute it for the one in /usr/lib/sane. Then do Lee's changes on /etc/udev/rules.d/40-basic-permissions.rules. Reboot and scan away!

There is also an issue getting the printer part to work, since the Canon MP520 drivers that work for the MX700 are 32-bit. Easy enough - use CUPS+Gutenprint.

Well, not exactly Sane guy's fault, the latest Sane release 1.0.19 has been released before the changes were made for recent pixma devices (like MX700), and there's currently no newer official version.

However, you could try to compile Sane CVS as exposed in this blog, to be sure you MX700 will be supported out of the box on next Sane release, and included then in all Linux distributions.

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

Strange.Compilation failing here means that there's something wrong to create the man pages (.ps or .dvi creation). The rest of the compilation did work correctly.Don't know exactly the reason why, do you have the package "build-essential" installed ?

This requires deeper analysis and probably a Sane Guru advice, could you post your first message to the Sane-devel mailing list, there's been very recent (almost everyday) changes to the compilation files (configure.in, Makefile.in, ...), and I'm afraid this could have some relation with the issue you experience.

I took your advice and modified the permissions (in Ubuntu 8.10 they are in 40-basic-permissions.rules under the same path), I rebooted and now I get the same result from sane-find-scanner both when running it as user or as root:

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

Also, all this is while having it plugged on USB while my plan is to have it working via wireless (I really hate cables) and I don't know what do I need to do to make sane search for the scanner on the network.

First of all, the effort displayed by Nicolas is fantastic; it's altruism like that which encouraged me to switch to Ubuntu.

That said, I was like the MP190 owner above; scanimage -L and xsane did not find my device. I uninstalled xsane, makedist clean, etc., and redid it all. scanimage -V gave the desired result, the find tool identified a scanner, but still, xsane and scanimage -L said no devices were available.

I'd be happy to contribute debugging info if it's useful to anyone, but I got my MP190 working perfectly by installing the debs from this page:http://software.canon-europe.com/products/0010639.asp

and following the CUPS configuration directions here:http://home.swbell.net/berzerke/printing.html

I managed to configure my MP620 printer correctly. Printing is working fine and scanning seems to work only for the lowest resolution (75 with xsane) but when i select 150, i get an error message:Error during read:Error during device I/O.

Thanks a lot, worked like a charm for Canon PIXMA MP260 with the CVS version of today.

For installing on Ubuntu I'd however rather suggest using

sudo checkinstall --fstrans=no

instead of the direct

sudo make install

since it will allow you to easily uninstall the package afterwards. When asked by checkinstall set the name to 'sane-backends' and the version to 'cvs-YYYYDDMM'. The direct install might fail, becaus the self-compiled package wants to overwrite existing files. Use

Upgraded from Ubuntu 8.10 to 9.04 (64 bit) and ran into a little permissions problem with my Pixma MX700 on usb. You still install libsane-pixma.so.1.0.19 into /usr/lib/sane. However, there are no files in /etc/udev/rules.d and adding a new rules file there didn't work. Got this help from the Ubuntu forum. Modify /lib/udev/rules.d/50-udev-default.rules and add the following lines

I report the Canon MX300 working on Debian Etch 4.0 after compiling today's CVS version, and getting the following version string:

scanimage (sane-backends) 1.0.21cvs; backend version 1.0.21

I had libsane and sane-utils packages already installed, and let the build process overwrite their files (because of the --prefix etc configure options). it then worked like a charm. Thanks for the suggestions! :)

Just a little note: it's better to overwrite /etc/udev/libsane.rules instead of the symlink in /etc/udev/rules.d, as you pointed out, because the symlink will continue to work, as we're overwriting the .rules file :).

If you're wondering where the scanner device files reside, do an "lsusb", identify the scanner row, and look over to /dev/bus/usb/[BUSID]/[DEVID]Example:

Hi Norv,Good to know everything is working fine now !The CVS version has changed, because ... a new Sane release has been issued Monday 3 May, sane-backends 1.0.20So probably in a while, you should have this new release integrated into your Linux distribution and installed out of the box, and you will be able to say bye bye to CVS and compilation!GreatsNicolas

Hi,I am using xsane V 0.996 andsane V 1.0.21I installed the pixma backend like explained here (and this is what helped me having scanlite working)When I do "scanimage -t" it works (even in non-root mode)I do not get any error from xsane. It apparently recognizes the pixma scanner but it simply does not scan !I am using Ubuntu 9.04 Jakalope.

[pixma] pixma version 0.15.0[pixma] pixma_collect_devices() found Canon PIXMA MP610 at libusb:001:003[pixma] sanei_bjnp_find_devices:[pixma] Added all configured scanners, now do auto detection...[pixma] lo is not a valid IPv4 interface, skipping...[pixma] eth0 is not a valid IPv4 interface, skipping...[pixma] wmaster0 is not a valid IPv4 interface, skipping...[pixma] wlan0 is not a valid IPv4 interface, skipping...[pixma] pan0 is not a valid IPv4 interface, skipping...

Then it repeats this test several times and...

[pixma] scanner discovery finished...[pixma] pixma_find_scanners() found 1 devices[pixma] pixma_collect_devices() found Canon PIXMA MP610 at libusb:001:003[pixma] sanei_bjnp_find_devices:[pixma] Added all configured scanners, now do auto detection...[pixma] lo is not a valid IPv4 interface, skipping...[pixma] eth0 is not a valid IPv4 interface, skipping...[pixma] wmaster0 is not a valid IPv4 interface, skipping...[pixma] wlan0 is not a valid IPv4 interface, skipping...[pixma] pan0 is not a valid IPv4 interface, skipping...[pixma] lo is not a valid IPv4 interface, skipping...

So either you go in front of your MP610, select the scanner mode with the rotating wheel, and save to PC. Then just need to press the MP610 green button to start the scan, or gray button to cancel (This makes scanning several pages easier).

Or you can de-select the Button controlled scan option in Xsane, simply display the standard options window (menu/Window/Standard options), and de select this option.

Nicola, HI Im Sonia.I try to dowload new xsane 1.20, but when I use git command, aftre count object and compressed them, begin the download and after 3 or 4% system wait and nothing happen. Dou you think the site work?Many tks for your answer, ciao Sonia

Tks, Nicolas. Then, I think depend from my internet provider. I have DSL line. I dont know why this happen. When I try (both method) there aren't error only after count and compress (done 10%), download 3% (one tile 21%) and after stay in wait and no more download.Now I go to www.sane-project.org/ and I download from Austria mirror this file:sane-backends 1.0.20(I hope will be ok) and I try follow the instruction install.Many tks, Nicolas you are very kindly.ciao Sonia

Ciao Nic, Sonia again. As comment before, I have download sane-backends 1.0.20; but I would like to ask you :I 'll install new sane-backends, because I can't use scanner. Better, when I try to use scanner seem that it works; but when it try has to send a pic (on descktop for exemple), I receive an "device I/O error".If I use "sane-find-scanner" I receive : "found USB scanner (vendor=0x04a9 [Canon], product=0x1718 [MP600]) at libusb:001:002",but when I use it I have I/O error. Then I would like to install new release sane-backends. Now the question is: can I install sane-back only or I have to install sane-frontends and sane too?Sorry for long comment,question and bad english.ciao Sonia

Nicolas, I'm so happy !!!I download all with git command.I followed your instructions in the blog!And now ,I'm able to save my pictures with BIG XSANEin from my Pixma MP600 !You are a legendary! Many tks for your qualified help.100 kiss Sonia

Great news then!Happy to learn you succeeded to download and install sane-backends!

Actually, the I/O error you encountered was here because you were using sane-backends 1.0.19, probably coming with your distribution. There was a bug in it that caused this error with MP600 and other Pixma devices too, one of the first bugs I killed after taking over the pixma backend maintenance, first for my own needs (MP610, this blog name).

So either 1.0.20, or latest git development release has this fixed, you can use any of those, I'm very prudent anyway to leave the git development version very stable, and add the changes in there when they are safe and tested.

Downloading 1.0.20 from a mirror is OK, and hopefully on purpose! You can use the same procedure detailed in the blog to install it, like the git dev version.

The sane-backends lib is enough to run any supported Pixma device, the sane-frontends lib contains some basic and sample frontends, but not as powerful as Xsane, which is somehow, a reference in the Linux world for scanning.

So everything went right after big efforts, that's the most important!Thanks a lot for your kind and touching feedback, much appreciated ;-)

Nic Ciao. One question again about Fax with Xsane.I create project, then I find in "faxproject" my image.ps, tel n°, ecc. If I open window terminal and insert Xsane. Xsane load efax and send (now I cant see result, because my efax configuration see ttyS0, while I have modem on ttyS2 then I have error); but if I could use efax front-end, across its set up functions, I would be able to change ttyS0 --> ttyS2 - as I do when use efax frontend alone. Do you know how can I use this efax frontend join with Xsane software? If no possible. Is there a optional command that I can join to Xsane on the terminal for change ttys0 ?Well, when you have time if you answer me , I'll be grateful.Ciao Sonia

Not an expert in Fax configuration, butdid you try to change some options under the fax configuration tab in Xsane ? Choose there the "efax" button, this will place "fax send" in the command line, and you'll probably need to add a parameter for redirecting to /dev/ttyS2, something like -d /dev/ttyS2

BTW, efax seems to use as default, /dev/modem as device, so maybe you can check here if your distribution configured /dev/ttyS0 as default modem and change that.

Not sure you can use efax-gtk, but you can give a try, if you change this in the command line configuration for faxes in Xsane.

and in mandriva libtool: link: cannot find the library `/usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/../../..//libusb.la' or unhandled argument `/usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/../../..//libusb.la'but i think that the second is easier ..how could i give the order make search libusb.la in directory /usr/lib64 or /usr/lib/gcc/x86_64-mambo-linux.......?

with the version 1.20!i have no problem in debian64!but in mandriva although the compilation of sane-backends was done the xsane does not recognize my scanner(i think it work with the previous sane-backends 1.19 version which was in the rpmdrake

Thanks Caruni for your kind feedback, MX700 is indeed supported by latest Sane git version, and also in sane version 1.0.20, which will be used in next Ubuntu release in October (won't be necessary then to recompile the git version for MX700 then).

Hello,I'm trying to get my Pixma MP470 scanner to work under Mandriva 64, but nothing seems to work.sane backends will compile fine, but no matter what I try, they'll always compile without libusb support.I've installed the libusb and libusb-devel libraries, checked the ./configure readout for usb (checking for usb.h, usb.h usability, and usb.h presence) and the three of them were enabled. Despite of this, sane-backends still refuses to compile with any libusb support.I even tried building the libusb libraries from their source code, and many other things with no avail.Any advice about what to do or try would be really appreciated since this problem is really driving me nuts.Thanks in advance.

Hi again,I'd like to tell you all that I've finally sorted out my problem with the sane-backends compiling without libusb support.The solution was as simple as installing the lib64usb packages instead of libusb ones. Now it did compile with libusb support and sane-find-scanner finally detected my scanner and managed to make my first scan.Thank you for the instructions you posted in your blog, by the way.

Trying to get this all to work on OS X (leopard) with a canon MF4150 and it works after a fresh reboot, but afterwards a 'scanimage -T' fails with debug "pixma_connect() failed EINVAL" (and subsequent open fails the same). Ultimately, complains that can't open due to invalid argument.

Hi, I have an MX700 networked to Ubuntu 9.04. Using the CUPS-BJNP package I am now able to print to this printer. Thanks!

I have followed the details for installing sane-backends but 'scanimage -L' and 'scanimage -T' both give me Segmentation fault.'scanimage -V' shows:scanimage (sane-backends) 1.0.21cvs; backend version 1.0.21

I've had problems with the color alignment of my PIXMA MP980 with resolutions of 300dpi and above. Adding the following section to the calc_shifting procedure in the pixma_mp150.c fixed the problem for me:

I just wanted to say thank you very much. I searched EVERYWHERE and spent a few days trying to get my MX310 working...I even came across your post once and dismissed it after an initial scan, thinking I already had this installed by default with Jaunty (I'm new to Linux). After following your instructions and the helpful link it all works, perfectly. Have you considered posting this in the Ubuntu forums, or is there a way to link them; there are a lot of false leads out there and this looks like the ONE post with the right answer. Thanks a million. -James F.

Hi James,Thanks for the report.Actually, latest Ubuntu releases until Jaunty come with Sane 1.0.19 pre-installed, but this Sane release is now very outdated, at least concerning the pixma backend. Sane 1.0.20, which supports many more recent Pixma devices (through the pixma backend) and released in April 2009, will be included in the next Ubuntu release (Koala). Your MX310 should normally work out of the box with this Ubuntu release. And the Sane git development version is still regularly updated, for new or formerly unsupported Pixma models. Nicolas

I can test the Sane Installation with sanimage -V -L and -T. Everything seems to work...

but when I'am doing $ xsane

I'am getting:

"The program 'xsane' is currently not installed. You can install it by typing:sudo apt-get install xsanebash: xsane: command not found"

If I install it, and test it with $ scanimage -L, I'am getting :

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

At first glance, it looks like xsane was not installed on your system.

When you install xsane, does it install also other packages, like the Sane package coming with your distribution ? In this case, you need to install xsane first, then reinstall git Sane as described in the blog. Did you try in this order ?

Hello im new to linux i have an ubuntu 8.10 64 bit and my printer is a new pixma mx330 i can print from it fine but i cannot scan at all. ive tried to do your writup but a couple of things arent working heres what i got.

libusb-dev installed fine

first errorjacob@jacob-desktop:~/sane-backends$ autoconfaclocal.m4:16: warning: this file was generated for autoconf 2.63.You have another version of autoconf. It may work, but is not guaranteed to.If you have problems, you may need to regenerate the build system entirely.To do so, use the procedure documented by the package, typically `autoreconf'.configure.in:15: error: Autoconf version 2.62 or higher is requiredaclocal.m4:590: AM_INIT_AUTOMAKE is expanded from...configure.in:15: the top levelautom4te: /usr/bin/m4 failed with exit status: 63

jacob@jacob-desktop:~/sane-backends$ autoheaderreturns no feedback

ive tried continuing with the rest of the install which didnt work im assuming it might be here at the begining

Hello everyone. Im just a beginner with linux and I had a lot of problems to get things working on the CANON MX700 with UBUNTU 9.04. My Canon is directly connected to the network, so i want to scan and print directly, without using usb or any kind of server.For getting this working you need to follow the instructions on this page.In addition you need to enter: sudo gedit /etc/sane.d/pixma.conf in a terminalIn this configurationfile you can enter the ip address of your scanner, for example bjnp://192.168.1.4You can find the ipadress of your scanner in the menu of your scanner, under lan settings.For getting the printer working i found this website:http://swiss.ubuntuforums.org/showthread.php?t=1273363Goodluck with your canon mx700 network printer and scanner.Jonathan

*** WARNING: SANE is already installed (version 1.0.20). The old*** installation is at /usr/local while SANE will now be installed*** at /usr. It is recommended to uninstall the old SANE version*** before installing the new one to avoid problems.***************************************************************** Please be sure to read file PROBLEMS in this directory ** BEFORE running any of the SANE applications. Some devices ** may be damaged by improper operation, so please do heed this ** advice. *****************************************************************

So no usb support.I am trying to remove the old sane, in case this causes the problem...no prevail.

Printer is OK, usb connection is OK, as I am using Windows in an Xterm window (SUN virtual machine), and Windows operates the printer well.

Amazing. Not only is my scanner working but I have successfully installed my first self-compiled program. I use Ubuntu 9.1 and finished up applying fix of overwriting 40-libsane.rules in the /etc/udev/rules.d directory with the renamed /sane-backends/tools/udev/libsane.rules file to allow non-root users to find the scanner.Thank you so much.

I just followed the instructions to install the packages. It seemed to install and I even tried and ran teh scanner once. However it only worked once and now Ive been trying again and it wont run again. Stragely (as happened before it disconnects my internet when I try and scan) here is the last log in terminal when I tried to re-install and make a test:"mikepanc@mikepanc-laptop:~$ scanimage -Ldevice `pixma:04A91717_927028' is a CANON Canon PIXMA MP510 multi-function peripheralmikepanc@mikepanc-laptop:~$ scanimage -Tscanimage: scanning image of size 640x877 pixels at 24 bits/pixelscanimage: acquiring RGB frame, 8 bits/samplescanimage: reading one scanline, 1920 bytes... FAIL Error: Error during device I/O"Im a beginner at this..please bare with me.. Is there a forum that addresses the Pixma Linux solutions?Thank you for your work!Michael

In order to dig a little bit more into what happens here for your MP510, could you follow the instructions I gave a few messages before yours, in order to record a log trace, then please send me back this log trace to my email address.

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

I bought MF4380dn and scanning works with sane backends from git but I have a small issue that I can't resolve by myself.

Since this MFP is using CPCA protocol for network scanning/printing (not bjnp) I had to connect it via USB. I'm using Ubuntu 8.04 and when I connect the device via USB, usblp module auto recognize two interfaces (printer and fax) on the same device. Both interfaces are then added to cups configuration as two separate printers. The problem that arises is when I try to do some scanning via sane backends (libusb), I got info from usbfs that usblp is holding the device and scanning doesn't work. If I unload the usblp module scanning works just fine, but then I loose ability to print to any USB printer.

Is there some idiot-proof solution to this problem since I can not tell my wife to unload usblp module every time she tries to scann and then load it back if she wants to print again ;)

Basically it doesn't matter. I can disable or even remove both (USB) fax and printer. I can even stop cups... as long as usblp module is loaded it is holding the device it detected in the first place and I can not scan.

With cups > 1.4 this problem is solved as it uses libusb backend to comunicate with USB printers and not usblp kernel module.

But Ubuntu 8.04 is using cups 1.3.7 hence it relies on usblp kernel module to be able to communicate with USB printers.

Cups version itself is of no importance here. As I said I can even stop it from loading.

What I can see is there are 3 distinctive interface on 0x04a9:0x26ec USB device. Scanner is 0, printer is 1 and fax is 2. Scanimage definitely tries to use 0 through libusb but if usblp module is loaded test stops at:

reading one scanline, 1920 bytes...

...and then it fails after 30 or so seconds with:

Error during device I/O

Hmm, it is really weird... maybe it is something wrong with libusb (I installed one from xbmc ppa and is not from stock ubuntu distro).

Will send you the logs with and without loaded usblp and in the meantime I will try to revert to stock libusb and try several different kernels.

It works!! I'm the MP550 guy. After having sent you the log file, Nicolas, I tried several times again and now it works. The strange thing is, that first "scanimage -V" showed:scanimage (sane-backends) 1.0.21cvs; backend version 1.0.20

Now it changed (I changed it...?) to scanimage (sane-backends) 1.0.21cvs; backend version 1.0.21

Consequently, in the "scanimage -T 2" output log file the "pixma" version changed from 0.15 to 0.16.2:[pixma] pixma version 0.16.2.

So everybody trying to get started with the Canon PIXMA MP 550, pay attention to the version numbers.

Hello,I don't know if you're interesting on... I've packaged the git version of 06-01-2010 for Ubuntu (Karmic and Lucid). These packages (libsane* and sane-utils) are available there : https://launchpad.net/~matttbe/+archive/ppa/+packages

It's maybe not recommended to add the repository :) . Simply download and install libsane and sane-utils (from sane-backends source) for your version and your architecture (uname -m).I hope it will be useful !

Hi I have a problem. I installed sane with "new fresh Sane installation procedure". All OK. The I have installedscanimage (sane-backends) 1.0.21cvs; backend version 1.0.21. Now I would like to send email(or fax-y efax) by xsane... but I havnet the funcion.Better,in my xsane I can get files for: JPEG3, TIFF, PNG,PDF, PostScript...etc. but I dont find: email or fax funcions.In the set preferences i put my email addr and smtp, port ect., in fax I put efax ecc.Why I haven't in the program the funfions for use them?Tks Sonia