Unable to install HPLIP Binary Plug-In

Asked by Ramesh on 2020-09-29

Linux distro: Ubuntu
Version: 20.04.1 LTS
Printer model: HP LaserJet Pro MFP M126nw

Output of hp-check -t:

hp-check[16924]: info: :
hp-check[16924]: info: :HP Linux Imaging and Printing System (ver. 3.20.3)
hp-check[16924]: info: :Dependency/Version Check Utility ver. 15.1
hp-check[16924]: info: :
hp-check[16924]: info: :Copyright (c) 2001-18 HP Development Company, LP
hp-check[16924]: info: :This software comes with ABSOLUTELY NO WARRANTY.
hp-check[16924]: info: :This is free software, and you are welcome to distribute it
hp-check[16924]: info: :under certain conditions. See COPYING file for more details.
hp-check[16924]: info: :
hp-check[16924]: info: :Note: hp-check can be run in three modes:
hp-check[16924]: 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
hp-check[16924]: info: :installed to successfully compile HPLIP.
hp-check[16924]: 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
hp-check[16924]: info: :proper dependencies installed to successfully run.
hp-check[16924]: 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[16924]: info: :
hp-check[16924]: info: :Check types:
hp-check[16924]: info: :a. EXTERNALDEP - External Dependencies
hp-check[16924]: info: :b. GENERALDEP - General Dependencies (required both at compile and run time)
hp-check[16924]: info: :c. COMPILEDEP - Compile time Dependencies
hp-check[16924]: info: :d. [All are run-time checks]
hp-check[16924]: info: :PYEXT SCANCONF QUEUES PERMISSION
hp-check[16924]: info: :
hp-check[16924]: info: :Status Types:
hp-check[16924]: info: : OK
hp-check[16924]: info: : MISSING - Missing Dependency or Permission or Plug-in
hp-check[16924]: info: : INCOMPAT - Incompatible dependency-version or Plugin-version
hp-check[16924]: info: :
warning: ubuntu-20.04 version is not supported. Using ubuntu-19.10 versions dependencies to verify and install...
hp-check[16924]: info: :
hp-check[16924]: info: :---------------
hp-check[16924]: info: :| SYSTEM INFO |
hp-check[16924]: info: :---------------
hp-check[16924]: info: :
hp-check[16924]: info: : Kernel: 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 GNU/Linux
 Host: rls-Default-string
 Proc: 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 GNU/Linux
 Distribution: ubuntu 20.04
hp-check[16924]: info: : Bitness: 64 bit

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

[hplip]
version=3.20.3

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip
html=/usr/share/doc/hplip-doc
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv
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=yes
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.20.3
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no

hp-check[16924]: info: :
hp-check[16924]: info: :Current contents of '/var/lib/hp/hplip.state' file:
hp-check[16924]: info: :Plugins are not installed. Could not access file: No such file or directory
hp-check[16924]: info: :
hp-check[16924]: info: :Current contents of '~/.hplip/hplip.conf' file:
hp-check[16924]: info: :[installation]
date_time = 09/29/20 17:40:58
version = 3.20.3

[last_used]
device_uri = hp:/net/HP_LaserJet_Pro_MFP_M126nw?ip=192.168.0.107

