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:

      http://git.debian.org/?p=sane/sane-backends.git

      Download the latest (upper, named MASTER) tar.gz snapshot image

      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 Jaunty
    Try Darryl's tweak on Jaunty 9.04 to set up persistent-to-upgrades udev 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.rules
    You'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.rules
      Keep the same name as the original one.
      This should give you the following statements, for instance, on Ubuntu:

      $ cp /etc/udev/rules.d/70-libsane.rules ~/
      $ sudo cp tools/udev/libsane.rules /etc/udev/rules.d/70-libsane.rules

    • Have udev take into account the new rules
      Simply reboot, or unplug/replug your scanner USB cable.

  • Test Sane installation

    Now, check that the new Sane git is correctly installed.

    Current Sane git sane-backends version is 1.0.21, check it:

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

    At that point, you should be able to run some scans with scanimage, and if OK, with Xsane :

    $ scanimage -L
    device `pixma:04A91725_10484D' is a CANON Canon PIXMA MP610 multi-function peripheral

    Next statement will perform a short test of the scanner, you may hear it start scanning and promptly stop.

    $ scanimage –T
    scanimage: scanning image of size 640x877 pixels at 24 bits/pixel
    scanimage: acquiring RGB frame, 8 bits/sample
    scanimage: reading one scanline, 1920 bytes... PASS
    scanimage: reading one byte... PASS
    scanimage: stepped read, 2 bytes... PASS
    scanimage: stepped read, 4 bytes... PASS
    scanimage: stepped read, 8 bytes... PASS
    scanimage: stepped read, 16 bytes... PASS
    scanimage: stepped read, 32 bytes... PASS
    scanimage: stepped read, 64 bytes... PASS
    scanimage: stepped read, 128 bytes... PASS
    scanimage: stepped read, 256 bytes... PASS
    scanimage: stepped read, 512 bytes... PASS
    scanimage: stepped read, 1024 bytes... PASS
    scanimage: stepped read, 2048 bytes... PASS
    scanimage: stepped read, 2047 bytes... PASS
    scanimage: stepped read, 1023 bytes... PASS
    scanimage: stepped read, 511 bytes... PASS
    scanimage: stepped read, 255 bytes... PASS
    scanimage: stepped read, 127 bytes... PASS
    scanimage: stepped read, 63 bytes... PASS
    scanimage: stepped read, 31 bytes... PASS
    scanimage: stepped read, 15 bytes... PASS
    scanimage: stepped read, 7 bytes... PASS
    scanimage: stepped read, 3 bytes... PASS

    And the final result:

    $ xsane
Hope you'll succeed to that point !

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.

Comments are welcome, feel free to report anything missing or incorrect ...

244 comments:

1 – 200 of 244   Newer›   Newest»
William said...

Nicolas thanks you very much

Anonymous said...

Cannot get this to work on Xubuntu (8.0.4) from sane cvs build. lsusb shows device; cat /proc/bus/usb/devices shows device; dmesg strange shows
[ 4751.193908] usb-storage: device scan complete
[ 4751.196914] scsi 4:0:0:0: Direct-Access Canon MP610 series 1040 PQ: 0 ANSI: 2; dll.conf lists pixma; No pixma.conf file in /etc/sane.d (should there be?); scanimage reports no devices.

Regarding your post :quote: Check in the logs coming in the terminal window, at the end of the configure, that it will compile with usb support.:/quote: what does this message look like?

Stuck for other ideas ... any suggestions gratefully received Many thanks. Tom

Proposed by Nicolos said...

Hi,

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.rules
Replace 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.

Nicolas

Pedro said...

Hi there...

Just wanted to thank you for the information!! I tried this with my PIXMA 220 and it worked flawlessly!!

Anonymous said...

Thanks, Nicolas. Here is what I did:
make uninstall
make distclean
followed all the instructions again
Did the all important 45-libsane.rules swap
restarted 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

Anonymous said...

Thanks for your detailed instructions! They worked like a charme and my MP610 is now doing what it is supposed to (print and scan) :)

The only thing that was different at my kubuntu 7.10 was the fact, that my udev rules are not in /etc/udev/rules/ but in /etc/udev/rules.d/

No big deal, since every Linux User should be able to use his brain ;)

Proposed by Nicolos said...

You're right, my mistake!

The udev rules directory is also /etc/udev/rules.d in Ubuntu, as well as in Mandriva.
Will correct this typo immediately.

Nicolas

Adrian Skehill said...

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 a mil,

Adrian.

Proposed by Nicolos said...

Hi Adrian,

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.

Nicolas

Anonymous said...

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.

eini said...

Same here.
Tried current version with a MX310 on a Debian Unstable Machine and got the same errors like described above.

But one more thing. Sane finds the scanner after reboot. Then never again.
I already tried two different versions of kernel 2.6.25 with the same result.
Any clue?

eini said...

Solved!
The backend seems not to work with kernel 2.6.25 (yet).
After installing 2.6.24-1 from Debian everything works just fine.

... i'll keep trying different kernels. Maybe i can find a 2.6.25 sidux that will work.

Proposed by Nicolos said...

Hi,

The point raised for MX300 was due to a HW issue (defective USB port), changing USB port fixed the problem (see SANE mailing list for details).

Concerning your kernel issue, probably a different reason ? ;-)
Maybe this could be due to the SANE USB interface, or libusb, with the new kernel and Deb unstable.

In order to step further on what’s going on, could you :

- Install SANE CVS (if not already done)
- Run the following commands :

$ export SANE_DEBUG_SANEI_USB=255
$ export SANE_DEBUG=255
$ export SANE_DEBUG_PIXMA=20
$ scanimage -T 2> /tmp/logfile

- Send me back the log file /tmp/logfile by mail, I'll have a look at it.

Alex said...

This worked great for me. Thanks so much!

Henk said...

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 scanner
to get it working.

Anonymous said...

This actually worked for me using Hardy Heron 8.04 and a canon MX700!

I had to uninstall sane and xsane first, then reinstall xsane, followed by the sane-backends described in the blog.

After, however, I can only access the MX700 scanner with scanimage -T and xsane as root. How do I change the usb udev permissions in ubuntu to allow any user to access the scanner?

Proposed by Nicolos said...

Looks like Hardy does not use udev anymore to detect (at least) scanners, but uses hal instead.

By uninstalling Sane, I think you lost a useful file installed by the Sane package:
/usr/share/hal/fdi/preprobe/10osvendor/20-libsane.fdi

A libsane.fdi file is prebuilt by Sane CVS, in directory sane-backends/tools/hal
You should try to copy it in place of Ubuntu's one, in directory above.

Copying the udev libsane.rules file seems unnecessary now with Hardy.

Anonymous said...

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?

Anonymous said...

In Ubuntu 8.04 I had to add permission to each user to grant access to the scanner. I did this by going to System > Administration > Users and Groups

I then selected a username and clicked on Properties. I checked the Use Scanners under the User Privileges tab and then I rebooted. XSane started working even though I wasn't running it as root.

Air-One said...

Add your user to the scanner group

Aaron said...

Works perfect for Canon MP210 with Ubuntu Hardy Heron!!!!

Thanks a lot!!!!

Leszek said...

Thank you very much! Now I can use my MP220 scanner under Ubuntu Hardy. Thanks! :)

Anonymous said...

THANK YOU !!!!!!!!!!! Works with MP520!
Jan

Anonymous said...

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.

Thanks a lot, Martin

Proposed by Nicolos said...

Comment for Ubuntu Hardy added.
Thanks.

William said...

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?

Anonymous said...

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

Many thanks Leigh

Central Thai Guy said...

Nicolas, thanks so much. I think I commented on a different post a while back, but I have since moved on to a different distro, and your walk-through here got everything working perfectly.

Anonymous said...

Hmmmm. At first it didn't work for me either. Then I read that the kernel version might make a difference... and it did.

It runs for me on 2.6.24-ubuntu and 2.6.27-rc3, but not in 2.6.26.2 (both vanilla).

I really wonder what could make the difference. sane-find-scanner always finds the scanner, but scanimage -L only sometimes...

D. said...

And if you don't ./configure the package with the prefix he suggests, the backend libraries are not overwritten and it doesn't work either.

I then had the tools in 1.1.0-cvs and the backend in 1.0.19. And the backend is what you really need. I wish there were ready-made ubuntu packages available.

Proposed by Nicolos said...

Hopefully available in Linux distros when Sane 1.1.0 will get released...

Nicolas

Anonymous said...

I followed this blog's procedure for my MX-7600, and failed.

%scanimage -L
device 'pixma: 04A9171C_102AF37 is a CANON Canon PIXMA MX-7600 multi-function peripheral

%scanimage -T
scanimage: scanning image of size 640x877 pixels at 24 buts/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 1920 bytes...
FAIL Error: Operatyion was cancelled

any hint?

Kenji

Kenji

Proposed by Nicolos said...

MX7600 was not yet declared in the Sane pixma backend, that's why scanimage -T fails.

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.

Nicolas

Anonymous said...

I may have failed to comment on this. If it magde succeeded, please forgive my double posts.

Anyway, thank you Nicolas!
Your recent update for MX-7600 got
success for me. I cvsed it today
at about 13:00 JST (Sept. 16).

Thanks again.

Kenji

Anonymous said...

I have been using MX-7600 now upto 600dpi, and works very fine for xsane.

Kenji

Séamas said...

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?

Also, how do I make very, very sure that libusb is installed?

I'm new at Linux, but I will learn.

Proposed by Nicolos said...

Did you go through the 3 steps:

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

$ make

$ sudo make install

Yes, libusb-dev is necessary to compile.

The best is to clean up everything now and rebuild. For that, run:

$ make distclean

before running again the 3 steps above.

Nicolas

Séamas said...

Yes, I did those three steps.

Apparently, I made a mistake when I tried to install the libusb with synaptic before doing those steps, since the ./configure readout told me that SANE would be installed without usb support.

So, I used "apt" to install the libusb, and then went on with steps 2 and 3. Which didn't work.

Anyway, thanks for the command to clean up my mess. I'll try it again.

Séamas said...

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.

Proposed by Nicolos said...

From what I see, the scanimage -v still shows you're running Sane 1.0.19 (coming with Hardy) and not the CVS version which is 1.1.0

Sane 1.0.19 cannot detect MP470.

So probably one of the build steps you're doing is wrong, or something is missing to compile correctly.

In the sane-backends main directory, there should be a file named: config.log
Could you email me this file ?

Nicolas

Séamas said...

I want to publicly thank Nicolas for his help. My scanner is now working thanks to him.

Go raibh míle maith agat, merci beaucoup, thank you very much.

jesper said...

Hi Nicolas,

I tried to follow your guide to get my MX-310 to work, but Im having some trouble.

Scanimage -V and scanimage - L give the correct response, but when I write scanimage -T it says "sane_start: Invalid argument".

Could it have something to do with a missing XX-libsane.rules file? I can't find it in the /etc/udev/rules.d directory.

Proposed by Nicolos said...

Did you get and compiled a recent Sane CVS version ?

Could you send me the console result when running scanimage -T like this:

$ export SANE_DEBUG_PIXMA=11 && scanimage -T

jesper said...

Thanks for your quick response.

Im running Sane 1.10.

This came up after running:

$ export SANE_DEBUG_PIXMA=11 && scanimage -T

[sanei_debug] Setting debug level of pixma to 11.
[pixma] pixma version 0.14.5
[pixma] pixma_collect_devices() found Canon PIXMA MX310 at libusb:005:004
[pixma] pixma_find_scanners() found 1 devices
scanimage: sane_start: Invalid argument

Proposed by Nicolos said...

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.

Nicolas

jesper said...

I tried to redownload CVS using pserver (without uninstalling - is it okay?). Scanimage -L now comes up with:

Segmentation fault

The same happens when I type scanimage -T.

Im not a pro in Linux, so I hope you can help me. I would really like to get the scanner working.

Proposed by Nicolos said...

A recent change in Makefile.in requires that you rerun the complete Sane CVS configure and compilation. First, go to the sane-backends directory and run:

$ make distclean

to erase all binaries and Makefiles.

Then, restart the configure/compilation process as you did formerly, and as explained in this blog.

You should not get the segmentation fault then.

Nicolas

Ian said...

Thanks, the instructions worked perfectly on Ubuntu Hardy.

trent said...

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?

Proposed by Nicolos said...

Only xsane requires to be root user, not scanimage ?

trent said...

Actually, scanimage returns errors whether I run as root or not. I didn't worry too much about it, though, as xsane works just fine as root.

Proposed by Nicolos said...

In order to dig further, could you post the errors scanimage reports ? Is that linked to user permissions ?

pashar said...

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.

trent said...

Ok, here's my output:

$ scanimage -V
scanimage (sane-backends) 1.1.0-cvs; backend version 1.1.0

$ scanimage -L
[pixma] udp_command: no data received (recv): Connection refused[pixma] udp_command: no data received (recv): Connection refused[pixma] udp_command: no data received (recv): Connection refused[pixma] Cannot read scanner make & model: bjnp://192.168.1.100:8612
device `v4l:/dev/video0' is a Noname QCM USB Camera virtual device
device `pixma:04A9172C' is a CANON Canon PIXMA MX850 multi-function peripheral

$ scanimage -T
[pixma] udp_command: no data received (recv): Connection refused[pixma] udp_command: no data received (recv): Connection refused[pixma] udp_command: no data received (recv): Connection refused[pixma] Cannot read scanner make & model: bjnp://192.168.1.100:8612
scanimage: sane_start: Invalid argument


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.

So, using the -d parameter, I get:

$ scanimage -d pixma:04A9172C -T
[pixma] udp_command: no data received (recv): Connection refused[pixma] udp_command: no data received (recv): Connection refused[pixma] udp_command: no data received (recv): Connection refused[pixma] Cannot read scanner make & model: bjnp://192.168.1.100:8612
scanimage: open of device pixma:04A9172C failed: Access to resource has been denied

$ sudo scanimage -d pixma:04A9172C -T
[pixma] udp_command: no data received (recv): Connection refused[pixma] udp_command: no data received (recv): Connection refused[pixma] udp_command: no data received (recv): Connection refused[pixma] Cannot read scanner make & model: bjnp://192.168.1.100:8612
scanimage: open of device pixma:04A9172C failed: Invalid argument

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?

Thanks for your help with this,
Trent

Proposed by Nicolos said...

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 ?

trent said...

No, I didn't set up the libsane rule, as I'm running Hardy Heron and from what I can tell it doesn't use the rules for scanner permissions. Is that correct?

I'll check out the firewall to see if there's any issues there, though I'll still need the device connected via USB since network printing doesn't work yet either.

Proposed by Nicolos said...

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.

Nate said...

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/local
2: See in the ./config output if USB is enabled?

Thanks,
Nate

Proposed by Nicolos said...

To unscrew your mixed installation, first, recreate the default Makefiles with the /usr/local directory, then uninstall it :

$ make distclean
$ ./configure
$ make
$ sudo make uninstall

Now, recreate the environnment with the correct target directory:

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

To check for usb, you should see in the .configure output, the following:

checking usb.h usability... yes
checking usb.h presence... yes
checking for usb.h... yes

So you can run the ./configure statement like that if you want to focus on that:

$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var | grep -i usb

Anonymous said...

Many thanks Nicolos. This worked perfectly for my Hardy system. Cheers!

Knut said...

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?

Anyways, thanks again for this, great guide.

Proposed by Nicolos said...

?

Of course you can get better than 640x877, this is basic 75dpi scan, used only for preview. With some pixma devices like MP610 or MP970, you can get up to 4800dpi.

Which program are you using to scan under Linux Mint ?

Knut said...

Got this to work with Xsine now. Stupid as it probably sounds, I was just looking at the wrong place ...

Thank you!

Harry said...

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.

Any ideas on what else I can do?

Thanks.

Proposed by Nicolos said...

In order to step further on what’s going on, could you run the following commands :

$ export SANE_DEBUG_SANEI_USB=255
$ export SANE_DEBUG=255
$ export SANE_DEBUG_PIXMA=11
$ scanimage -T 2> /tmp/logfile

Send me back the log file /tmp/logfile by mail, I'll have a look at it.somers

Harry said...

Nicolas -
The logfile has been sent to you by separate email.

Harry

Harry said...

Nicolas -

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.

Thanks,

HArry

Anonymous said...

I have a Pixma MP520 and Hardy 64-bit.

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)?

Thanks again,

Luciën

Proposed by Nicolos said...

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.

Anonymous said...

As promised I did a "free translation" based on your explanation. I did not give both solutions (the forum being an Ubuntu forum). Here is the link to your Dutch translation.

http://forum.ubuntu-nl.org/index.php/topic,34959.0.html

Olaf said...

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. 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?

btw: thanks a lot for the excellent information on this page!

Anonymous said...

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

kacike said...

HI,

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.

Thank you

Nicolas says: said...

What de you mean by: "I'm not able to launch xsane by the application tab" ? xsane does not start ? If so, check the command shortcut in system->admin->main menu (should be simply xsane)

Concerning your permission error, xsane config files are stored in ~/.sane/xsane
Check here that the files belong to your user.

Nicolas says: said...

icm profile error: maybe in xsane, you have color management enabled ?
=> uncheck menu preferences->Enable color management

kacike said...

Nicolas, thanks for your reply. I may have just made matters worse.

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

xsane.mdf
CANON: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.

Thanks again

Louis Lagendijk said...

Anonymous Olaf said...

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

Olaf said...

Louis thanks a lot. Works like a charm!

andrewsomething said...

I just got a Canon MP620, following the steps on this blog I was able to get printing working correctly. But I can't get the scanner to work right.

andrew@andrew-laptop:~$ scanimage -L
device `pixma:04A9172F' is a CANON Canon PIXMA MP620 multi-function peripheral
andrew@andrew-laptop:~$ scanimage -T
scanimage: open of device pixma:04A9172F failed: Access to resource has been denied

