Scanner found in terminal and in simplescan, but does not work for xsane in simplescan or gimp, says “unable to connect to scanner”

Asked by Roger Davis

https://gitlab.com/sane-project/frontends/-/issues/23#note_651214587
-------------------------------------------------------------------------------------------------------------------
Scanner found in terminal and in simplescan, but does not work for xsane in simplescan or gimp, says “unable to connect to scanner”
Printing works fine
HP Color LaserJet Pro MFP M177fw multi-function
All functions, including scan, works in windows on same system.
Scanner used to work fine a couplethree months ago, went to use it a few days ago, does not work
I made no changes except for regular Ubuntu updates.
found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x332a [HP Color LaserJet Pro
Bus 003 Device 003: ID 03f0:332a Hewlett-Packard

roger@roger-desktop:~$ sane-find-scanner
found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x332a [HP Color LaserJet Pro MFP M177fw]) at libusb:003:003

roger@roger-desktop:~$ scanimage -L
device `hpaio:/usb/HP_Color_LaserJet_Pro_MFP_M177fw?serial=CNG6J1J7WD' is a Hewlett-Packard HP_Color_LaserJet_Pro_MFP_M177fw all-in-one

roger@roger-desktop:~$ scanimage -T
scanimage: open of device hpaio:/usb/HP_Color_LaserJet_Pro_MFP_M177fw?serial=CNG6J1J7WD failed: Error during device I/O

roger@roger-desktop:~$ scanimage -V
scanimage (sane-backends) 1.0.27; backend version 1.0.27
Attempts at fixing this shown below - no luck
roger@roger-desktop:~$ sudo apt-get install sane sane-utils libsane-extras xsane
[sudo] password for roger:
Reading package lists... Done
Building dependency tree
Reading state information... Done
xsane is already the newest version (0.999-5ubuntu2).
sane-utils is already the newest version (1.0.27-1~experimental3ubuntu2.4).
The following packages were automatically installed and are no longer required:
  libllvm9 libllvm9:i386 linux-hwe-5.4-headers-5.4.0-42 linux-hwe-5.4-headers-5.4.0-45 linux-hwe-5.4-headers-5.4.0-47 linux-hwe-5.4-headers-5.4.0-48 linux-hwe-5.4-headers-5.4.0-51
  linux-hwe-5.4-headers-5.4.0-52 linux-hwe-5.4-headers-5.4.0-53 linux-hwe-5.4-headers-5.4.0-54 linux-hwe-5.4-headers-5.4.0-56 linux-hwe-5.4-headers-5.4.0-58 linux-hwe-5.4-headers-5.4.0-59
  linux-hwe-5.4-headers-5.4.0-60 linux-hwe-5.4-headers-5.4.0-62 linux-hwe-5.4-headers-5.4.0-64 linux-hwe-5.4-headers-5.4.0-65 linux-hwe-5.4-headers-5.4.0-66 linux-hwe-5.4-headers-5.4.0-67
  linux-hwe-5.4-headers-5.4.0-70 linux-hwe-5.4-headers-5.4.0-71 linux-hwe-5.4-headers-5.4.0-72 linux-hwe-5.4-headers-5.4.0-73 linux-hwe-5.4-headers-5.4.0-74
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libsane-extras-common
The following NEW packages will be installed:
  libsane-extras libsane-extras-common sane
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 137 kB of archives.
After this operation, 468 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libsane-extras-common all 1.0.22.5 [7,520 B]
Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libsane-extras amd64 1.0.22.5 [47.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 sane amd64 1.0.14-12build1 [82.2 kB]
Fetched 137 kB in 1s (138 kB/s)
Selecting previously unselected package libsane-extras-common.
(Reading database ... 731505 files and directories currently installed.)
Preparing to unpack .../libsane-extras-common_1.0.22.5_all.deb ...
Unpacking libsane-extras-common (1.0.22.5) ...
Selecting previously unselected package libsane-extras:amd64.
Preparing to unpack .../libsane-extras_1.0.22.5_amd64.deb ...
Unpacking libsane-extras:amd64 (1.0.22.5) ...
Selecting previously unselected package sane.
Preparing to unpack .../sane_1.0.14-12build1_amd64.deb ...
Unpacking sane (1.0.14-12build1) ...
Setting up sane (1.0.14-12build1) ...
Setting up libsane-extras-common (1.0.22.5) ...
Setting up libsane-extras:amd64 (1.0.22.5) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
roger@roger-desktop:~$ Applications > Graphics > XSane
Applications: command not found
roger@roger-desktop:~$ hp-setup

HP Linux Imaging and Printing System (ver. 3.17.10)
Printer/Fax Setup Utility ver. 9.0

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

Searching... (bus=usb, search=(None), desc=0)
Exiting the setup...

Done.
roger@roger-desktop:~$
Thanks!

changed the description

    Maintainer

Normally, we would recommend trying out of sane-release PPA, but that is unlikely to help in this case because you are using the hpaio backend which comes from HP not the SANE project.
It is possible that you got an update from the libsane-hpaio package. I just checked my Linux Mint system here and 3.17.10 seems to be the latest version in the repo.
We can offer limited support, but you should realise that the backend you are using is not from this project.
Could you try this and give us the output?
SANE_DEBUG_HPAIO=250 scanimage -T

assigned to @skelband

roger@roger-desktop:~$ SANE_DEBUG_HPAIO=250 scanimage -T
[sanei_debug] Setting debug level of hpaio to 250.
[hpaio] sane_hpaio_init(): scan/sane/hpaio.c 323
[hpaio] sane_hpaio_get_devices(local=0): scan/sane/hpaio.c 342
scanimage: no SANE devices found
[hpaio] sane_hpaio_exit(): scan/sane/hpaio.c 336
roger@roger-desktop:~$
--------------------------
pop-up =
HPLIP cannot detect devices in your network. This may be due to existing firewall settings blocking the required ports like (5353/udp). When you are in a trusted network environment, you may open the ports for network services like mdns and slp in the firewall. For detailed steps follow the link.

 http://hplipopensource.com/node/375
-------------------------------------------------
http://hplipopensource.com/node/375 gets "page not found" page on https://developers.hp.com/hp-linux-imaging-and-printing/node/375
-----------------------------------
I don't necessarily require this software currently installed, but I simply need a fully functioning scanner.

    Maintainer

OK, consulting the release notes on HP's website, support for your printer/scanner was added on 3.13.11 (https://developers.hp.com/hp-linux-imaging-and-printing/release_notes) so it certainly should work.
From the instructions, it looks like you would need to run hp-setup to register the device but I see that you already tried that. Sorry, I'm not sure what else to try. I am not very familiar with that backend.
You could try this here: https://forum.mxlinux.org/viewtopic.php?p=473291#p473291
Someone else had their printer stop working after an upgrade and reinstalling the HP packages worked for them.

Printing works fine, always has
Checked the suggested packages in Synaptic, found the last item was missing from hplip, installed that, tried scanning - no result.
All other packages were ok.
Simplescan says "Unable to connect to scanner"
Ran hp-setup - no solution -
I note that hp-setup does NOT try to install a scanner, only print and fax.
I had several print and fax queues installed, removed all but one of each, test print, it installs another printer in that process, ending in 538144, tried again, same result - but prints ok.
Maybe I should remove all (exactly how???) and start over with the best software, HP, SANE project or ???, and again, exactly how???
What is your opinion of the following RE my problem :

Downloading and installing sane-airscan and ipp-usb id linked from the main page under Installation from pre-build binaries.
HPLIP becomes redundant.
WiFi is not necessary to use sane-airscan.
AirScan uses the eSCL protocol

Thanks!!!

    Maintainer

To try the reinstall option:
sudo apt purge hplip hplip-data hplip-gui libhpmud0 libsane-hpaio printer-driver-hpcups
sudo apt install hplip hplip-data hplip-gui libhpmud0 libsane-hpaio printer-driver-hpcups
For scanning, the important one is libsane-hpaio.
As for Airscan, you could certainly try it. sane-airscan is not part of the SANE project, but Alexander Pevsner (the author) is a regular contributor here.
https://github.com/alexpevzner/sane-airscan
It also wouldn't hurt to upgrade to the latest SANE release using our PPA, where sane-escl might help you. It covers some of the same ground as sane-airscan: https://launchpad.net/~sane-project/+archive/ubuntu/sane-release

Same now as before - Simplescan says "unable to connect to scanner"
Several warnings during process - see below
[sudo] password for roger:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm9 libllvm9:i386 libxcb-xtest0 linux-hwe-5.4-headers-5.4.0-42
  linux-hwe-5.4-headers-5.4.0-45 linux-hwe-5.4-headers-5.4.0-47
  linux-hwe-5.4-headers-5.4.0-48 linux-hwe-5.4-headers-5.4.0-51
  linux-hwe-5.4-headers-5.4.0-52 linux-hwe-5.4-headers-5.4.0-53
  linux-hwe-5.4-headers-5.4.0-54 linux-hwe-5.4-headers-5.4.0-56
  linux-hwe-5.4-headers-5.4.0-58 linux-hwe-5.4-headers-5.4.0-59
  linux-hwe-5.4-headers-5.4.0-60 linux-hwe-5.4-headers-5.4.0-62
  linux-hwe-5.4-headers-5.4.0-64 linux-hwe-5.4-headers-5.4.0-65
  linux-hwe-5.4-headers-5.4.0-66 linux-hwe-5.4-headers-5.4.0-67
  linux-hwe-5.4-headers-5.4.0-70 linux-hwe-5.4-headers-5.4.0-71
  linux-hwe-5.4-headers-5.4.0-72 linux-hwe-5.4-headers-5.4.0-73
  linux-hwe-5.4-headers-5.4.0-74 python3-dbus.mainloop.pyqt5 python3-notify2
  python3-olefile python3-pil python3-renderpm python3-reportlab
  python3-reportlab-accel
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  hplip* hplip-data* hplip-gui* libhpmud0* libsane-hpaio*
  printer-driver-hpcups* printer-driver-postscript-hp*
0 upgraded, 0 newly installed, 7 to remove and 0 not upgraded.
After this operation, 17.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 731094 files and directories currently installed.)
Removing hplip-gui (3.17.10+repack0-5) ...
Removing printer-driver-postscript-hp (3.17.10+repack0-5) ...
Removing hplip (3.17.10+repack0-5) ...
Removing hplip-data (3.17.10+repack0-5) ...
dpkg: warning: while removing hplip-data, directory '/usr/share/hplip/ui5' not empty so not removed
dpkg: warning: while removing hplip-data, directory '/usr/share/hplip/scan' not empty so not removed
dpkg: warning: while removing hplip-data, directory '/usr/share/hplip/prnt' not empty so not removed
dpkg: warning: while removing hplip-data, directory '/usr/share/hplip/pcard' not empty so not removed
dpkg: warning: while removing hplip-data, directory '/usr/share/hplip/installer' not empty so not removed
dpkg: warning: while removing hplip-data, directory '/usr/share/hplip/fax' not empty so not removed
dpkg: warning: while removing hplip-data, directory '/usr/share/hplip/copier' not empty so not removed
dpkg: warning: while removing hplip-data, directory '/usr/share/hplip/base/pexpect' not empty so not removed
Removing printer-driver-hpcups (3.17.10+repack0-5) ...
Removing libsane-hpaio:amd64 (3.17.10+repack0-5) ...
Removing libhpmud0:amd64 (3.17.10+repack0-5) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for cups (2.2.7-1ubuntu2.8) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
(Reading database ... 730397 files and directories currently installed.)
Purging configuration files for hplip (3.17.10+repack0-5) ...
dpkg: warning: while removing hplip, directory '/var/lib/hp' not empty so not removed
Purging configuration files for hplip-gui (3.17.10+repack0-5) ...
Purging configuration files for libsane-hpaio:amd64 (3.17.10+repack0-5) ...
dpkg: warning: while removing libsane-hpaio:amd64, directory '/usr/share/hplip/data' not empty so not removed
Processing triggers for dbus (1.12.2-1ubuntu1.2) ...
roger@roger-desktop:~$ sudo apt install hplip hplip-data hplip-gui libhpmud0 libsane-hpaio printer-driver-hpcups
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm9 libllvm9:i386 libxcb-xtest0 linux-hwe-5.4-headers-5.4.0-42 linux-hwe-5.4-headers-5.4.0-45 linux-hwe-5.4-headers-5.4.0-47 linux-hwe-5.4-headers-5.4.0-48 linux-hwe-5.4-headers-5.4.0-51
  linux-hwe-5.4-headers-5.4.0-52 linux-hwe-5.4-headers-5.4.0-53 linux-hwe-5.4-headers-5.4.0-54 linux-hwe-5.4-headers-5.4.0-56 linux-hwe-5.4-headers-5.4.0-58 linux-hwe-5.4-headers-5.4.0-59
  linux-hwe-5.4-headers-5.4.0-60 linux-hwe-5.4-headers-5.4.0-62 linux-hwe-5.4-headers-5.4.0-64 linux-hwe-5.4-headers-5.4.0-65 linux-hwe-5.4-headers-5.4.0-66 linux-hwe-5.4-headers-5.4.0-67
  linux-hwe-5.4-headers-5.4.0-70 linux-hwe-5.4-headers-5.4.0-71 linux-hwe-5.4-headers-5.4.0-72 linux-hwe-5.4-headers-5.4.0-73 linux-hwe-5.4-headers-5.4.0-74
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  printer-driver-postscript-hp
The following NEW packages will be installed:
  hplip hplip-data hplip-gui libhpmud0 libsane-hpaio printer-driver-hpcups printer-driver-postscript-hp
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,750 kB/8,769 kB of archives.
After this operation, 17.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 hplip-data all 3.17.10+repack0-5 [6,392 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libhpmud0 amd64 3.17.10+repack0-5 [108 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsane-hpaio amd64 3.17.10+repack0-5 [121 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 printer-driver-hpcups amd64 3.17.10+repack0-5 [251 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 hplip amd64 3.17.10+repack0-5 [1,035 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 printer-driver-postscript-hp all 3.17.10+repack0-5 [844 kB]
Fetched 8,750 kB in 3s (3,460 kB/s)
Selecting previously unselected package hplip-data.
(Reading database ... 730389 files and directories currently installed.)
Preparing to unpack .../0-hplip-data_3.17.10+repack0-5_all.deb ...
Unpacking hplip-data (3.17.10+repack0-5) ...
Selecting previously unselected package libhpmud0:amd64.
Preparing to unpack .../1-libhpmud0_3.17.10+repack0-5_amd64.deb ...
Unpacking libhpmud0:amd64 (3.17.10+repack0-5) ...
Selecting previously unselected package libsane-hpaio:amd64.
Preparing to unpack .../2-libsane-hpaio_3.17.10+repack0-5_amd64.deb ...
Unpacking libsane-hpaio:amd64 (3.17.10+repack0-5) ...
Selecting previously unselected package printer-driver-hpcups.
Preparing to unpack .../3-printer-driver-hpcups_3.17.10+repack0-5_amd64.deb ...
Unpacking printer-driver-hpcups (3.17.10+repack0-5) ...
Selecting previously unselected package hplip.
Preparing to unpack .../4-hplip_3.17.10+repack0-5_amd64.deb ...
Unpacking hplip (3.17.10+repack0-5) ...
Selecting previously unselected package hplip-gui.
Preparing to unpack .../5-hplip-gui_3.17.10+repack0-5_all.deb ...
Unpacking hplip-gui (3.17.10+repack0-5) ...
Selecting previously unselected package printer-driver-postscript-hp.
Preparing to unpack .../6-printer-driver-postscript-hp_3.17.10+repack0-5_all.deb ...
Unpacking printer-driver-postscript-hp (3.17.10+repack0-5) ...
Setting up hplip-data (3.17.10+repack0-5) ...
Setting up libhpmud0:amd64 (3.17.10+repack0-5) ...
Setting up libsane-hpaio:amd64 (3.17.10+repack0-5) ...
Setting up printer-driver-hpcups (3.17.10+repack0-5) ...
Setting up hplip (3.17.10+repack0-5) ... <<<<-----???
Creating/updating hplip user account...
dpkg-statoverride: warning: --update given but /var/run/hplip does not exist <<<-----???
Setting up printer-driver-postscript-hp (3.17.10+repack0-5) ...
Setting up hplip-gui (3.17.10+repack0-5) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for cups (2.2.7-1ubuntu2.8) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
roger@roger-desktop:~$

roger@roger-desktop:~$ hplip
hplip: command not found
roger@roger-desktop:~$

Just a reminder - scanner works fine in Windoze...

    Maintainer

OK, I think that we need to backtrack a little here because in your original post, "scanimage -L" showed that the scanner could be found and "scanimage -T" yielded some kind of comms error, but in your later post to get diag output from that, no devices are found.
Was the machine switched on, connected and ready to scan in the second instance?
BTW, when posting command output, please put ``` on its own before and after. This will suppress formatting and help readability.

