hp-setup error: Unable to communicate with device (code=12)

Asked by Jay Gindin

I'm running Kubuntu 17.10 with HPLIP ver. 3.17.11, which I installed using the tarball downloaded from the hplip site.

When I run hp-setup, it detects my printer (Color LaserJet Pro MFP M277dw) connected to my local network. The dialog box shows me the correct IP address for my printer and a device URI of hp:/net/HP_Color_LaserJet_MFP_M277dw?ip=192.168....

After I click the Next button, there is a message box which just says, "Unable to communicate with the device. Please check the device and try again." Since I ran the command from my shell, I can see the following output:

error: Unable to communicate with device (code=12): hpfax:/net/HP_Color_LaserJet_MFP_M277dw?ip=192.168....
error: Unable to communicate with the device. Please check the device and try again.

If I hit 'Retry" I just get the same error again.
If I hit 'Cancel" then I get to the "Setup Device" dialog.

The PPD file is lsb/usr/HP/hp-color_laserjet_pro_mfp_m277-ps.ppd.gz. I have confirmed that I have a file /usr/share/ppd/HP/hp-color_laserjet_pro_mfp_m277-ps.ppd.gz.

Since I don't want or care about faxing, I uncheck that box.

At this point, after I click the Add Printer button, HPLIP cannot communicate with the device. I cannot send a test page, I cannot get any status information, or anything else.

A few more details:
  1. I have configured the printer (through the admin panel) to only use https. When I connect to the printer's web interface in my browser, I am warned about an invalid certificate. I have tried turning this off, but the result is the same.
  2. I have configured a password on the printer's system administration web page. I have also tried with no password, but the result is the same.

The following is output to /var/log/syslog while running the hp-setup:

Jan 14 22:10:42 my-computer kernel: [31773.605726] audit: type=1400 audit(1515996642.799:349): apparmor="DENIED" operation="file_lock" profile="/usr/share/hplip/setup.py" name="/etc/xdg/Trolltech.conf" pid=17196 comm="python" requested_mask="k" denied_mask="k" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.607496] audit: type=1400 audit(1515996642.800:350): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/styles/breeze.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.640216] audit: type=1400 audit(1515996642.833:351): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/imageformats/kimg_dds.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.640260] audit: type=1400 audit(1515996642.833:352): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/imageformats/kimg_eps.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.640312] audit: type=1400 audit(1515996642.833:353): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/imageformats/kimg_exr.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.640371] audit: type=1400 audit(1515996642.833:354): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/imageformats/kimg_pcx.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.640407] audit: type=1400 audit(1515996642.833:355): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/imageformats/kimg_pic.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.640454] audit: type=1400 audit(1515996642.833:356): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/imageformats/kimg_psd.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.640499] audit: type=1400 audit(1515996642.833:357): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/imageformats/kimg_ras.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:10:42 my-computer kernel: [31773.640547] audit: type=1400 audit(1515996642.834:358): apparmor="DENIED" operation="file_mmap" profile="/usr/share/hplip/setup.py" name="/usr/lib/kde4/plugins/imageformats/kimg_rgb.so" pid=17196 comm="python" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0
Jan 14 22:11:18 my-computer python: io/hpmud/jd.c 93: unable to read device-id
Jan 14 22:11:18 my-computer hp-setup: [17196]: error: Unable to communicate with device (code=12): hpfax:/net/HP_Color_LaserJet_MFP_M277dw?ip=192.168....
Jan 14 22:11:18 my-computer hp-setup: hp-setup[17196]: error: Unable to communicate with the device. Please check the device and try again.
Jan 14 22:11:18 my-computer kernel: [31809.065533] kauditd_printk_skb: 4 callbacks suppressed
Jan 14 22:11:18 my-computer kernel: [31809.065536] audit: type=1400 audit(1515996678.258:363): apparmor="DENIED" operation="file_lock" profile="/usr/share/hplip/setup.py" name="/usr/share/icons/breeze-dark/index.theme" pid=17196 comm="python" requested_mask="k" denied_mask="k" fsuid=1000 ouid=0