Same error with xsane. Running as root works. Seemingly it's a permission issue, but my user is part of the scanner group. Any ideas?

This is on Ubuntu 8.10 w/ sane-backend built from CVS on 12/24

andrewsomething said...

I managed to fix my issue. Here's how if any one else is having the same problem.

Turns out the the scanner itself wasn't a member of the scanner group.

Running sane-find-scanner gave me this:

found USB scanner (vendor=0x04a9, product=0x172f) at libusb:003:011

So to put the scanner in the right group, I ran:

cd /dev/bus/usb/003

sudo chgrp scanner 011

Xsane now works with my user...

Anonymous said...

Hi There, i bought a bandnew Pima MP190 and have some trouble making it work in Ubuntu 8.10 Intrepid.

Followed the guide all the way down to install and found me lucky to getthe new Scanner to be found after

scanimage -L
it would show up as Pixima MP190

scanimage would not work

then i tryed to start xsane from console and the device detector showed the pixma as well bud would not start because "scanner could not be accessed" ot something similar.

put my user in the scanner-group. after restart and recompile, reinstall the pixma would not even show up on

scanimage -L

now i am stuck.

I have a Haupauge tv card installd that is recocnized every time i try xsane.

any suggestions ?? ....
btw printing works flawless...

Nicolas said...

