May 4, 2009

New Sane version 1.0.20 released

Today, great news for all Pixma MFP owners and Linux users !


After more than now 14 months, since the last Sane version released (1.0.19), the Sane team is proud to announce the new 1.0.20 version of the Sane library, available since Monday, 3 May 2009.

This new version includes as usual, many backend updates and fixes, and especially all the latest pixma backend stuff for driving Canon Pixma scanners, formerly available only in the CVS tree.

As soon as Linux distros will have incorporated this new Sane release into new distribution releases or updates, you will not need getting and building anymore by your own, the Sane CVS code, as you probably used to do for several months.

I would like to take the opportunity of this event, to congratulate all people, contributors, testers, developers, authors, bloggers, ... who participated into this important and complex project, leading today to a very successful and satisfying result.

Thanks.

Nicolas Martin

February 7, 2009

Canon printer driver and CUPS error

Maybe you experienced this particular error message while trying to install the cnij_usb Canon printer driver for your PIXMA, on recent CUPS version (or recent Linux distributions):

"Error-Client-Not-Possible"

This error message will be raised by CUPS during the printer installation, as the name formerly used by Canon for its CUPS backend: namely cnij_usb, does not conform to the CUPS standard (RFC 3986), as it contains an underscore character "_" in its name.
Older version of CUPS did not reject this, but this is filtered out now in recent CUPS releases, available on recent Linux distributions.

Canon has released a fix for that, and has renamed the backend: cnijusb simply throwing out the underscore character.

This new backend is only available in the 3.00 release of the Canon drivers, in the package:
cnijfilter-common_3.00-1_i386

This package is one of the 2 packages to install for a PIXMA printer.

You can get this package on canon-asia web site, for e.g. the MP638. Simply install it (no need to unistall a previous package, it will override it), it can be used along for instance with the 2.80 driver (for MP610) or 2.70 (for MP600) Canon printer specific package (cnijfilter-mpXYZ_2.80-1_i386).
Choose the .deb or .rpm package according to your distribution.

This is good news anyway: Canon is following the Linux move, and bring the necessary updates to its Linux software accordingly.

January 10, 2009

New MP620 and MP630 printers PPDs


If you're an MP620 or MP630 owner, you've perhaps struggled a bit to set up the printer part under Linux.

Those 2 models support the Canon MP610 printer driver, but the print parameters require a little "tune up":
They can work only if the "paper switch" option is either set to "Cassette" or "Rear Tray". But never set it to "Paper Feed Switch", or it will just print a blank page ...

Unfortunately, this latest option is the default for MP610, so a MP620 or MP630 newly installed printer requires a manual change to this option in the CUPS printer settings menus.

This is a bit annoying, and ... so easy to fix by tweaking again the PPD file ...
So I uploaded along with the MP600/MP610 PPDs, 2 new PPDs for MP620 and MP630 (in English and French), that simply remove the "Switch" option, and select "Cassette" as default paper source.

Installing this MP620-MP630 PPD will let you use now your printer out of the box without tweaking first the paper select option, and prevents from selecting a wrong paper source when printing.

Hope this helps ;-)

October 14, 2008

Canon PIXMA scanners now network ready on Linux !

A major update of the PIXMA backend is now available through Sane CVS.

Door is opened to scanning over a network on Linux, with (presumably) all PIXMA multifunction scanners offering a network connexion.

On Linux, older PIXMA models offering network connexion were only able to print, under the JetDirect protocol, using the well known port 9100.
Scanning over the network without a Windows or Mac box was unfortunately not possible, because involving a Canon proprietary protocol, named BJNP, coming with absolutely no information or documentation, and thus very difficult to approach.

Recent PIXMA models offering network connexion have been "enhanced" by Canon, in the way they now accept ... only the BJNP protocol for printing and scanning!
Bye bye JetDirect, welcome to Canon's world!

The situation then for Linux users? print and scan only with USB, forget about network ...

Until ...