I have tried running hp-setup with sudo, and get the same result.

I have been able to install the printer as a plain CUPS printer. However, I'd like the extra functionality (such as using the scanner with an app like Simple Scan) that comes with having the hplip utility installed.

I ran hp-check, and the final result is "No errors or warnings."

I'd appreciate any help or pointers which might get me up and running!

Thank you,

jay

Question information

Language:
English Edit question
Status:
Answered
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Jay Gindin (jayg) said :
#2

I'd be happy to provide any additional information if it will help someone help me out...

Thank you,

Jay

Revision history for this message
Nishitha Antony (ni301701) said :
#3

Hi jay,

Can you try removing and plugin the USB cable in different port and try adding the printer?
If you still face the same issue, please attach the hp-check -t log for our analysis.

Thanks,
Nishitha

Revision history for this message
Jay Gindin (jayg) said :
#4

Thank you for taking the time to help me! I really appreciate it!!!

I'm not connecting via USB -- the printer is on my network. As I mentioned above, the setup dialog box shows me the correct IP address for my printer and a device URI of hp:/net/HP_Color_LaserJet_MFP_M277dw?ip=192.168.xx.xxx

Here's the output of hp-check:

hp-check[19499]: info: :
hp-check[19499]: info: :HP Linux Imaging and Printing System (ver. 3.17.11)
hp-check[19499]: info: :Dependency/Version Check Utility ver. 15.1
hp-check[19499]: info: :
hp-check[19499]: info: :Copyright (c) 2001-15 HP Development Company, LP
hp-check[19499]: info: :This software comes with ABSOLUTELY NO WARRANTY.
hp-check[19499]: info: :This is free software, and you are welcome to distribute it
hp-check[19499]: info: :under certain conditions. See COPYING file for more details.
hp-check[19499]: info: :
hp-check[19499]: info: :Note: hp-check can be run in three modes:
hp-check[19499]: info: :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.
hp-check[19499]: info: :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.
hp-check[19499]: info: :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).
hp-check[19499]: info: :
hp-check[19499]: info: :Check types:
hp-check[19499]: info: :a. EXTERNALDEP - External Dependencies
hp-check[19499]: info: :b. GENERALDEP - General Dependencies (required both at compile and run time)
hp-check[19499]: info: :c. COMPILEDEP - Compile time Dependencies
hp-check[19499]: info: :d. [All are run-time checks]
hp-check[19499]: info: :PYEXT SCANCONF QUEUES PERMISSION
hp-check[19499]: info: :
hp-check[19499]: info: :Status Types:
hp-check[19499]: info: : OK
hp-check[19499]: info: : MISSING - Missing Dependency or Permission or Plug-in
hp-check[19499]: info: : INCOMPAT - Incompatible dependency-version or Plugin-version
hp-check[19499]: info: :
hp-check[19499]: info: :
hp-check[19499]: info: :---------------
hp-check[19499]: info: :| SYSTEM INFO |
hp-check[19499]: info: :---------------
hp-check[19499]: info: :
hp-check[19499]: info: : Kernel: 4.13.0-32-generic #35-Ubuntu SMP Thu Jan 25 09:13:46 UTC 2018 GNU/Linux
 Host: dumbledore
 Proc: 4.13.0-32-generic #35-Ubuntu SMP Thu Jan 25 09:13:46 UTC 2018 GNU/Linux
 Distribution: 12 17.10
hp-check[19499]: info: : Bitness: 64 bit