Probably means the protocol used by MP190 for scanning is slightly different from the other PIXMA, or uses an older generation protocol.

To step further, we will need to get in contact so that you can send me logfiles and maybe a USB snoop trace under Windows. Please send me an email directly to start direct discussions.

BTW, which printer driver did you use to get it work ?

Lee said...

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 MX300
Linux: 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:

In /etc/udev/rules.d/40-basic-permissions.rules:

change:
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"

to:
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
SUBSYSTEM=="usb_device", MODE="0666"

NOTE that you must reboot Ubuntu after making this change.

Thanks again!

Bernd Buerklin said...

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!

Erica Joy said...

I did this last night in the off chance that my Pixma MP480 might be supported and it is!

Works like a charm and thank you very much for the well written instructions. :)

Nicolas said...

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 ;-)

Anonymous said...

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 device
device `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.

Nicolas said...

Correct.

If a Webcam is present, Sane will see it and scanimage will see thus 2 devices.
In this case, the scanner device is to be explicitely indicated in the scanimage statement, using the -d option.

jimmyswimmy said...

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

Once I did that, the network scanning works like a champ.

Anonymous said...

Hi Nicolas, thanks for this blog.
I am trying to compile on debian unstable and make is failing thus:

epkowa.desc: Warning: Backend `epkowa': 8 USB devices without :usbid
brother.desc: Warning: Backend `brother': 1 USB devices without :usbid
brother2.desc: Warning: Backend `brother2': 9 USB devices without :usbid
make[1]: Leaving directory `/home/norv/sane-backends/tools'
making all in doc
make[1]: Entering directory `/home/norv/sane-backends/doc'
Generating index for sane.ps...
make[1]: *** [sane.ind] Error 1
make[1]: Leaving directory `/home/norv/sane-backends/doc'
make: *** [all-recursive] Error 1
norv@sid5600:~/sane-backends$ dpkg -l libusb-dev

What could I do?
Norv

Anonymous said...

..and yes, I do have libusb-dev installed :)
Norv

Nicolas said...

Norv,

This is a compile issue with some of the other backends in Sane.

Is it possible you post your message in the sane-dev mailing list. You can start a thread at that url

If you want to limit Sane compilation to the pixma backend only, you can rerun the ./configure step, by adding:
BACKENDS=pixma
to the ./configure command line.

Anonymous said...

Thanks Nicolas, I submitted query to sane-dev list.
Also, I get the same error with and without the BACKENDS=pixma entry.
Cheers
Norv

Anonymous said...

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

checking usb.h usability... yes
checking usb.h presence... yes
checking for usb.h... yes
checking be/drivers/USB_scanner.h usability... no
checking be/drivers/USB_scanner.h presence... no
checking for be/drivers/USB_scanner.h... no
checking for usbcalls.h... no
checking for usb_interrupt_read in -lusb... yes

I exported debug stuff as suggested above and got a /tmp/logfile which I send to you by mail,
Thanks again,
Norv

Michael said...

CVS for Canon PIXMA MP610 doesn't work when connected to the internet.

I downloaded SANE-CVS today. Configure, make and make install was without problems.

My results:
scanimage -V:
scanimage (sane-backends) 1.1.0-cvs; backend version 1.1.0

sane-find-scanner:
found USB scanner (vendor=0x04a9 [Canon], product=0x1725 [MP610 series]) at libusb:003:003

sane-find-scanner -v:
checking /dev/usb/scanner... failed to open (Invalid argument)
checking /dev/usb/scanner0... failed to open (Invalid argument)
....
checking /dev/usbscanner... failed to open (Invalid argument)
checking /dev/usbscanner0... failed to open (Invalid argument)

scanimage -L (when offline):
device `pixma:04A91725_490DE9' is a CANON Canon PIXMA MP610 multi-function peripheral