Until Louis Lagendijk, a Linux user like many of us, acquired his new PIXMA MP970, and started to work on demystifying this BJNP Canon protocol, for his own needs, to have his printer work over the network.
Louis first designed a Cups printing driver, that works with all network PIXMA printers running the BJNP protocol. This cups-bjnp driver is available here.

Recently, Louis has also worked on adding BJNP support to the Sane pixma backend ...
The result now: you can scan over a LAN network on Linux with Xsane, and your PIXMA network scanner !

Great job.

With the arrival of Canon's new PIXMA 2008 series, models like MP620, MP980, ... which propose network and Wifi, are very likely (but feedback needed!) to be used on Linux with Sane, Cups, for printing and scanning over network ...

Good news again for Linux Canon users!

April 22, 2008

Give your scanner a new fresh SANE installation ...

Thanks for all the positive feedback received about these guidelines for installing Sane GIT (moved from Sane CVS now stopped), the latest development version of Sane.

Following latest stable 1.0.20 release of sane-backends, which holds all the latest stuff exposed in this blog, the SANE development team has choosen to change of Software Configuration Management tool, and replace the old CVS by the newer GIT, invented by Linus Torvalds, and used among other for the Linux kernel development.

So this little guide needed some update to incorporate now GIT, here it is. As always, the Sane GIT version contains the latest release of the SANE pixma backend.

All recent PIXMA and ImageClass models are supported, see the man pages or sane-project.org doc pages for more information.

  • MP140, MP150, MP160, MP170, MP180, MP190
  • MP210, MP220, MP240
  • MP450, MP460, MP470, MP480
  • MP500, MP510, MP520, MP530, MP540
  • MP600, MP600R, MP610, MP620, MP630, MP710, MP730 (with latest Sane GIT version)
  • MP800, MP800R, MP810, MP830, MP960, MP970, MP980
  • MX300, MX310, MX700, MX850, MX7600
  • MultiPASS MP700, PIXMA MP750 (no grayscale)
  • ImageClass MF4010, MF4018, MF4120, MF4122, MF4140, MF4150, MF4270
