Canon status monitor for CUPS 1.5

Does anyone here want me to post a fix for the canon status monitor to work with CUPS 1.5?

I didn’t get any responses on my last thread when fixing it for 1.4, so no sense in posting it if nobody needs it.

On 2012-01-30 20:16, VintagePC wrote:
>
> Does anyone here want me to post a fix for the canon status monitor to
> work with CUPS 1.5?
>
> I didn’t get any responses on my last thread when fixing it for 1.4, so
> no sense in posting it if nobody needs it.

Maybe nobody needs it at present, but somebody might in the future.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

First, get the source files for your printer driver.

Check canon europe’s (or wherever else) you got your driver from, and locate the cnijfilter-source-x.xx.tar.gz file, where x.xx is the version number.

Basically, the problem lies in the cngpijmon/src/bjcupsmon_cups.c file. Replace its contents with the contents from this pastebin:

This is a modified version of the file included with v. 3.60, and has been backtested on v. 2.80.

[C] Canon IJ status monitor fix - Pastebin.com](http://pastebin.com/3mUrQ6xn)

Then do the standard configure, make, make install. You’ll probably need to install some gtk dependencies to get a successful build.

There are previous posts by me here that will tell you how to get the ink level readings reported in the first place, you MUST do that before the status monitor will work.

For sure, your post here was very, very helpful for many people !!!.
But maybe they are so happy with the solution that they forget to say simple “thank you”.
I searched through various web-pages, forums etc., looking for solution how to fix
canon_status_monitor in my Debian-sid - without success !!
I’ve found there many misleading information.
And here I found, what I needed.
You did a great job. Than you very, very much !!!

Some additional info for Debian users:
(My printer: IP4500 under Debian-sid , kernel 3.2.0-4, X: xfce4)

  1. install driver packages for debian distro (downloaded from Europe Canon webpage):
    …cnijfilter-common_3.60-1_amd64.deb
    …cnijfilter-ip4900series_3.60-1_amd64.deb

  2. install package: cnijfilter-ip4900-source-3.60xxxxx.deb

  3. you have to compile canon_status_monitor since in above packages (point 1) it is buggy

  4. prior to compilation download the file “bjcupsmon_cups.c” (pointed by author of this thread - VintagePC)
    …to directory: /usr/src/…/cnijfilter-source-3.60-1/cngpijmon/src/… (of course delete the original one first)

  5. install packages: automake-1.10
    …libglib2.0-dev
    …libgtk2.0-dev
    …libcups2-dev
    …libcupsdriver1-dev
    …libcupsfilters-dev
    … .and other cups packages: libcupsxxxx-dev from aptitude LIBDVEL section

  6. run: ./autogen.sh --prefix=/usr --program-suffix=ip4900 --enable-progpath=/usr/bin --datadir=/usr/share

  7. run: make

  8. simply replace file /usr/bin/cngpijmonip4900 with that one created during compilation: “cngpijmon”
    …don’t forget to give a suffix “…ip4900”)

  9. Under X you must run “cngpijmonip4900 IP4500” in terminal window.
    …Status monitor window appears and gives you full graphical info about ink levels, printer status, etc.
    …When you try to run it directly from Xfce4 menu then it says: “unknown printer”
    …(maybe someone could solve also that little problem ?)

It doesn’t work for me — Canon MP560 over wifi. The monitor window comes up, briefly says “Ready” and then stalls on “Collecting Printer Status.”

Oh well…

openSUSE 12.1 x86_64, KDE 4.9.

Correction—it did work. It just took a few minutes for the ink levels to display the first time I ran it. Now they come up quickly.

As far as getting it to work from a menu, I don’t know how Xfce menus work, but to make it work from the KDE menu, I wrote a script:

*#!/bin/bash*

cngpijmonmp560 MP560 &

and then created a menu entry directed toward that script.

Having just done a complete reinstall with openSUSE 12.2, I find that I can no longer get this to work. The status monitor window comes up saying “Unknown printer”. I’m pretty sure I’m duplicating everything I did on 12.1 that made it work. Is it perhaps an incompatibility with CUPS 15.3? The printer and the scanner both work properly.

openSUSE 12.2 x86_64
KDE 4.9.4
Canon MP560 All-in-one

I’ve made a little progress—instead of using the version 3.20 Canon source file (which worked in my previous install) I used the 3.60 version. This detects my printer and reports ink levels however the graphical ink level bars are not shown and I get the following output in the terminal window:

steve@linux-z86n:~> cngpijmonmp560 MP560LAN
                                                                                                                                              
(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

(cngpijmonmp560:17152): Gdk-CRITICAL **: IA__gdk_draw_drawable: assertion `GDK_IS_DRAWABLE (src)' failed

Does this suggest a fix to anyone?

I could only begin to guess here. Assume its related to running this in a KDE environment, but until you get a reply from someone else who has a better handle on this than me, I would check

System Settings>>Application Appearance>>GTK Styles and Fonts, select another style to the current (and switch back to the original if desired), then click ‘Apply’. Hopefully, that will be all there is too it. I’m not sure what else may be at play, unless there is a gdk package missing perhaps…

I thought of this myself and tried all the other styles available but the error persisted. Thanks for the suggestion, though.

Hello,
Totally new to Suse but trying to resolve Canon ink level reporting. Is your fix still current for latest Open Suse

Thanks

Alan