scanimage -L (when online):
[dll] load: searching backend `plustek' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-plustek.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-plustek.so.1'
[dll] init: initializing backend `plustek'
[dll] init: backend `plustek' is version 1.1.0
[dll] load: searching backend `pixma' in `/usr/lib/sane'
[dll] load: trying to load `/usr/lib/sane/libsane-pixma.so.1'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-pixma.so.1'
[dll] init: initializing backend `pixma'
[dll] init: backend `pixma' is version 1.1.15
Speicherzugriffsfehler


Scanning works (as root - have to change rights) when offline.

Being a linux newbie I can't explain the error - online shouldn't be a problem as network scanning is possible...

Thank you for your help

Michael

Anonymous said...

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.

Nicolas said...

Hi Michael,

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.

Anonymous said...

Thanks for the article. I'm really wanting to switch to Ubuntu 8.10, but I own a Canon MX850. Will this fix work for the scanning function on the MX850 as well? Thanks again.

Nicolas said...

MX850 scanner is fully supported by Sane CVS, including ADF and ADF duplex modes, with a USB or network connection. Simply install Sane CVS on your Ubuntu 8.10 and it should be ready to go.

Ben said...

Ubuntu Hardy 64 bit, canon mx300

I can't get "make" to work on the nightly build, it exits error 1, the last few lines are:

Generating sane.ps...
make[1]: *** [sane.ps] Error 1
make[1]: Leaving directory `/home/ben/Desktop/sane-scm-2009-02-06/sane-backends/doc'
make: *** [all-recursive] Error 1