Please note that the message just above is after following the suggestion to remove and reinstall - so things may have changed. That's why I posted the entire process Terminal output. You will also notice the <<<-----??? notes after the terminal doesn't find hplip after the remove and reinstall - very confusing to me since it was just supposed to be installed.
Thanks!

    Maintainer

Does the hp-setup command find anything?

roger@roger-desktop:~$ hp-setup
HP Linux Imaging and Printing System (ver. 3.17.10)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-15 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.
Searching... (bus=usb, search=(None), desc=0)
Exiting the setup...
Done.
roger@roger-desktop:~$

    Maintainer

I assume that you are still connecting the device via USB.
Could you show us the output of lsusb?

roger@roger-desktop:~$ lsusb
Bus 002 Device 003: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 003: ID 057b:0000 Y-E Data, Inc. FlashBuster-U Floppy
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 046d:082c Logitech, Inc.
Bus 003 Device 004: ID 03f0:332a Hewlett-Packard
Bus 003 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
roger@roger-desktop:~$

    Maintainer

Well the model is there but evidently the driver is not finding your model for some reason.
I think we have exhausted the assistance I can give here. I can see that the USB ids are listed in the hpaio driver package so it should really be supported. You would probably be best served by talking to the hplip support people here for further help:
https://launchpad.net/hplip

Question information

Language:
English Edit question
Status:
Expired
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
Roger Davis (rogerdavis-d) said :
#2

I still have this problem, cannot find solution.

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

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