HP networked printer -- hp-setup won't use, hp-probe finds

Gary Aitken ah at dreamchaser.org
Sun Jun 3 00:09:03 UTC 2012

On 06/02/12 02:29, Wojciech Puchar wrote:
> seems you like to incredibly complicated things.

No, but it does seem like I did, hopefully unnecessarily...

> /usr/ports/print/hplip (make config and disable GUI trash) is enough.
> printing works fine with this lpr filter
> #!/bin/sh
> export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin
> /usr/local/bin/gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE \
> -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" \
> -sDeviceModel="deskjet 5600" -dIjsUseOutputFD -dDEVICEWIDTHPOINTS=595 \
> -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2 \
> -sOutputFile=/tmp/$$ - >/dev/null
> cat /tmp/$$
> rm /tmp/$$

I've deinstalled cups and its dependencies and rebuilt only hpijs.
lpr works to the printer for the simple demo text filter hp supplies 
(The printer is directly connected to the network, not via USB or parallel port)
However, when I try to use gs + hpijs as a filter, it fails.

There are a number of gs_xxxxxx and nnnnn files left in /tmp, zero length.
The nnnnn files are the OutputFile from the filter (I commented out the rm).
The nnnnn files are one number larger than the pid for lpd indicated in the log,
no surprise there.

the log shows:
Jun  2 16:58:18 fbsdbox lpd[10367]: lp: lost connection
Jun  2 16:58:18 fbsdbox lpd[10367]: restarting lp
unable to set device=HP Officejet Pro 8500 a909g hpijs, err=16
unable to read client data err=-2
Jun  2 16:38:54 fbsdbox lpd[10367]: lp: lost connection
Jun  2 16:38:54 fbsdbox lpd[10367: lp: job could not be sent to remote host ...
Jun  2 16:38:54 fbsdbox lpd[10367]: mail sent to user garya about job <unknown> on printer lp (FATALERR)

The .ppd.gz file was not located in the path exported from the filter script.
However, when I put /usr/local/share/ppd/HP in the path, it made no difference.
Where are your .ppd files or .ppd.gz files located?

Also, the ppd.gz files from the port *did not* include any ppd.gz file for this printer.  However, the cups port did, but they were installed elsewhere.  So I just copied them over, but I'm wondering if there is a db or internal cache somewhere that has to be rebuilt.

It looks to me like it is unable to locate a .ppd.gz or .ppd which matches the device name "enough" to be used.  Anyone know
  who is generating the error
  what err=16 is exactly
  how to get the path it is searching
  what the match criteria is?


Ok, I tweeked /etc/printcap and the filter to call the printer a "DESKJET 960" and it worked.  So one obviously has to do more than just supply the correct .ppd.gz file in the correct spot.




More information about the freebsd-questions mailing list