All models are now supported through USB or network BJNP (Canon's proprietary) protocol, including 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) 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.
  • Build SANE

    Enter the directory sane-backends created after downloading GIT SANE.

    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!

    • Then, recreate the configure file and the headers files:

      $ autoconf
      $ autoheader


      This will recreate the configure file and all headers.

    • 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.1.0, 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

    $ 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 finally:

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

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

March 18, 2008

New driver update (0.14.4) for office PIXMAs

Canon's recent productivity of new PIXMA models still alive!
Many new all-in-ones machines for various usages have emerged, photo oriented, office business machines ...

And the good parts which interests us: Canon seems to have designed this bunch of products with many common attributes, especially ... their USB communication protocol, which appears to be shared between almost all of these models, more flexible, simpler for driving all-in ones peripherals.

After supporting most Photo PIXMA all-in-ones scanner, based on latest Canon USB protocol, the new libsane-pixma 0.14.4 driver now fully supports also the PIXMA MX700 scanner, from the office all-in-one product line. This particular device integrates an Auto Document Feeder (ADF), which is also fully handled. Presumably also (but yet unconfirmed) PIXMA MX300 and MX310, categorized as office all-in-ones too.

Note that Sane-CVS is up to date with this new backend release, and can be used as well.
Although a bit harder to compile, remember this is always an even better solution, to use latest Sane-CVS, rather than the standalone driver...

February 16, 2008

Pixma driver now updated into Sane-CVS

All latest Pixma add-ons proposed in this blog now part of the Sane project !

Most recent models of PIXMA all-in-one MPs scanners produced by canon, are now supported by the pixma backend in the Sane CVS library, to be released with future versions of the Sane library, and included if future Linux distros.

This will add the following PIXMA all-in ones to the Sane scanner project:
  • MP140,
  • MP210/MP220,
  • MP470,
  • MP520,
  • MP610,
  • MP710,
  • MP740
Sane 1.0.19 release calendar was unfortunately not compatible with adding those updates to that version, as the code was frozen since November 2007, a few months before the official release, that occured in February 2008.

But you can now download the latest Sane CVS, and build it on your Linux distribution, to get latest PIXMA backend release.

See the Sane Project for how to proceed for compiling the Sane CVS.
Will also soon post a procedure to compile and build the Sane backend.

.

February 3, 2008

Canon MP210 and MP520 join the party!

May look out of topic here ?

Good news anyway for Canon Pixma MP210 and MP520 owners...

They will now be able to use their scanners with Sane frontends like Xsane, Kooka, ... as MP610.

Following some exchanges in this blog and the libsane mailing list, the driver updates made for MP610 appeared to be fully compatible with MP520 (message posted in this Blog by Thomas) and MP210 scanners.

The reason?

Simply, those 3 all-in-one use exactly the same USB protocol, at least for their scanner part.
Remember they were released by Canon at the same time ...

Let's congratulate this Canon's initiative, as a step towards device standardization is a major help for the programmers planet, a single driver working for at least 3 different models ... this is eden world!

Note: this latest driver version does not bring anything new to MP610 (uh ... what else could we bring anyway??)

Installation procedure

The procedure to install the pixma updated libsane driver is the same as for MP610, only the model PID needs to be correctly set in the udev rules for permissions:
  • Download latest 0.14.2u version of the libsane-pixma library, (either full package or patch for libsane-pixma 0.13.1 available) and follow the installation instructions given in this previous post.

  • When setting the permissions rules (see the same post) for MP210 or MP520, adjust the corresponding USB PID:
    • MP210 USB address: 04a9:1721
    • MP520 USB address: 04a9:1724

      This would give udev rules like for instance:
      # Canon PIXMA MP210
      SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1721", MODE="664", GROUP="scanner"

      or
      # Canon PIXMA MP520
      SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1724", MODE="664", GROUP="scanner"

  • Remember, to have udev take into account the rules changes, either unplug the USB cable, wait a few seconds, and plug it back, or issue the following command:
    $ sudo udevcontrol reload_rules

  • You're ready to scan! Select in your frontend (Xsane, Kooka, …) a scan resolution proposed, and start scanning:
    • for MP210: available 75, 150, 300, or 600 dpi
    • for MP520: available 75, 150, 300, 600, 1200, or 2400 dpi

Someone else has got another compatible model ? ;-)

January 9, 2008

Borderless printing on Pixma ... now painless ?

So you got this nice Pixma printer that is claimed to do "borderless" printing …

You installed the latest Canon Linux drivers for your MP600/610, run fine ...

And now, you try to print borderless photos from your favorite Desktop application … and you learn in Canon's documentation that borderless printing:
  • Requires a dedicated Canon utility (cifmp600 / cifmp610)
  • run from the command line,
  • with limited image type support (no jpeg!!!)
  • no network gui, just localhost
  • and … only available to the root user!!!
Hey, Whatzat ??

IMHO, a good reason for … reworking a little bit original ppd files, and… turnaround some buggy code.

In fact, Canon’s software already includes borderless printing with cups/ppd files, if the papersize name (in the printer ppd file) ends with “.bl”
Simply create such lines in the ppd file, and you add borderless paper types …

So simple?

Well, add also some driver bug for paper sizes with an X: 4X6, 5X7, … To avoid modifying/recompile any source code, add a small modification to Canon’s driver config file, namely:
/usr/lib/bjlib/cifmp610.conf (or /usr/lib/bjlib/cifmp600.conf for MP600), to add lines with a small x like 4x6, 5x7 in the [papersize] section.

The new packages files to download include those new ppds, along with the modified cifmp610.conf / cifmp600.conf files.

Installation

Download here the latest package for the printer and language (English or French) you want.
The package contains:
  • a new ppd file to install as explained in this previous post
  • a cifmp6x0.conf file to replace Canon’s existing one (keep a backup of Canon’s original just in case):
    • MP610 : copy over /usr/lib/bjlib/cifmp610.conf
    • MP600 : copy over /usr/lib/bjlib/cifmp600.conf