hp-check[19499]: info: :
hp-check[19499]: info: :-----------------------
hp-check[19499]: info: :| HPLIP CONFIGURATION |
hp-check[19499]: info: :-----------------------
hp-check[19499]: info: :
hp-check[19499]: info: :HPLIP-Version: HPLIP 3.17.11
hp-check[19499]: info: :HPLIP-Home: /usr/share/hplip
hp-check[19499]: info: :HPLIP-Installation: Auto installation is supported for ubuntu distro 17.10 version
hp-check[19499]: info: :
hp-check[19499]: info: :Current contents of '/etc/hp/hplip.conf' file:
hp-check[19499]: info: :# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.17.11

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.17.11
html=/usr/share/doc/hplip-3.17.11
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp
bin=/usr/bin
apparmor=/etc/apparmor.d
# 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=yes
dbus-build=yes
cups11-build=no
doc-build=yes
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.17.11
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
qt5=no
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=yes
class-driver=no

hp-check[19499]: info: :
hp-check[19499]: info: :Current contents of '/var/lib/hp/hplip.state' file:
hp-check[19499]: info: :[plugin]
installed = 1
eula = 1
version = 3.17.11

hp-check[19499]: info: :
hp-check[19499]: info: :Current contents of '~/.hplip/hplip.conf' file:
hp-check[19499]: info: :[upgrade]
notify_upgrade = true
last_upgraded_time = 1514958710
pending_upgrade_time = 0
latest_available_version = 3.17.10

[settings]
systray_visible = 0
systray_messages = 0

[last_used]
device_uri = "hp:/net/HP_Color_LaserJet_MFP_M277dw?ip=192.168.23.200"
printer_name =
working_dir = .

[commands]
scan = /usr/bin/xsane -V %SANE_URI%

[refresh]
rate = 30
enable = false
type = 1

[polling]
enable = false
interval = 5
device_list =

[fax]
voice_phone =
email_address =

[installation]
date_time = 02/07/2018 23:06:42
version = 3.17.11

