HPLIP adds HP printer using wrong hostname with mDNS

Bug #1502636 reported by gcc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

hp-setup outputs:

hp-setup[23218]: debug: addPrinter('HP_ENVY_5640', 'hp:/net/HP_ENVY_5640_series?zc=HP5065F3EF8CA8', 'Alpha Road', '', 'drv:///hp/hpcups.drv/hp-envy_5640_series.ppd', 'HP Envy 5646')

And adds the following entry to hplip.conf:

[last_used]
device_uri="hp:/net/HP_ENVY_5640_series?zc=HP5065F3EF8CA8"
printer_name=
working_dir=.

However this is not a valid hostname on the network:

$ ping HP_ENVY_5640_series.local.
ping: unknown host HP_ENVY_5640_series.local.
$ ping HP_ENVY_5640_series.
ping: unknown host HP_ENVY_5640_series.
$ 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.local.
PING HP5065F3EF8CA8.local. (192.168.0.102) 56(84) bytes of data.
64 bytes from HP5065F3EF8CA8.local (192.168.0.102): icmp_req=1 ttl=255 time=2.70 ms
64 bytes from HP5065F3EF8CA8.local (192.168.0.102): icmp_req=2 ttl=255 time=2.27 ms

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-3.15.9/hp-check.log

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' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.15.9

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.15.9
html=/usr/share/doc/hplip-3.15.9
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp
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-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
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-only-build=no
hpijs-only-build=no

Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[last_used]
device_uri = "hp:/net/HP_ENVY_5640_series?zc=HP5065F3EF8CA8"
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/simple-scan %SANE_URI%

[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_upgrade_time = 0

 <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.d/dll.conf'

-----------------------
| Other Dependencies |
-----------------------

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

device `hpaio:/net/HP_ENVY_5640_series?zc=HP5065F3EF8CA8' is a Hewlett-Packard HP_ENVY_5640_series all-in-one
device `hpaio:/net/Officejet_4500_G510n-z?ip=192.168.1.68' is a Hewlett-Packard Officejet_4500_G510n-z all-in-one

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

Afnog-2014-laser
----------------
Type: Unknown
Device URI: socket://lp00.mtg.afnog.org:9100
PPD: /etc/cups/ppd/Afnog-2014-laser.ppd
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-HP-LaserJet
--------------------
Type: Unknown
Device URI: socket://10.0.156.219:9100
PPD: /etc/cups/ppd/Aptivate-HP-LaserJet.ppd
PPD Description: HP LaserJet 2300 Foomatic/Postscript
Printer status: printer Aptivate-HP-LaserJet is idle. enabled since Fri 09 Jan 2015 15:28:13 GMT
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/HP_ENVY_5640_series?zc=HP5065F3EF8CA8
PPD: /etc/cups/ppd/HP_ENVY_5640.ppd
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/HP_ENVY_5640_series?zc=HP5065F3EF8CA8
error: unable to open channel
error: Communication status: Failed

Kyocera-PyCon
-------------
Type: Unknown
Device URI: usb://Kyocera/FS-C5250DN?serial=Q562425438
PPD: /etc/cups/ppd/Kyocera-PyCon.ppd
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-HP-OfficeJet
-----------------------
Type: Printer
Device URI: hp:/net/Officejet_4500_G510n-z?ip=192.168.1.68
PPD: /etc/cups/ppd/Red-Towers-HP-OfficeJet.ppd
PPD Description: HP Officejet 4500 g510n-z, hpcups 3.12.2
Printer status: printer Red-Towers-HP-OfficeJet is idle. enabled since Wed 21 May 2014 17:55:48 BST
error: Unable to communicate with device (code=12): hp:/net/Officejet_4500_G510n-z?ip=192.168.1.68
error: unable to open channel
error: Communication status: Failed

Simply_Italian_Brother
----------------------
Type: Unknown
Device URI: socket://192.168.6.155:9100
PPD: /etc/cups/ppd/Simply_Italian_Brother.ppd
PPD Description: Brother MFC-J6910DW CUPS
Printer status: printer Simply_Italian_Brother is idle. enabled since Sat 13 Dec 2014 08:00:03 GMT
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.

Revision history for this message
gcc (chris+ubuntu-qwirx) wrote :

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
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/HP_ENVY_5640_series?zc=HP5065F3EF8CA8

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=HP5065F3EF8CA8

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).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.