I don't know which of the other billion lines the make prints out you might need to look at or anything else. Thanks!

mihai.dolha said...

Hello! Thanks for providing this tutorials. Using them I was I able to make my Pixma MP620 print over Wireless and now I'm trying to make it able to scan.

I'm using Ubuntu 8.10 and I followed the steps above and I have the following:

(scanner on usb, logged as user)

mihai@mikedell:~$ scanimage -V
scanimage (sane-backends) 1.1.0-cvs; backend version 1.1.0

mihai@mikedell:~$ scanimage -L

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).

mihai@mikedell:~$ sane-find-scanner
....................................
found USB scanner (vendor=0x04a9, product=0x172f) at libusb:005:004
....................................

mihai@mikedell:~$ sudo scanimage -L

No scanners were identified. [...]

mihai@mikedell:~$ sudo sane-find-scanner
[...]
found USB scanner (vendor=0x04a9 [Canon], product=0x172f [MP620 series]) at libusb:005:004
[...]


when the scanner is not connected on usb it doesn't get detected at all.

What am I doing wrong for the usb connection and do I have to do something to make sane search for the scanner over the network as it seems it only checks the local system?

Thank you!

Nicolas said...

To mihai.dolha:

This looks to be a permission issue, so you need to tweak a little bit the udev rules to have the scanner detected b a non root user.

Locate in directory /etc/udev/rules.d, a file that contains some line like:

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"

This is in file:
40-basic-permissions.rules
on Ubuntu 8.04

Change this line (using sudo) to:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
SUBSYSTEM=="usb_device", MODE="0666"

save and reboot, and retry scanner detection.

Nicolas said...

Generating sane.ps...
make[1]: *** [sane.ps] Error 1

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 ?

Ben said...

yes I do have the build-essential package.

Nicolas said...

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.

mihai.dolha said...

Thanks again for your help Nicolas.

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:

$ sane-find-scanner
[...]
found USB scanner (vendor=0x04a9 [Canon], product=0x172f [MP620 series]) at libusb:005:002
[...]


The problem is that i get the same result for scanimage:

$ scanimage -L
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).


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.

eraserhd said...

I have _exactly_ the same problem as mihai. MP620, 20090208 snapshot, Ubuntu 8.10 amd64. scanimage -v reports the cvs version. sane-find-scanner finds the MP620, scanimage -L reports no scanner found.

eraserhd said...

Er, this is USB connection only, since I can't get it to register with my router. (I'm going to need a new wireless router.)

maxthabor said...
This comment has been removed by the author.
Brendan Hemens said...

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 swear that canon page wasn't there a couple of months ago...

Nicolas said...

Thanks Brendan for your kind feedback.

MP190 has already been reported to work fine with Sane CVS, so I guess this is rather an integration issue in Ubuntu.