hp-check[16924]: info: : <Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>
hp-check[16924]: info: :
hp-check[16924]: info: :-------------------------
hp-check[16924]: info: :| External Dependencies |
hp-check[16924]: info: :-------------------------
hp-check[16924]: info: :
hp-check[16924]: info: : error: cups CUPS - Common Unix Printing System REQUIRED 1.1 - INCOMPAT 'CUPS may not be installed or not running'
hp-check[16924]: info: : gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.50 OK -
hp-check[16924]: info: : xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 0.999 OK -
hp-check[16924]: info: : scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.0.29 OK -
hp-check[16924]: info: : dbus DBus - Message bus system REQUIRED - 1.12.16 OK -
hp-check[16924]: info: : policykit PolicyKit - Administrative policy framework OPTIONAL - 0.105 OK -
hp-check[16924]: info: : network network -wget OPTIONAL - 1.20.3 OK -
hp-check[16924]: info: : avahi-utils avahi-utils OPTIONAL - 0.7 OK -
hp-check[16924]: info: :
hp-check[16924]: info: :------------------------
hp-check[16924]: info: :| General Dependencies |
hp-check[16924]: info: :------------------------
hp-check[16924]: info: :
hp-check[16924]: info: : libjpeg libjpeg - JPEG library REQUIRED - - OK -
hp-check[16924]: info: : cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - - OK -
hp-check[16924]: info: : cups-image CUPS image - CUPS image development files REQUIRED - - OK -
hp-check[16924]: info: : libpthread libpthread - POSIX threads library REQUIRED - b'2.31' OK -
hp-check[16924]: info: : libusb libusb - USB library REQUIRED - 1.0 OK -
hp-check[16924]: info: : sane SANE - Scanning library REQUIRED - - OK -
hp-check[16924]: info: : sane-devel SANE - Scanning library development files REQUIRED - - OK -
hp-check[16924]: info: : libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.8 OK -
hp-check[16924]: info: : libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.1.1 OK -
hp-check[16924]: info: : python3X Python 2.2 or greater - Python programming language REQUIRED 2.2 3.8.2 OK -
hp-check[16924]: info: : python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
hp-check[16924]: info: : error: python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 OPTIONAL 4.0 - MISSING 'python3-pyqt4-dbus needs to be installed'
hp-check[16924]: info: : error: python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 - MISSING 'python3-pyqt4 needs to be installed'
hp-check[16924]: info: : python3-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.16 OK -
hp-check[16924]: info: : python3-xml Python XML libraries REQUIRED - 2.2.9 OK -
hp-check[16924]: info: : python3-devel Python devel - Python development files REQUIRED 2.2 3.8.2 OK -
hp-check[16924]: info: : python3-pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 7.0.0 OK -
hp-check[16924]: info: : python3-reportlab Reportlab - PDF library for Python OPTIONAL 2.0 3.5.34 OK -
hp-check[16924]: info: :
hp-check[16924]: info: :--------------
hp-check[16924]: info: :| COMPILEDEP |
hp-check[16924]: info: :--------------
hp-check[16924]: info: :
hp-check[16924]: info: : libtool libtool - Library building support services REQUIRED - 2.4.6 OK -
hp-check[16924]: info: : gcc gcc - GNU Project C and C++ Compiler REQUIRED - 9.3.0 OK -
hp-check[16924]: info: : make make - GNU make utility to maintain groups of programs REQUIRED 3.0 4.2.1 OK -
hp-check[16924]: info: :
hp-check[16924]: info: :---------------------
hp-check[16924]: info: :| Python Extentions |
hp-check[16924]: info: :---------------------
hp-check[16924]: info: :
hp-check[16924]: info: : cupsext CUPS-Extension REQUIRED - 3.20.3 OK -
hp-check[16924]: info: : hpmudext IO-Extension REQUIRED - 3.20.3 OK -
hp-check[16924]: info: :
hp-check[16924]: info: :----------------------
hp-check[16924]: info: :| Scan Configuration |
hp-check[16924]: info: :----------------------
hp-check[16924]: info: :
hp-check[16924]: info: : hpaio HPLIP-SANE-Backend REQUIRED - 3.20.3 OK 'hpaio found in /etc/sane.d/dll.conf'
hp-check[16924]: info: : scanext Scan-SANE-Extension REQUIRED - 3.20.3 OK -
hp-check[16924]: info: :
hp-check[16924]: info: :------------------------------
hp-check[16924]: info: :| DISCOVERED SCANNER DEVICES |
hp-check[16924]: info: :------------------------------
hp-check[16924]: info: :
hp-check[16924]: info: :device `hpaio:/net/HP_LaserJet_Pro_MFP_M126nw?ip=192.168.0.107' is a Hewlett-Packard HP_LaserJet_Pro_MFP_M126nw all-in-one

hp-check[16924]: info: :
hp-check[16924]: info: :--------------------------
hp-check[16924]: info: :| DISCOVERED USB DEVICES |
hp-check[16924]: info: :--------------------------
hp-check[16924]: info: :
hp-check[16924]: info: :No devices found.
hp-check[16924]: info: :
hp-check[16924]: info: :---------------------------------
hp-check[16924]: info: :| INSTALLED CUPS PRINTER QUEUES |
hp-check[16924]: info: :---------------------------------
hp-check[16924]: info: :
hp-check[16924]: info: :
hp-check[16924]: info: :HP-LaserJet-Pro-MFP-M126nw
hp-check[16924]: info: :--------------------------
hp-check[16924]: info: :Type: Printer
hp-check[16924]: info: :Device URI: hp:/usb/HP_LaserJet_Pro_MFP_M126nw?serial=CNB6H779GT
hp-check[16924]: info: :PPD: /etc/cups/ppd/HP-LaserJet-Pro-MFP-M126nw.ppd
warning: Failed to read /etc/cups/ppd/HP-LaserJet-Pro-MFP-M126nw.ppd ppd file
hp-check[16924]: info: :PPD Description:
hp-check[16924]: info: :Printer status: printer HP-LaserJet-Pro-MFP-M126nw is idle. enabled since Wednesday 08 July 2020 06:46:01 PM
error: Device not found
error: Communication status: Failed
hp-check[16924]: info: :
hp-check[16924]: info: :HP_LaserJet_Pro_MFP_M126nw
hp-check[16924]: info: :--------------------------
hp-check[16924]: info: :Type: Printer
hp-check[16924]: info: :Device URI: hp:/net/HP_LaserJet_Pro_MFP_M126nw?ip=192.168.0.107
hp-check[16924]: info: :PPD: /etc/cups/ppd/HP_LaserJet_Pro_MFP_M126nw.ppd
warning: Failed to read /etc/cups/ppd/HP_LaserJet_Pro_MFP_M126nw.ppd ppd file
hp-check[16924]: info: :PPD Description:
hp-check[16924]: info: :Printer status: printer HP_LaserJet_Pro_MFP_M126nw is idle. enabled since Wednesday 08 July 2020 05:33:50 PM
hp-check[16924]: info: :Communication status: Good
hp-check[16924]: info: :
hp-check[16924]: info: :
hp-check[16924]: info: :--------------
hp-check[16924]: info: :| PERMISSION |
hp-check[16924]: info: :--------------
hp-check[16924]: info: :
hp-check[16924]: info: :
hp-check[16924]: info: :-----------
hp-check[16924]: info: :| SUMMARY |
hp-check[16924]: info: :-----------
hp-check[16924]: info: :
hp-check[16924]: info: :Missing Required Dependencies
hp-check[16924]: info: :-----------------------------
error: 'libcups2' package is missing/incompatible
error: 'python3-pyqt4' package is missing/incompatible
error: 'gtk2-engines-pixbuf' package is missing/incompatible
hp-check[16924]: info: :
hp-check[16924]: info: :Missing Optional Dependencies
hp-check[16924]: info: :-----------------------------
error: 'python3-dbus.mainloop.qt' package is missing/incompatible
hp-check[16924]: info: :
hp-check[16924]: info: :Total Errors: 4
hp-check[16924]: info: :Total Warnings: 0
hp-check[16924]: info: :
hp-check[16924]: info: :
hp-check[16924]: info: :Done.

Even after setting up my printer using the pre-installed HPLIP (using the command hp-setup), I couldn't scan (but I could print). Then it was mentioned that driver plug-in installation is required. When I try to install the driver plug-in, it simply doesn't install.

Then I used the terminal and typed the command hp-plugin. The output was:

HP Linux Imaging and Printing System (ver. 3.20.3)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-18 HP 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.

HP Linux Imaging and Printing System (ver. 3.20.3)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-18 HP 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.

Checking for network connection...
Downloading plug-in from:
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/plugindialog.py", line 248, in NextButton_clicked
    status, download_plugin_file, error_str = self.pluginObj.download(self.plugin_path,self.plugin_download_callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 254, in download
    core = core_install.CoreInstall()
  File "/usr/share/hplip/installer/core_install.py", line 239, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/usr/share/hplip/base/password.py", line 88, in __init__
    self.__readAuthType() # self.__authType
  File "/usr/share/hplip/base/password.py", line 110, in __readAuthType
    distro_name = get_distro_name().lower()
  File "/usr/share/hplip/base/password.py", line 78, in get_distro_name
    return distro.linux_distribution(full_distribution_name=False)[0]
  File "/usr/lib/python3/dist-packages/distro.py", line 122, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/usr/lib/python3/dist-packages/distro.py", line 677, in linux_distribution
    self.version(),
  File "/usr/lib/python3/dist-packages/distro.py", line 737, in version
    self.lsb_release_attr('release'),
  File "/usr/lib/python3/dist-packages/distro.py", line 899, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/usr/lib/python3/dist-packages/distro.py", line 552, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/usr/lib/python3/dist-packages/distro.py", line 1012, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
PermissionError: [Errno 13] Permission denied: '/var/crash/_usr_share_hplip_plugin.py.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/plugindialog.py", line 248, in NextButton_clicked
    status, download_plugin_file, error_str = self.pluginObj.download(self.plugin_path,self.plugin_download_callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 254, in download
    core = core_install.CoreInstall()
  File "/usr/share/hplip/installer/core_install.py", line 239, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/usr/share/hplip/base/password.py", line 88, in __init__
    self.__readAuthType() # self.__authType
  File "/usr/share/hplip/base/password.py", line 110, in __readAuthType
    distro_name = get_distro_name().lower()
  File "/usr/share/hplip/base/password.py", line 78, in get_distro_name
    return distro.linux_distribution(full_distribution_name=False)[0]
  File "/usr/lib/python3/dist-packages/distro.py", line 122, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/usr/lib/python3/dist-packages/distro.py", line 677, in linux_distribution
    self.version(),
  File "/usr/lib/python3/dist-packages/distro.py", line 737, in version
    self.lsb_release_attr('release'),
  File "/usr/lib/python3/dist-packages/distro.py", line 899, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/usr/lib/python3/dist-packages/distro.py", line 552, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/usr/lib/python3/dist-packages/distro.py", line 1012, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.

So what exactly is the issue and how can I fix it?

I'm willing to provide any extra details. Also do read my post on Ask Ubuntu to have a better idea of my situation: https://askubuntu.com/q/1257349/1103140

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Ramesh
Solved:
2020-10-11
Last query:
2020-10-11
Last reply:
2020-10-10

This question was reopened

brian_p (claremont102) said : #1

> So what exactly is the issue and how can I fix it?

No idea! My approach to a solution does not involve using HPLIP
or Python.

Get the device on the network with a wireless connection and give
what you get for

  avahi-browse -rt _ipp._tcp
  avahi-browse -rt _uscan._tcp

--
Brian.

Ramesh (ramesh99) said : #2

There was no output.

Refer this image: https://i.stack.imgur.com/iT00l.png

brian_p (claremont102) said : #3

> There was no output.

The LaserJet Pro MFP M126nw is an AirPrint printer and Bonjour is
generally enabled on it by default. Check and try

  avahi-browse -art

Ramesh (ramesh99) said : #4

Output of avahi-browse -art:

+ enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] _http-alt._tcp local
+ enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] _http-alt._tcp local
+ enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] Internet Printer local
+ enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] Internet Printer local
+ enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] _scanner._tcp local
+ enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] _scanner._tcp local
+ enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] UNIX Printer local
+ enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] UNIX Printer local
+ enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] Web Site local
+ enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] Web Site local
+ enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] PDL Printer local
+ enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] PDL Printer local
= enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] PDL Printer local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [9100]
   txt = ["note=" "Duplex=F" "binary=T" "transparent=T" "usb_MDL=HP LaserJet Pro MFP M126nw" "usb_MFG=Hewlett-Packard" "adminurl=http://DEV4F70B4.local./SSI/Auth/airprint.htm" "priority=30" "product=(HP LaserJet Pro MFP M126nw)" "ty=HP LaserJet Pro MFP M126nw" "pdl=application/vnd.zeno-zjs" "qtotal=1" "txtvers=1"]
= enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] Web Site local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [80]
   txt = ["txtvers=1"]
= enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] UNIX Printer local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [515]
   txt = ["note=" "binary=T" "transparent=T" "usb_MDL=HP LaserJet Pro MFP M126nw" "usb_MFG=Hewlett-Packard" "adminurl=http://DEV4F70B4.local./SSI/Auth/airprint.htm" "priority=50" "product=(HP LaserJet Pro MFP M126nw)" "ty=HP LaserJet Pro MFP M126nw" "pdl=application/vnd.zeno-zjs" "rp=auto" "qtotal=1" "txtvers=1"]
= enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] _scanner._tcp local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [8289]
   txt = ["note=" "flatbed=T" "feeder=T" "button=T" "mdl=HP LaserJet Pro MFP M126nw" "mfg=Hewlett-Packard" "adminurl=http://DEV4F70B4.local./SSI/Auth/airprint.htm" "ty=HP LaserJet Pro MFP M126nw" "txtvers=1"]
= enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] Internet Printer local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [631]
   txt = ["note=" "Staple=F" "Sort=F" "Fax=F" "Scan=T" "Punch=0" "PaperCustom=F" "Duplex=F" "Copies=F" "Color=F" "Collate=F" "Bind=F" "Binary=T" "Transparent=T" "UUID=8afb247f-3032-bb47-01b6-d66e7632c3a6" "adminurl=http://DEV4F70B4.local./SSI/Auth/airprint.htm" "mac=58:20:b1:4f:70:b4" "priority=40" "usb_CMD=ZJ/URF" "usb_MDL=HP LaserJet Pro MFP M126nw" "usb_MFG=Hewlett-Packard" "product=(HP LaserJet Pro MFP M126nw)" "ty=HP LaserJet Pro MFP M126nw" "URF=CP1,IS1,OB10,PQ3-4-5,RS600,W8,V1.2,MT1-2-3-4-5-6" "rp=ipp/print" "pdl=image/urf,image/jpeg,application/PCLm" "qtotal=1" "txtvers=1"]
= enp1s0 IPv6 HP LaserJet Pro MFP M126nw[4F70B4] _http-alt._tcp local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [8080]
   txt = []
= enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] PDL Printer local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [9100]
   txt = ["note=" "Duplex=F" "binary=T" "transparent=T" "usb_MDL=HP LaserJet Pro MFP M126nw" "usb_MFG=Hewlett-Packard" "adminurl=http://DEV4F70B4.local./SSI/Auth/airprint.htm" "priority=30" "product=(HP LaserJet Pro MFP M126nw)" "ty=HP LaserJet Pro MFP M126nw" "pdl=application/vnd.zeno-zjs" "qtotal=1" "txtvers=1"]
= enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] Web Site local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [80]
   txt = ["txtvers=1"]
= enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] UNIX Printer local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [515]
   txt = ["note=" "binary=T" "transparent=T" "usb_MDL=HP LaserJet Pro MFP M126nw" "usb_MFG=Hewlett-Packard" "adminurl=http://DEV4F70B4.local./SSI/Auth/airprint.htm" "priority=50" "product=(HP LaserJet Pro MFP M126nw)" "ty=HP LaserJet Pro MFP M126nw" "pdl=application/vnd.zeno-zjs" "rp=auto" "qtotal=1" "txtvers=1"]
= enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] _scanner._tcp local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [8289]
   txt = ["note=" "flatbed=T" "feeder=T" "button=T" "mdl=HP LaserJet Pro MFP M126nw" "mfg=Hewlett-Packard" "adminurl=http://DEV4F70B4.local./SSI/Auth/airprint.htm" "ty=HP LaserJet Pro MFP M126nw" "txtvers=1"]
= enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] Internet Printer local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [631]
   txt = ["note=" "Staple=F" "Sort=F" "Fax=F" "Scan=T" "Punch=0" "PaperCustom=F" "Duplex=F" "Copies=F" "Color=F" "Collate=F" "Bind=F" "Binary=T" "Transparent=T" "UUID=8afb247f-3032-bb47-01b6-d66e7632c3a6" "adminurl=http://DEV4F70B4.local./SSI/Auth/airprint.htm" "mac=58:20:b1:4f:70:b4" "priority=40" "usb_CMD=ZJ/URF" "usb_MDL=HP LaserJet Pro MFP M126nw" "usb_MFG=Hewlett-Packard" "product=(HP LaserJet Pro MFP M126nw)" "ty=HP LaserJet Pro MFP M126nw" "URF=CP1,IS1,OB10,PQ3-4-5,RS600,W8,V1.2,MT1-2-3-4-5-6" "rp=ipp/print" "pdl=image/urf,image/jpeg,application/PCLm" "qtotal=1" "txtvers=1"]
= enp1s0 IPv4 HP LaserJet Pro MFP M126nw[4F70B4] _http-alt._tcp local
   hostname = [DEV4F70B4.local]
   address = [192.168.0.107]
   port = [8080]
   txt = []

brian_p (claremont102) said : #5

> Output of avahi-browse -art:

Thanks. I'll do printing first and move on to scanning after testing printing.

Set up a print queue:

 lpadmin -p m126 -v ipp://DEV4F70B4.local/ipp/print -E -m everywhere

Test with

  lp -d m126 /etc/nsswitch.conf

Ramesh (ramesh99) said : #6
brian_p (claremont102) said : #7

> Photo of printed page:

Good. Printing looks good. You may of course test with other applications such as
Firefox.

For scanning you need to download and install sane-airscan from

  https://github.com/alexpevzner/sane-airscan

The file you want is at

  https://download.opensuse.org/repositories/home:/pzz/xUbuntu_20.04/amd64/

Give the outputs of

  scanimage -L
  airscan-discover

Ramesh (ramesh99) said : #8

I tried printing from Firefox and it printed normally.

I installed sane-airscan by adding repository and installing manually.

Output of scanimage -L:

device `hpaio:/net/HP_LaserJet_Pro_MFP_M126nw?ip=192.168.0.107' is a Hewlett-Packard HP_LaserJet_Pro_MFP_M126nw all-in-one
device `airscan:w1:HP HP LaserJet Pro MFP M126nw' is a WSD HP HP LaserJet Pro MFP M126nw WSD network scanner

Output of airscan-discover:

[devices]
  HP HP LaserJet Pro MFP M126nw = http://192.168.0.107:3911/scanner, WSD
  HP HP LaserJet Pro MFP M126nw = http://[fe80::42b8:9aff:fe35:e5ed%252]:3911/scanner, WSD

brian_p (claremont102) said : #9

Output of scanimage -L:

> device `hpaio:/net/HP_LaserJet_Pro_MFP_M126nw?ip=192.168.0.107' is a
> Hewlett-Packard HP_LaserJet_Pro_MFP_M126nw all-in-one

