Unable to connect by WIFI to HP printer Ubuntu 20.04

Asked by John White

Hi,
I have a new laptop with Intel i5 10210U 8GB RAM 500GB SSD running Ubuntu 20.04 from new.
I have an HP Color Laserjet MFP M277dw
I have installed hplip, version 3.20.3

dpkg -l hplip gives...

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-==============-============-============================================
ii hplip 3.20.3+dfsg0-2 amd64 HP Linux Printing and Imaging System (HPLIP)

When I connect directly to the printer by USB cable I get two instances of the printer:
HP_Color_LaserJet_MFP_M277dw
HP_Color_LaserJet_MFP_M277dw_fax

The USB printer works just fine; I haven't tested the fax as I have on phone line to it.

The USB connection is a pain and I want to work across wifi. The laptop connects to the internet across wifi with no problem.

I can also connect to my router by Ethernet, but neither by Wifi nor with Ethernet, can I connect to the printer, even though I have created a network share for the printer on my Mac. The Ubuntu laptop does not find either a WiFi printer, or the same printer connected to the LAN (which it is), or the Mac share on the LAN. The only other printer it detects is a generic CUPS connection.

Previously I had a very basic laptop running Elementary OS, which always connected to the printer without difficulty.

I would appreciate helpful suggestions as to the approach to take, but as I am much more familiar with Mac OS, I would appreciate it if the instructions don't assume prior command line knowledge !

Many Thanks,
John

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
shivani mandora
Solved:
Last query:
Last reply:
Revision history for this message
Best shivani mandora (shivani1708) said :
#1

Hi ,

Here is few things you can do to setup your printer via wifi or network:

1. Please make sure printer and system both are in same network.
2. If you know the IP of the printer , you can do $hp-setup IP_of_the _printer and setup the device.

Revision history for this message
John White (johnw360) said :
#2

Thanks shivani mandora, that solved my question.

Revision history for this message
Tony Kerr (ajkerr-4) said :
#3

Nope, doesn't solve it for me. Hp-setup fails with error:

Failed to install Plugin.
error: The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins. Please run 'hp-plugin' as normal user to install plug-ins.Visit http://hplipopensource.com for more infomation.

hp-plugin fails with the following traceback:

File "/usr/bin/hp-plugin", line 363, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, 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/bin/hp-plugin", line 363, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, 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.