HPLIP adds HP printer using wrong hostname with mDNS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
New
|
Undecided
|
Unassigned |
Bug Description
hp-setup outputs:
hp-setup[23218]: debug: addPrinter(
And adds the following entry to hplip.conf:
[last_used]
device_
printer_name=
working_dir=.
However this is not a valid hostname on the network:
$ ping HP_ENVY_
ping: unknown host HP_ENVY_
$ ping HP_ENVY_
ping: unknown host HP_ENVY_
$ ping HP_ENVY_5640_series
ping: unknown host HP_ENVY_5640_series
So of course CUPS and HP Systray can't detect or talk to this printer after installation.
What would be valid is the MAC address of the printer:
$ ping HP5065F3EF8CA8.
PING HP5065F3EF8CA8.
64 bytes from HP5065F3EF8CA8.
64 bytes from HP5065F3EF8CA8.
So I think hp-setup should have used this hostname in hplip.conf and in CUPS instead.
$ hp-check -t
Saving output in log file: /tmp/hplip-
HP Linux Imaging and Printing System (ver. 3.15.9)
Dependency/Version Check Utility ver. 15.1
Copyright (c) 2001-15 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to
determine if the proper dependencies are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built
HPLIP supplied tarball has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and
run-time dependencies).
Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION
Status Types:
OK
MISSING - Missing Dependency or Permission or Plug-in
INCOMPAT - Incompatible dependency-version or Plugin-version
---------------
| SYSTEM INFO |
---------------
Kernel: 3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:02:35 UTC 2014 GNU/Linux
Host: lap-x201
Proc: 3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:02:35 UTC 2014 GNU/Linux
Distribution: ubuntu 12.04
Bitness: 64 bit
-------
| HPLIP CONFIGURATION |
-------
HPLIP-Version: HPLIP 3.15.9
HPLIP-Home: /usr/share/hplip
HPLIP-Installation: Auto installation is supported for ubuntu distro 12.04 version
Current contents of '/etc/hp/
# hplip.conf. Generated from hplip.conf.in by configure.
[hplip]
version=3.15.9
[dirs]
home=/usr/
run=/var/run
ppd=/usr/
ppdbase=
doc=/usr/
html=/usr/
icon=/usr/
cupsbackend=
cupsfilter=
drv=/usr/
bin=/usr/bin
# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=no
dbus-build=yes
cups11-build=no
doc-build=no
shadow-build=no
hpijs-install=no
foomatic-
foomatic-
foomatic-
hpcups-install=yes
cups-drv-
cups-ppd-install=no
internal-tag=3.15.9
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-
hpijs-only-build=no
Current contents of '/var/lib/
Plugins are not installed. Could not access file: No such file or directory
Current contents of '~/.hplip/
[last_used]
device_uri = "hp:/net/
printer_name =
working_dir = .
[installation]
date_time = 04/10/15 15:54:29
version = 3.15.9
[settings]
systray_visible = 0
systray_messages = 0
[commands]
scan = /usr/bin/
[refresh]
rate = 30
enable = false
type = 1
[polling]
enable = false
interval = 5
device_list =
[fax]
voice_phone =
email_address =
[upgrade]
notify_upgrade = false
last_upgraded_time = 1443968006
pending_
<Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>
-------
| External Dependencies |
-------
gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.05 OK -
scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.0.22 OK -
xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 0.998 OK -
cups CUPS - Common Unix Printing System REQUIRED 1.1 1.5.3 OK 'CUPS Scheduler is running'
policykit PolicyKit - Administrative policy framework OPTIONAL - 0.105 OK -
network network -wget OPTIONAL - 1.13.4 OK -
avahi-utils avahi-utils OPTIONAL - 0.6.30 OK -
dbus DBus - Message bus system REQUIRED - 1.4.18 OK -
-------
| General Dependencies |
-------
libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.0.1 OK -
python-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.0.0 OK -
reportlab Reportlab - PDF library for Python OPTIONAL 2.0 2.5 OK -
python-notify Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 4.9.1 OK -
python-xml Python XML libraries REQUIRED - 2.0.1 OK -
libusb libusb - USB library REQUIRED - 1.0 OK -
cups-image CUPS image - CUPS image development files REQUIRED - 1.5.3 OK -
libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.4.3 OK -
sane-devel SANE - Scanning library development files REQUIRED - 1.0.22 OK -
pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 1.1.7 OK -
python2X Python 2.2 or greater - Python programming language REQUIRED 2.2 2.7.3 OK -
pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 REQUIRED 4.0 4.9.1 OK -
libjpeg libjpeg - JPEG library REQUIRED - - OK -
libpthread libpthread - POSIX threads library REQUIRED - 2.15 OK -
python-devel Python devel - Python development files REQUIRED 2.2 2.7.3 OK -
cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - 1.5.3 OK -
sane SANE - Scanning library REQUIRED - 1.0.22 OK -
---------------
| COMPILEDEP |
---------------
libtool libtool - Library building support services REQUIRED - 2.4.2 OK -
gcc gcc - GNU Project C and C++ Compiler REQUIRED - 4.6.3 OK -
make make - GNU make utility to maintain groups of programs REQUIRED 3.0 3.81 OK -
-------
| Python Extentions |
-------
cupsext CUPS-Extension REQUIRED - 3.15.9 OK -
hpmudext IO-Extension REQUIRED - 3.15.9 OK -
-------
| Scan Configuration |
-------
scanext Scan-SANE-Extension REQUIRED - 3.15.9 OK -
hpaio HPLIP-SANE-Backend REQUIRED - 3.15.9 OK 'hpaio found in /etc/sane.
-------
| Other Dependencies |
-------
-------
| DISCOVERED SCANNER DEVICES |
-------
device `hpaio:
device `hpaio:
-------
| DISCOVERED USB DEVICES |
-------
No devices found.
-------
| INSTALLED CUPS PRINTER QUEUES |
-------
Afnog-2014-laser
----------------
Type: Unknown
Device URI: socket:
PPD: /etc/cups/
PPD Description: Canon iR1133 PXL
Printer status: printer Afnog-2014-laser is idle. enabled since Sun 25 May 2014 08:49:46 BST
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.
Aptivate-
-------
Type: Unknown
Device URI: socket:
PPD: /etc/cups/
PPD Description: HP LaserJet 2300 Foomatic/Postscript
Printer status: printer Aptivate-
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.
HP_ENVY_5640
------------
Type: Printer
Device URI: hp:/net/
PPD: /etc/cups/
PPD Description: HP Envy 5640 Series, hpcups 3.15.9
Printer status: printer HP_ENVY_5640 is idle. enabled since Sun 04 Oct 2015 15:42:14 BST
error: Unable to communicate with device (code=4): hp:/net/
error: unable to open channel
error: Communication status: Failed
Kyocera-PyCon
-------------
Type: Unknown
Device URI: usb://Kyocera/
PPD: /etc/cups/
PPD Description: Kyocera FS-C5200DN KPDL Foomatic/Postscript
Printer Unplugged or turned off-PyCon disabled since Sun 21 Sep 2014 11:16:04 BST -
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.
Red-Towers-
-------
Type: Printer
Device URI: hp:/net/
PPD: /etc/cups/
PPD Description: HP Officejet 4500 g510n-z, hpcups 3.12.2
Printer status: printer Red-Towers-
error: Unable to communicate with device (code=12): hp:/net/
error: unable to open channel
error: Communication status: Failed
Simply_
-------
Type: Unknown
Device URI: socket:
PPD: /etc/cups/
PPD Description: Brother MFC-J6910DW CUPS
Printer status: printer Simply_
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.
--------------
| PERMISSION |
--------------
-----------
| SUMMARY |
-----------
Missing Required Dependencies
-------
None
Missing Optional Dependencies
-------
None
Total Errors: 2
Total Warnings: 4
Done.
I think the hostname/ZC part is OK, it's actually the model name that's wrong. I get the following error in the system logs when I try to print to the printer, and nothing happens:
Oct 10 13:07:09 lap-x201 hp[27866]: io/hpmud/jd.c 808: In while after select ret=1 maxfd=6 tmo=16 HP_ENVY_ 5640_series? zc=HP5065F3EF8C A8
Oct 10 13:07:09 lap-x201 hp[27866]: io/hpmud/jd.c 197: invalid uri model HP_ENVY_5640_series != ENVY_5640_series
Oct 10 13:07:09 lap-x201 hp[27866]: prnt/backend/hp.c 824: ERROR: open device failed stat=4: hp:/net/
If I maunally edit the printer URL in CUPS to remove the HP_ from the model name, like this:
hp:/net/ ENVY_5640_ series? zc=HP5065F3EF8C A8
Then it prints fine, but unfortunately the HP printer tools will no longer recognise the printer, so I can't check it's status or scan (not that I could before either, but at least it recognised that the printer existed, which it no longer does).