hp-check[19499]: info: : <Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>
hp-check[19499]: info: :
hp-check[19499]: info: :--------------
hp-check[19499]: info: :| COMPILEDEP |
hp-check[19499]: info: :--------------
hp-check[19499]: info: :
hp-check[19499]: info: : gcc gcc - GNU Project C and C++ Compiler REQUIRED - 7.2.0 OK -
hp-check[19499]: info: : make make - GNU make utility to maintain groups of programs REQUIRED 3.0 4.1 OK -
hp-check[19499]: info: : libtool libtool - Library building support services REQUIRED - 2.4.6 OK -
hp-check[19499]: info: :
hp-check[19499]: info: :------------------------
hp-check[19499]: info: :| General Dependencies |
hp-check[19499]: info: :------------------------
hp-check[19499]: info: :
hp-check[19499]: info: : libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.0.2 OK -
hp-check[19499]: info: : python-xml Python XML libraries REQUIRED - 2.2.3 OK -
hp-check[19499]: info: : libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.7.3 OK -
hp-check[19499]: info: : sane-devel SANE - Scanning library development files REQUIRED - - OK -
hp-check[19499]: info: : pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 1.1.7 OK -
hp-check[19499]: info: : pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 REQUIRED 4.0 4.11.4 OK -
hp-check[19499]: info: : libpthread libpthread - POSIX threads library REQUIRED - 2.26 OK -
hp-check[19499]: info: : python-devel Python devel - Python development files REQUIRED 2.2 2.7.14 OK -
hp-check[19499]: info: : cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - 2.2.4 OK -
hp-check[19499]: info: : python-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.4 OK -
hp-check[19499]: info: : cups-ddk CUPS DDK - CUPS driver development kit OPTIONAL - - OK -
hp-check[19499]: info: : reportlab Reportlab - PDF library for Python OPTIONAL 2.0 3.4.0 OK -
hp-check[19499]: info: : pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 4.11.4 OK -
hp-check[19499]: info: : libusb libusb - USB library REQUIRED - 1.0 OK -
hp-check[19499]: info: : cups-image CUPS image - CUPS image development files REQUIRED - 2.2.4 OK -
hp-check[19499]: info: : python2X Python 2.2 or greater - Python programming language REQUIRED 2.2 2.7.14 OK -
hp-check[19499]: info: : python-notify Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
hp-check[19499]: info: : libjpeg libjpeg - JPEG library REQUIRED - - OK -
hp-check[19499]: info: : sane SANE - Scanning library REQUIRED - - OK -
hp-check[19499]: info: :
hp-check[19499]: info: :----------------------
hp-check[19499]: info: :| Scan Configuration |
hp-check[19499]: info: :----------------------
hp-check[19499]: info: :
hp-check[19499]: info: : scanext Scan-SANE-Extension REQUIRED - 3.17.11 OK -
hp-check[19499]: info: : hpaio HPLIP-SANE-Backend REQUIRED - 3.17.11 OK 'hpaio found in /etc/sane.d/dll.conf'
hp-check[19499]: info: :
hp-check[19499]: info: :-------------------------
hp-check[19499]: info: :| External Dependencies |
hp-check[19499]: info: :-------------------------
hp-check[19499]: info: :
hp-check[19499]: info: : gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.21 OK -
hp-check[19499]: info: : scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.0.27 OK -
hp-check[19499]: info: : cups CUPS - Common Unix Printing System REQUIRED 1.1 2.2.4 OK 'CUPS Scheduler is running'
hp-check[19499]: info: : network network -wget OPTIONAL - 1.19.1 OK -
hp-check[19499]: info: : policykit PolicyKit - Administrative policy framework OPTIONAL - 0.105 OK -
hp-check[19499]: info: : xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 0.999 OK -
hp-check[19499]: info: : dbus DBus - Message bus system REQUIRED - 1.10.22 OK -
hp-check[19499]: info: : avahi-utils avahi-utils OPTIONAL - 0.6.32 OK -
hp-check[19499]: info: :
hp-check[19499]: info: :---------------------
hp-check[19499]: info: :| Python Extentions |
hp-check[19499]: info: :---------------------
hp-check[19499]: info: :
hp-check[19499]: info: : hpmudext IO-Extension REQUIRED - 3.17.11 OK -
hp-check[19499]: info: : cupsext CUPS-Extension REQUIRED - 3.17.11 OK -
hp-check[19499]: info: :
hp-check[19499]: info: :------------------------------
hp-check[19499]: info: :| DISCOVERED SCANNER DEVICES |
hp-check[19499]: info: :------------------------------
hp-check[19499]: info: :
hp-check[19499]: info: :No Scanner found.
hp-check[19499]: info: :
hp-check[19499]: info: :--------------------------
hp-check[19499]: info: :| DISCOVERED USB DEVICES |
hp-check[19499]: info: :--------------------------
hp-check[19499]: info: :
hp-check[19499]: info: :No devices found.
hp-check[19499]: info: :
hp-check[19499]: info: :---------------------------------
hp-check[19499]: info: :| INSTALLED CUPS PRINTER QUEUES |
hp-check[19499]: info: :---------------------------------
hp-check[19499]: info: :
hp-check[19499]: info: :
hp-check[19499]: info: :
hp-check[19499]: info: :--------------
hp-check[19499]: info: :| PERMISSION |
hp-check[19499]: info: :--------------
hp-check[19499]: info: :
hp-check[19499]: info: :No errors or warnings.
hp-check[19499]: info: :
hp-check[19499]: info: :Done.

Again, thank you!

jay

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Jay Gindin (jayg) said :
#6

I'm still hoping someone can help...

Revision history for this message
Nishitha Antony (ni301701) said :
#7

Hi Jay,

Can you try the below command to add the printer to USB and update us the results?
1. lsusb
2. hp-setup <bus id:Device id>(eg: hp-setup 002:060)

Let me know if you are still facing the issue

Thanks,
Nishitha

Can you help with this problem?

Provide an answer of your own, or ask Jay Gindin for more information if necessary.

To post a message you must log in.