SDB:Set up a HP OfficeJet ("all-in-one" device)

Şuraya atla: kullan, ara


Situation

You want to use an HP OfficeJet under Linux.

Procedure

Informationen for SUSE LINUX 9.3

From SUSE LINUX 9.3 on, the package "hplip" is installed by default. HPLIP is the successor of HPOJ (package "hp-officeJet"). If necessary, the package "hp-officeJet" can be used instead of "hplip". For more information see the articles: SDB:Configuring Scanners from SUSE LINUX 9.3

Information for SUSE LINUX 9.0 and Newer Versions

From SUSE LINUX 9.0 on, the package "hp-officeJet" is included in the default installation. This package contains HP's free OfficeJet software, particularly the "PTAL" system, which is required for the proper operation of printer and scanner (see below).

From SUSE LINUX 9.0 on, YaST tries to automatically detect this kind of devices on the USB. If the device is successfully detected, YaST configures the PTAL system automatically.
Unfortunately, not all these devices can be automatically detected.
Two known examples follow:

  • HP LaserJet 1220 (an HP LaserJet 1200 in which the optional scanner unit is mounted at the factory) is only detected via USB as an ordinary USB printer "HP LaserJet 1220" without any belonging USB scanner. If a device is detected as an ordinary USB printer, YaST can only set it up as an ordinary USB printer. In the case of HP LaserJet 1220, you can at least print this way.
  • HP OfficeJet G55 is only detected as an ordinary USB printer, too, and set up by YaST accordingly. However, in this case, not even printing with the normal printer unit is possible.

The crucial problem is to find a reliable way to distinguish between HP all-in-one devices and normal printers. A simple list would not be advisable, since it would be constantly outdated due to changing model names.

Although there is a method, it does not work with the automatic detection:
The method consists of setting up and starting the PTAL system on a trial basis, since it detects its HP all-in-one devices. In order to enable the automatic detection, the PTAL system should search for HP all-in-one devices in all possible ports. However, this might cause serious problems, particularly in the case of parallel ports (see the output of "/usr/sbin/ptal-init setup" below).

A different approach might be to always set up the PTAL system when working with HP printers. However, it is not clear whether all HP printers can be addressed through the PTAL service (although it works in the case of HP DeskJet 990C - see below). In addition, there might be some conflicts if several printers from different manufacturers were connected.

As a matter of principle, we prefer not to start any service that is not required. This means in the case of PTAL that we have to automatically detect HP all-in-one devices without using the PTAL service.

In contrast, a manual configuration presents no problems because you know exactly what devices are attached how.

If an HP all-in-one device has been configured as an ordinary printer and the PTAL system has been subsequently configured by hand, the PTAL services monopolizes the use of the printer devices (e.g. /dev/usb/lp0) and thus, the printer can no longer be addressed by the printing system. Therefore, the printer must be configured in such a way that enables the printing system to use the PTAL device files (pipes and sockets) in /dev/ptal-printd/, /var/run/ptal-printd/, and /var/run/ptal-mlcd/. In the case of CUPS, this means that /etc/cups/printers.conf must include a suitable DeviceURI. The appropriate DeviceURI is displayed by the PTAL backend /usr/lib/cups/backend/ptal - see the following quick overview.

Quick Overview of the PTAL Service Manual Configuration in SUSE LINUX 9.0

This procedure should also work with older SuSE Linux versions.
Nevertheless, always refer to the HP documentation (see below) to be on the safe side. If you are not familiar with the following commands or unsure about how to proceed, refer to the HP documentation and proceed accordingly.
The PTAL service must be started after the USB system and before the print service (cupsd or lpd), since the PTAL service requires the USB device files /dev/usb/lp* and the printing system requires the PTAL device files.