Generally, problems are due to permissions, which are not set to enable the scanner to be accessed by a standard user.

Look in the above messages, lots of them deal with such issue. Check if MP190 is detected by scanimage under root (sudo scanimage -L)

Cybso said...

Please note that on 2008-02-18 the dependency to Avahi has changed to version 0.6.24 due to a bugfix in this release. Ubuntu still ships with 0.6.23. Avahi is required for the network stack.

Sciamano said...

Great tutorial, thank you very much.
I encountered the same problem as andrewsomething, but thanks to his trick with the /dev/bus/usb I managed to solve.
So thank you guys!

betsubetsu said...

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.

I have to turn off and on again. Scaning at 150 does not work.

betsubetsu said...
This comment has been removed by the author.
c_t said...

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

sudo dpkg -i --force-overwrite sane-backends_cvs-YYYYDDMM-1_i386.deb

to install your self-created package.

Anonymous said...

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

# usb scanner
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
SUBSYSTEM=="usb_device",MODE="0666"

That works!

vjt said...

Hi,

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:

# lsusb
Bus 005 Device 007: ID 04a9:1727 Canon, Inc.

# ls -l /dev/bus/usb/005/007
crw-rw-r-- 1 root scanner 189, 518 2009-05-04 17:11 /dev/bus/usb/005/007

Have a good one!

- vjt ~ http://sindro.me/

Anonymous said...

Hi Nicolas,
After various distro and kernel upgrades my scanner wasn't recognised so I recompiled...