Then, you can start printing borderless images, simply by selecting the new “borderless” paper formats that appear in the paper sizes list, in your application printing dialog.

A simple live test under Gnome’s EOG and Ubuntu Gutsy

Under Gnome, simply double click an image, this trigs “Eye Of Gnome”, Gnome’s standard picture viewer. Note that many other picture viewers (KDE’s, Gnome’s …) will have the same ability, EOG is used here as sample.

EOG supports now Gnome’s standard printing dialog.

Select first the menu "File/Page setup":

Choose in the printers list, the MP610 or MP600, and in the papers list, the new borderless format you want. Choose also the image orientation.

Click apply

Now, in the printing dialog "File/print", look at the “image parameters” tab. In the preview pane, EOG will show your photo as printed on paper, the borders will be 0 if image matches paper format.

Important: choose a combination of paper type and print quality that match. Check Canon's driver user manual (see cifmp610 or cifmp600 "Print Option Combinations" section) for compatible combinations.
If you select an incompatible combination, nothing will be printed, and you won't get any error message ...

Choose also options in the "advanced" tab, and check the quality, halftoning options to match for the paper type selected.

Click print

Et voila!
Your image is printing on paper without borders ;-)

Tips:
  • PPD files have been updated for borderless A4, 4"x6", 5"x7", 4"x8", 8"x10" formats.
    If you need to add other paper formats, simply create new .bl papersizes in the ppd file.
  • Files proposed here are for MP600/MP610 printers, but the same method can be used for many other Canon printers that use the same drivers. Again, modify the same way the ppd and .conf files.
Notes:

  • You might notice that the printed image extends a little bit outside the paper. This is due to the cifmp6x0 utility, that uses a --extend parameter, which defaults to 2. This makes image extend a little bit outside the paper. See Canon’s driver cifmp6x0 documentation (borderless and extend options) for more information.
  • Borderless printing on A4 is not very accurate, as stated in Canon's documentation (the 'Doze documentation). Please take a look at this Canon documentation to get info on borderless printing.

December 14, 2007

4800x4800 dpi ... The eye of the ... Scanner

Puzzled...
Not just because the MP610 can now scan at 4800 dpi under Linux … before any 'Doze driver propose it ...?

But simply consider this MP610 scanner: can we call it a scanner? Or rather an electronic microscope?

Cannot see a detail on a photograph? just scan it with the MP610 at 4800 dpi …
and you get about 50 x zoom magnification!

Just take a look at the rightmost image. Open, it. Guess a new carpet design? Nope, simply a detail of a classic French "Marianne" stamp (here, a full view at 600 dpi), as seen by the Pixma MP610, at 4800 dpi...

Scanning at 4800 dpi is not for everyday’s usage, but this is a nice feature to have for particular tasks.

Now, some simple orders of magnitude...
  • 4800 dpi means a resolution of 2.54 cm/4800 = 5.3 µm
  • this is ~1/1.000 of a millimeter, or 1/1.000.000 of a meter
  • and also simply… ~10000 times the atom size (1 Angström = 1E-10 meters) …

So ... Will future scanners be able to display … the paper sheet atoms?!

Installation
Nothing new, the same procedure as for previous version of this driver applies:

  • simply install the latest sane-backends library (either 1.0.20 or latest git development and follow the installation instructions given in this post.
  • Then, select in your frontend (Xsane, Kooka, …) a scan resolution of 75, 150, 300, 600, 1200, 2400, or 4800 dpi ... and start scanning...

WARNING:

Be very careful when scanning at such high dpi values, because you’ll get TREMENDLY HUGE ENORMOUS amount of data and file sizes!

You could fill up your entire disk space in one scan!

Watch carefully the frontend indications about file sizes, before clicking the scan button!

Note also that in case of very large images (like more than 20000 pixels width or height in Xsane...), a frontend crash might occur, due to the large image size...