This requires a plugin. Forget about it.

> device `airscan:w1:HP HP LaserJet Pro MFP M126nw' is a WSD
> HP HP LaserJet Pro MFP M126nw WSD network scanner

No plugin required. Can you scan with

  simple-scan "airscan:w1:HP HP LaserJet Pro MFP M126nw" ?

Ramesh (ramesh99) said : #10

Unfortunately, it didn't work. Refer this video to understand: https://www.dropbox.com/s/7ec1k8v2jrn38yp/123.mp4?dl=0

brian_p (claremont102) said : #11

How about if you just start simple-scan and select from its dropdown
menu?

Or try

  scanimage -d "airscan:w1:HP HP LaserJet Pro MFP M126nw" > image.pnm

Ramesh (ramesh99) said : #12

> How about if you just start simple-scan and select from its dropdown
menu?

This method didn't work. Check the video: https://www.dropbox.com/s/dznapdjrvs31sko/1234.mp4?dl=0

Output of scanimage -d "airscan:w1:HP HP LaserJet Pro MFP M126nw" > image.pnm:

Output format is not set, using pnm as a default.
scanimage: open of device airscan:w1:HP HP LaserJet Pro MFP M126nw failed: Invalid argument

brian_p (claremont102) said : #13

> scanimage: open of device airscan:w1:HP HP LaserJet Pro MFP M126nw
> failed: Invalid argument

I am running out of decent ideas, Ramesh. Why should scanimage see

  airscan:w1:HP HP LaserJet Pro MFP M126nw

as an invalid argument when scanimage itself has provided it with the
-L option?

Comment out "hpaio" in /etc/sane.d/dll.d/hplip and re-plug the device
to the USB port. Try

 scanimage -d "airscan:w1:HP HP LaserJet Pro MFP M126nw" > image.pnm

again, and also

 scanimage -d "airscan:w1:HP LaserJet Pro MFP M126nw" > image.pnm

Ramesh (ramesh99) said : #14

I don't why the outputs of some commands have changed.

Output of scanimage -L:

device `hpaio:/net/HP_LaserJet_Pro_MFP_M126nw?ip=192.168.0.107' is a Hewlett-Packard HP_LaserJet_Pro_MFP_M126nw all-in-one