norv@sid5600:~$ scanimage -V
scanimage (sane-backends) 1.0.21cvs; backend version 1.0.21
norv@sid5600:~$ scanimage -L
device `pixma:MP970_192.168.1.101' is a CANON Canon Pixma MP970 multi-function peripheral

And the scanner now appears to work perfectly.
All this under a 23.6.29-1 realtime kernel.
Thanks again for all your help earlier this year!
Norv

Anonymous said...

Woops! That should be a 2.6.29-1 realtime kernel :)
Norv
PS: I got the cvs version today, the numbering appears to have changed, I was expecting 1.1.0...

Nicolas said...

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.20
So 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!
Greats
Nicolas

Anonymous said...

Hi Nicolas
Thanks for your blog.
I have a pixma MP610
Strange thing: it works with Skanlite and not with xsane ...
5I tried reinstalling xsane without any change).

Do you have any clue ?
Thanks

Nicolas said...

Hi,

Xsane normally works fine with the pixma backend.

Which version of Xsane are you using ?
Did you install the pixma backend as describe in this blog ?
Does it work with scanimage ?
What error do you get exactly ?
Which Linux distribution are you running ?

Anonymous said...

Hi,
I am using xsane V 0.996 and
sane V 1.0.21
I 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.

Well well, I guess you know everything... Strange, isn't it ?

Nicolas said...

Can you try to activate a trace log and run xsane from the command line. Open a terminal and enter:

$ export SANE_DEBUG_PIXMA=11
$ xsane

and send back the content of the terminal window

Anonymous said...

Hi Nicolas,

Here it is... Thanks a lot for your help !


[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...

Again, it repeats this test several times and...


[pixma] scanner discovery finished...
[pixma] pixma_open(): Canon PIXMA MP610
[pixma] OUT T=4.305 len=16
[pixma] 00000000:f3 20 00 00 00 00 00 00 00 00 00 00 00 00 00 10
[pixma]
[pixma] IN T=4.305 len=24
[pixma] 00000000:06 06 00 00 00 00 00 00 01 00 00 00 00 03 00 02
[pixma] 00000010:00 00 00 00 00 00 00 fa
[pixma]
[pixma] Current status: paper=0 cal=0 lamp=2 busy=0
[pixma] INTR T=4.476 len=16
[pixma] 00000000:00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00
[pixma]
[pixma] Sending time: '09/05/23 09:01'
[pixma] OUT T=4.477 len=36
[pixma] 00000000:eb 80 00 00 00 00 00 00 00 00 00 00 00 00 00 14
[pixma] 00000010:30 39 2f 30 35 2f 32 33 20 30 39 3a 30 31 00 00
[pixma] 00000020:00 00 00 4b
[pixma]
[pixma] IN T=4.478 len=8
[pixma] 00000000:06 06 00 00 00 00 00 00
[pixma]

^C[pixma] pixma_close(): Canon PIXMA MP610

Nicolas said...

So this looks correct for the backend, when opening Xsane.

Now could you post the logs you get when you click on the preview button ?

Anonymous said...

Hello Nicolas,

When I press the "Preview" Button it just says that (and it does nothing):

[pixma] Reader task id=4239 (forked)
[pixma] Reader task started
[pixma] ==== Button-controlled scan mode is enabled.
[pixma] ==== To proceed, press 'SCAN' or 'COLOR' button. To cancel,
press 'GRAY' button.
[pixma] Setting non-blocking mode


Thank's again for the time you spend to help me

Kind regards

Nicolas said...

Hi,

This is simply because you have Button scan enabled in Xsane.
Just read what it says:

=== Button-controlled scan mode is enabled.
=== To proceed, press 'SCAN' or 'COLOR' button. To cancel, press 'GRAY' button.

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.

Nicolas

Anonymous said...

Okaaaaaaaaaaaayyyyyy !
This is soooooooo stupid !

Now it works.
I could have bumped my head on the wall for a thousand years !

Thanks a lot, Nicolas !
May the Star Force be with You.

darryl said...

An update to a better modification on Ubuntu 9.04 Jaunty to fix permissions.

Just add a new file as /etc/udev/rules.d/40-scanner-permissions.rules with the following contents:

# usb scanner
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE:="0666"
SUBSYSTEM=="usb_device",MODE:="0666"

This fixes permissions and overrides the default rules in /lib/udev/rules.d/ so we persist after an upgrade.

babusce said...

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

Nicolas said...

Hi Sonia,

Well, again, I tried both methods to download the git repository, with git and from web page (snapshot link in front of green "master" sign) and both methods work fine for me.

The git site is a public internet site, so no particular trick here.

So dunno what to do to help, looks pretty weird, no issue with your internet connexion so far ?
Is there any error message if you use the git command ?

Cheers
Nicolas

babusce said...

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

babusce said...

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

Sonia said...

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

Nicolas said...

Hi 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 ;-)

greets Sonia!
Nicolas

Sonia said...

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

Nicolas said...

Hi Sonia,

Not an expert in Fax configuration, but
did 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.

Cheers
Nicolas

Sonia said...

Bien Nic, I'll try so.
Ciao
Sonia

Anonymous said...

i have debian64 and madriva 64.
I couldnt compile sane-backends in these two systems.In debian i got these make errors
/usr/bin/ld: i386 architecture of input file `.libs/abaton.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `.libs/sane_strstatus.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `../sanei/.libs/sanei_init_debug.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `../sanei/.libs/sanei_constrain_value.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `../sanei/.libs/sanei_config.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `../sanei/.libs/sanei_config2.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `../sanei/.libs/sanei_scsi.o' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status
make[1]: *** [libsane-abaton.la] Error 1
make[1]: Leaving directory `/home/anonymous/sane-backends/backend'
make: *** [all-recursive] Error 1

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.......?

Nicolas said...

Could you post this into the sane-dev mailing list, this is very specific to Sane 64 bits compilation, and sorry, have no experience about that.

Anonymous said...

How could i post this into the sane-dev ?there is no make order to search make in another directory the libs?

Anonymous said...

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

Justin said...

Thanks so much for your effort and help with this project. Just scanned my first doc (without having to fire up virtualbox) in a year. What a wonderful feeling! :)

Zed said...

Hello

I get this message:

scanimage: scanning image of size 640x877 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 1920 bytes... FAIL Error: Device busy

Any help?? My printer is a PIXMA MX310

Caruni said...

Hi,

I want to thank you very much. I was trying since about 8 hours. I have tried with the sources from Ubuntu 9.04 and the scanner was not recognized.

I have searched in so many pages, but nothing really good.

Then I decided to try your instructions (GIT) and this solved the situation. My Canon MX700 is working absolut great!!! Absolutely great.

Again thank you very much.

Caruni

Anonymous said...

Hi,

I want to thank you very much. I was trying since about 8 hours. I have tried with the sources from Ubuntu 9.04 and the scanner was not recognized.

I have searched in so many pages, but nothing really good.

Then I decided to try your instructions (GIT) and this solved the situation. My Canon MX700 is working absolut great!!! Absolutely great.

Again thank you very much.

Caruni

Nicolas said...

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).

Carlos said...

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.

Carlos said...

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.

Romko Stets said...

thanks a lot for this howto. you've saved my life %)

BjB said...

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.

Any ideas?

Anonymous said...

Great! Worked with MP540 at usb port without any problem. Thanks for your effort.

Nicolas said...

With MF4150 on MACOS X, please try to get some log traces to see what happens when the error occurs:

$ export SANE_DEBUG_SANEI_USB=255
$ export SANE_DEBUG=255
$ export SANE_DEBUG_PIXMA=11
$ scanimage -T 2> somelogfile

and send back to my email address, the somelogfile you get

msbc said...

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

Anonymous said...

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:

case MP980_PID:
if (s->param->ydpi > 150) {
mp->color_shift = s->param->ydpi / 75;
mp->shift[1] = mp->color_shift * get_cis_ccd_line_size (s);
mp->shift[0] = 0;
mp->shift[2] = 2 * mp->shift[1];
}
break;

Hope this helps

Nicolas said...

Thanks for your feedback, I'll commit those changes for MP980. In fact, I never received for the moment complaints about this Pixma.

Rock Para Difusion Total said...

Thanks for this great tutorial. I am a new Ubuntu user and this helped me get my MX860 to work wireless with my computer.

Anonymous said...

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.

Nicolas said...

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

Maximilian said...

Hi Nicolas,

at first thank you very much!

But I Have a strange Problem:

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 xsane
bash: 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 the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages)."

Please help me!

Excuse my bad English and Greets from Germany

Max

Nicolas said...

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 ?

Anonymous said...

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 error
jacob@jacob-desktop:~/sane-backends$ autoconf
aclocal.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 required
aclocal.m4:590: AM_INIT_AUTOMAKE is expanded from...
configure.in:15: the top level
autom4te: /usr/bin/m4 failed with exit status: 63

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

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

Anonymous said...

I am a beginner and I don,t understand form :
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.

Nicolas said...

The commands given in this post are to be runned in a terminal window.
Open a terminal or console window, and enter them here.

Anonymous said...

Merci Nicolas.

Your post was very helpfull for me, Ubuntu Hardy Heron + Canon PM-520.

Adrian

Anonymous said...

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 terminal
In this configurationfile you can enter the ip address of your scanner, for example bjnp://192.168.1.4
You 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=1273363
Goodluck with your canon mx700 network printer and scanner.
Jonathan

Arun K. Subramaniyan said...

Thanks a lot. Followed your instructions and it worked like a charm on Ubuntu 8.04 Hardy Heron.

mh said...

I've got a Canon MP550 and Ubuntu 9.04...

is there any way to get the scanner installed?

sane-find-scanner has the following output:

found USB scanner (vendor=0x04a9, product=0x173d) at libusb:001:010
found USB scanner (vendor=0x0bda, product=0x8197) at libusb:001:004


many greetings,

matthias

Nicolas said...

You're right, MP550 is not yet declared in the Sane pixma backend.

I'll fix that in the git version ASAP.

kwanza said...

Hi. Trying to make a pixma MP270 to work in Ubuntu (Intrepid), this should be supported now if I read well on the git page.

After downloading the git, cd in sane-backends directory, making sure the libusb-dev is installed, I will issue the following command:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var.

This goes on, and ends like this:


Installation directories:
Configuration: /etc
Libraries: /usr/lib
Binaries: /usr/bin and /usr/sbin
Manpages: /usr/share/man
Documentation: /usr/doc/sane-1.0.21cvs
Lockfiles: Feature is disabled!
-> Network parameters:
Build saned: yes
IPv6 support: yes
Avahi support: no
-> The following backends will be built:
abaton agfafocus appl etc...
-> The following preload backends will be built:

*** 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.

Any advice is kindly appreciated.
cheers
Sid

kwanza said...

Hi, please disregard my previous comment.
I have managed to get the pixma 270 scanner to work. Can not yet print, hopefully will sort ths out as well.
cheers
Sid

kwanza said...

well, no luck with the printer...any suggestions? thanks...

kwanza said...

I have couple of questions:
- is there anyone who set this up for the pixma MP 270?
- is the described procedure for scanner set up only, or printing should be handled from the xsane as well?
cheers

mh said...

@nicolas: Thank you very much. The device is now recognized, sane-find-scanner is identifying the device and also scanimage -L has the correct output.

XSane is also opening, but during prescan the software aborts with the note: I/O-Error.

Nicolas said...

@mh: Which model are you trying to set up ?

mh said...

Sorry... forgot to mention it again...

the pixma mp550 (cp comment above)

Nicolas said...

Ok, then maybe something to dig with this model.

Could you get a logtrace using the following commands :

$ export SANE_DEBUG_SANEI_USB=255
$ export SANE_DEBUG=255
$ export SANE_DEBUG_PIXMA=20
$ scanimage -T 2> /tmp/logfile

Zip and send me back the log file /tmp/logfile by mail, I'll have a look at it.

jmpoure said...

For avahi support:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-avah

Ken said...

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.

Annie Marie said...

I can't thank you enough.
I bought the MP190 on a whim because it was on a super sale; knowing full well it may be a risk with linux but whatever.

I love ubuntu and will go to the ends of the earth and back to get things working on it so as to avoid Windoze....
but it was nice to not have to go quite that far for once :)

Michael said...

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 -L
device `pixma:04A91717_927028' is a CANON Canon PIXMA MP510 multi-function peripheral
mikepanc@mikepanc-laptop:~$ scanimage -T
scanimage: scanning image of size 640x877 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: 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

