From Fedora Project Wiki

The main page for this proposal is Summer Coding 2010 ideas - Unified ink level reporting.

Status: Idea

Summary of idea: Several printer drivers are capable of reporting the amount of remaining ink or toner in the printer they are driving, but they all do it in different ways. Usually there is a command line program that the user has to know about and run (and interpret the output). For gutenprint there is escputil. For HPLIP there is hp-levels. And so on.

CUPS provides a unified framework for all drivers to report marker levels in the same way, viewed and queried from a single user interface. The same interface can be used for other "special" functions such as cleaning/aligning the print heads, printing a self-test page, etc. We just need the printer drivers to conform to this way of doing things.

Changing both gutenprint and hplip would be sufficient to cover a large number of printer models.

Contacts: Tim Waugh

Mentor(s): Tim Waugh

More information

The main page for Summer Coding 2010 ideas is Category:Summer Coding 2010 ideas.


Unified ink level reporting

There is already a single user interface in which CUPS "commands" can be sent to drivers and their output shown, and this is system-config-printer. While it could do with a little improvement, the main work will be in two of the larger printer drivers available as free software for Linux.

CUPS provides two mechanisms for reporting ink levels: course-grained, in which ink can be reported as "low" or "empty"; and fine-grained, in which the percentage of capacity for each marker is reported.

The way it works is that drivers either detect ink levels as part of their normal operation, or else are told to query the printer for ink levels using a special "CUPS command" print job. Once the ink levels are known, the drivers report them back to CUPS by writing specially-formatted text lines to their "standard error" file descriptor.

The main tasks in this idea are:

  • Adjust the existing escputil command from gutenprint so that it can use separate file descriptors for reading from and writing to the device
  • Convert escputil into a library so that the gutenprint raster driver can use it
  • Adjust the gutenprint raster driver to use it by changing the gutenprint CUPS command filters
  • Understand the various ways HP printers communicate their marker levels using IEEE 1284 Device ID fields (base/status.py)
  • Add low/empty marker detection to the hpcups driver that is part of the HPLIP project
  • Add fine-grained marker level detection to the hpcups driver

References

See bug 238882 for a bug report about this which contains some preliminary code to demonstrate the idea.

The definitions of the relevant IPP attributes are listed on this page:

  • marker-colors
  • marker-change-time
  • marker-levels
  • marker-message
  • marker-names
  • marker-types