Output of airscan-discover:

[devices]

brian_p (claremont102) said : #15

> I don't why the outputs of some commands have changed.

Neither do I.

Apologies when I said previously

> ...e-plug the device to the USB port.

Forget about that. I forgot you were on the network with the M126mw!

Ramesh (ramesh99) said : #16

Now, what should I do?

BTW, I missed a word in the previous comment. I actually wanted to say, "I don't know why the outputs of some commands have changed. "

brian_p (claremont102) said : #17

> Now, what should I do?

> BTW, I missed a word in the previous comment. I actually wanted to say, "I
> don't know why the outputs of some commands have changed. "

As I said, I do not not know why the 'scanimage -L' has changed. Please
try

 scanimage -d "airscan:w1:HP HP LaserJet Pro MFP M126nw" > image.pnm

and

 scanimage -d "airscan:w1:HP LaserJet Pro MFP M126nw" > image.pnm

Ramesh (ramesh99) said : #18

Output of scanimage -d "airscan:w1:HP HP LaserJet Pro MFP M126nw" > image.pnm:

Output format is not set, using pnm as a default.
scanimage: open of device airscan:w1:HP HP LaserJet Pro MFP M126nw failed: Invalid argument

Output of scanimage -d "airscan:w1:HP LaserJet Pro MFP M126nw" > image.pnm:

Output format is not set, using pnm as a default.
scanimage: open of device airscan:w1:HP LaserJet Pro MFP M126nw failed: Invalid argument

BTW, I didn't do this step...
> Comment out "hpaio" in /etc/sane.d/dll.d/hplip

Should I do it?

brian_p (claremont102) said : #19

> Should I do it?

It's not necessary.

We have printing going without a plugin. sane-airscan indicates that scanning
should happen using the WSD protocol with the URI

    airscan:w1:HP HP LaserJet Pro MFP M126nw

but this does not happen.

All I can suggest is that you raise an issue at

  https://github.com/alexpevzner/sane-airscan/issues

referring to this thread. How do you fell about that? Alex Pevzner is very approachable.

brian_p (claremont102) said : #20

fell=feel

Ramesh (ramesh99) said : #21

I don't have a GitHub account. I'll create one and raise an issue.

Ramesh (ramesh99) said : #22

BTW, what about the HPLIP binary plugin? Is there any issue with the plugin? If yes, when will it be fixed? And also when is a the new HPLIP version releasing (which supports Ubuntu 20.04)?

brian_p (claremont102) said : #23

Ramesh - I cannot sensibly answer any of your questions. They
would have to be addressed by the HPLIP developers. The only
solution I know of for a misbehaving plugin is to download it from

  https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/

and install with

  sh PLUGIN_FILE_NAME

Regards,

Brian.

Ramesh (ramesh99) said : #27

I removed all my printers from the Settings app. Then downloaded hplip-3.20.3-plugin.run from https://developers.hp.com/hp-linux-imaging-and-printing/plugins
I ran the script and it was successful.

Then I typed hp-setup in terminal and added my printer.

Now printing and scanning both works :)