Nicolas said...

Thanks Anne Marie for your comment, good to know it worked out of the box with Ubuntu ;-)

Nicolas said...

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.

Sagittarius said...

Thank you Nicolas and Happy new year,

Canon Pixma MP490 under Linux works like a charm.

Nicolas said...

Thanks Sagittarius for your feedback about MP490, will update Sane's documentation ASAP with this info.

And happy new year 2010 to everyone on this blog !

Nicolas

matttbe said...

Many thanks for your work !
And happy new year 2010 !!

matttbe said...

I forget to mention : I've tested the latest revision from git and Xsane works like a charm with my Canon Pixma MP550. Thanks a lot!

spectas said...

Happy new year too,

I'm still having problems with the Canon Pixma MP550. I installed the backend git snaphot of january 6. Yet it does not recognize the device.

Some outputs:
sane-config --version:
1.0.21

sane-find-scanner:
found USB scanner (vendor=0x04a9 [Canon], product=0x173d [MP550 series]) at libusb:002:007
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.

scanimage -L:
WARNING: Unhandled message: interface=org.freedesktop.DBus.Introspectable, path=/, member=Introspect

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).

Same result of course with xsane.

Anyone got an idea? Thanks a lot, spectas

BlaY0 said...

Hi Nicolas,

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 ;)

Nicolas said...

BlaYO, is the situation the same if you go in the cups printer configuration screen, and disable the Fax ?

Nicolas said...

Spectas,

Looks like there's something wrong in the configuration.

What is the result of scanimage -V ?

Otherwise, could you go to this message, get a log trace as indicated, and send the log file to my email address ?

BlaY0 said...

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.

Dmesg says:

usb 5-2: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1

...every time I invoke scanimage if usblp is loaded.

Nicolas said...

Strange, I get here the same message as you with cups 1.2.10, but the MP610 is able to print or scan without problems.

Maybe there's something else. Could you get a log trace as explained a few messages before, using scanimage -L, and send me this log trace to my email.

Nicolas

BlaY0 said...

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.

spectas said...

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.

Greetings and thank you,

Spectas

matttbe said...

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 !

Sonia said...

Ciao Nicolas, u are vey important for end user Xsane. Your instructions are clear and easy to understand.
For me u are a blessing.
ciao 100 KISS Soniasloger

Sonia said...

Hi I have a problem. I installed sane with "new fresh Sane installation procedure". All OK. The I have installed
scanimage (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

«Oldest ‹Older   1 – 200 of 244   Newer› Newest»