Technical Documentation: Overview

The HP Linux Imaging and Printing project (HPLIP) provides a single, unified, 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 on open source software and uses GPL compatible licenses.

HPLIP is composed of several major components: applications, driver, backend, daemons, and PPD files. HPLIP is designed to work with the Common UNIX Printing System (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 the HP Inkjet Driver (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, and each HP printer has a unique PPD file. PPD files can be static or dynamically created at runtime. Static PPD files are distributed with the HPLIP tar ball.

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" (HP All in One) sane backend for scanning. Both flatbed and Auto Document Feeder (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, but not "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 one makefile for both HPLIP and HPIJS.

HPLIP is intended to replace HPOJ, the HP OfficeJet Linux driver. They both support USB, parallel and JetDirect connectivity. HPLIP is similar to HPOJ, but different. HPLIP has no persistent daemons like HPOJ. This makes HPLIP more friendly and easy to install. HPLIP does not require a "ptal-init setup" or boot time start/stop script. The "hp" backend will look like any other CUPS backend that can install printers as needed.

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 provide kernel management and a better sharing mechanism for other applications.

All parallel 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 because all USB I/O takes place in Kernel Mode via the USB hardware controller, whereas most parallel I/O takes place in User Mode via software control. USB also provides better process sharing and simultaneous I/O than parallel. If your peripheral supports both USB and 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.

With HPLIP 2.7.6 the old hpiod daemon was replaced with the new HP Multi-Point Transport Driver (hpmud). Hpmud is a shared library that provides direct I/O for each process. Previously, all I/O was serialized through hpiod, a monolithic I/O processor. The new hpmud direct I/O is faster. Hpmud supports parallel, USB and JetDirect connectivity.

With hpmud, HPLIP no longer has Linux specific libusb extensions. This means any UNIX/Linux derivative that supports libusb may work with HPLIP. A public HPLIP "C" API is exposed through hpmud. See hpmud.h for documentation. A Python wrapper for hpmud, called hpmudext, is also available.