Technical Documentation: Overview
The Hewlett-Packard Linux Imaging and Printing project (HPLIP) provides a unified single and multi-function connectivity solution for Linux. The goal of this project is to provide "radically simple" printing, faxing, scanning, photo-card access, and device management to the consumer and small business desktop Linux users. This project is based open source software and uses GPL compatible licenses.
HPLIP is comprised of several major components; applications, driver, backend, daemons, and PPD files. HPLIP is designed to work with the CUPS spooler system. A CUPS/HPLIP system provides bi-di communication which is necessary for full HPLIP support. HPLIP provides a new CUPS backend called "hp" which supports bi-di printing connectivity.
HPLIP uses HPIJS for generating printer-ready-data for non-postscript print jobs. HPIJS has been available since 2001 as a uni-di solution. HPIJS has been modified to support HPLIP, but HPIJS is still backward compatible with existing spoolers. HPIJS is included with the HPLIP solution.
HPLIP supports connectivity over USB, parallel and network (JetDirect). The following figure is an overview of the CUPS/HPLIP system with major components highlighted.
Each print job has an associated PPD file. Print job properties are set with the PPD file. Each HP printer has a unique PPD file and is generated from the foomatic database and distributed with the HPLIP tar ball. The foomatic system is available at http://www.linuxprinting.org.
The "hp" CUPS backend supports printing via USB, parallel, and JetDirect connectivity. The "hp" backend can be used in place of the normal "usb" and "parallel" backends provided by CUPS.
The "hp" backend provides in-bound print job status. Job status is sent to CUPS via stderr "ERROR:" and "INFO:" messages and to the HP Device Manager.
Out-of-bound printer status is available in the HP Device Manager. For example, ink levels for most inkjets can be viewed in the device manager. Also pen alignment can be performed from the device manager.
HPLIP provides a "hpaio" sane backend for scanning. Both flatbed and ADF scanning is supported via xsane/sane applications.
A photo-card application allows the user to download and delete pictures from printers that support photo-cards.
PC fax send is supported, no PC fax receive. PC fax send will look like a CUPS printer spool queue.
A distribution can mix and match the HPLIP package in order to support a bi-di or uni-di solution. HPIJS is part of the HPLIP package, but HPIJS can still be installed separately. The HPLIP package includes two makefiles one for HPLIP and one for HPIJS.
HPLIP is intended to replace HPOJ. They both support USB, parallel and JetDirect connectivity. HPLIP is similar to HPOJ, but different. HPLIP has persistent daemons (hpiod, hpssd) like HPOJ, but is more friendly. HPLIP does not require a "ptal-init setup". The "hp" backend will look like any other CUPS backend that can install printers as needed. The daemons use a standard init.d start/stop script.
HPLIP provides a MLC/1284.4 transport for talking to Multi-Function Peripherals (MFPs), but HPLIP does not dedicate the port to MLC/1284.4 like HPOJ does. HPLIP brings MLC/1284.4 up and down as needed. This means a MFP can use raw I/O for printing and MLC/1284.4 for scanning.
HPOJ performs all parallel I/O directly to the hardware port in User Mode. This is problematic with other Linux/Unix platforms. Many kernels do not allow direct communication to the parallel port from User Mode. HPLIP also performs parallel I/O in User Mode, but HPLIP uses the ppdev/parport kernel modules. Which provides kernel management and a better sharing mechanism for other applications.
All IEEE 1284 functions needed for HPLIP are performed with low-level ppdev ioctl(s). This includes data reads and writes. For MLC/1284.4, hardware ECP Mode is not always available so only software ECP Mode is supported.
In most cases USB I/O will be faster than parallel I/O. The reason for this is all USB I/O takes place in Kernel mode via the USB hardware controller. Where most parallel I/O takes place in User Mode via software control. If your peripheral supports both USB or parallel use USB.
Generally HPOJ and HPLIP cannot co-exist on the same PC. The parport kernel module will conflict with HPOJ. Use "ptal-init setup" to remove HPOJ devices.
With HPLIP 0.9.9 all USB I/O takes place with libusb. Libusb allows USB drivers to be written in user mode instead of kernel mode. Kernel modules "printer" and "usblp" are no longer required. Libusb allows unique low level control that was not available in the kernel modules. Without libusb full I/O support is not available for many HP devices.
In order to support device exceptions (ie: paperout), libusb extensions have been added in order to support I/O retries. Without the extensions recovering from a timeout condition in not possible without losing bytes. Although libusb is platform independent, the current extensions are Linux specific.