root@host> rccups stop
Shutting down cupsd               done
root@host> /usr/sbin/ptal-init setup
Follow the instructions on the screen, specially:
  Warning: Probing incorrect I/O port addresses could result in system
  instability and/or data loss!  Consult your hardware documentation, BIOS
  setup and/or kernel messages to verify correct base addresses in the
  following prompts.   Also, take care not to probe parallel ports that
  have non-printer devices (such as removable drives) connected.
Thus, use "probe" only on ports with an HP all-in-one device connected.
In other respects, accepting the defaults should always work.
Write the final output down (it will look like this):
  Starting the HP OfficeJet Linux driver.
    mlc:usb:DESKJET_990C
    mlc:usb:HP_LaserJet_1220
root@host> rcptal status
Checking for ptal-mlcd:           done
Checking for ptal-printd:         done
Checking for ptal:             running
root@host> rccups start
Starting cupsd                    done
root@host> lpstat -r
scheduler is running
root@host> /usr/lib/cups/backend/ptal
direct ptal:/mlc:usb:DESKJET_990C ...
direct ptal:/mlc:usb:HP_LaserJet_1220 ...
root@host> lpadmin -p dj990c -v ptal:/mlc:usb:DESKJET_990C -E \            
-P /usr/share/cups/model/HP/DeskJet_990C-hpijs.ppd.gz
root@host> lpadmin -p lj1220 -v ptal:/mlc:usb:HP_LaserJet_1220 -E \          
-P /usr/share/cups/model/HP/LaserJet_1220-hpijs.ppd.gz
user@host> echo "testing dj990c" | lp -d dj990c
user@host> echo "testing lj1220" | lp -d lj1220

If printing a test page is not possible because CUPS cannot address the printer via PTAL (see /var/log/cups/error_log if "LogLevel debug" is set in /etc/cups/cupsd.conf), CUPS disables the queues (see "lpstat -p dj990c" or "lpstat -p lj1220").
Known reasons for this are the following:

  • A "deadlock" in the USB, PTAL, and CUPS services. In this case it is possible to stop and restart the services (including the USB kernel module) or to reboot the computer.
  • An unsuitable root umask. When executing "/usr/sbin/ptal-init setup", the directories /dev/ptal-printd and /var/run/ptal-* are created with root's umask and not as exactly required by the PTAL service. To solve this problem, execute
    chmod a+x /dev/ptal-printd /var/run/ptal-*

Then enable the queues as "root" user with
/usr/bin/enable dj990c or /usr/bin/enable lj1220

Don't forget to activate the PTAL service permanently (e.g. use the YaST Runlevel Editor). Since SUSE LINUX 9.0 this makes sure the PTAL service will be automatically started at the right time (after the USB system and before the print service) when booting the computer.

General Information

Using only the printer together with common DeskJet drivers does not usually cause any problems, always provided that the printer is compatible with a supported DeskJet model. Refer to the support database article "SDB:Purchasing a Printer and Compatibility" for further details.

In the case of older SuSE Linux versions (up to SuSE Linux 8.2), these devices might only work properly if connected to the parallel port and not via USB.
From SuSE Linux 7.3 on, the special package "hp-officeJet" is included, which may be necessary to operate the printer via USB and is needed for this device's additional functions such as scanning.
Install the package "hp-officeJet" with YaST2.
More information about configuration is available under [file:/usr/share/doc/packages/hp-officeJet/index.html "HP OfficeJet Linux driver (hpoj) documentation index"] or in Internet at "HP OfficeJet Linux driver".
The package "hp-officeJet" is already compiled appropriately, so you can ignore the procedure described in the section [file:/usr/share/doc/packages/hp-officeJet/setup-build.html "Compiling and installing the software"].
If USB-related problems occur, you may have to compile a custom kernel as described in [file:/usr/share/doc/packages/hp-officeJet/setup-connect.html "Setting up basic device connectivity"]. Please note that the SuSE installation support does not cover the configuration and compilation of a custom kernel. Therefore, use the parallel port if possible.

SDB:Installing a Printer


<keyword>printer,print,hpofficejet,officejet,all-in-one,ptal,scanner</keyword>