0

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

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

---> Scan used to work ok, but some time ago ---> Works fine for printing.

Roger Davis
  • 93
  • 10
  • Please provide OS & release details. You mention it worked some time ago, why? what changes occurred in the mean time? (same OS/release? same programs accessing it? etc) Please also provide an actual question (title may not be visible on all devices when viewing page so your description text should be complete; ie. detail in title repeated!) – guiverc Jul 26 '21 at 04:51
  • 2
    Does this answer your question? [How should I install HPLIP binary/proprietary plugin/driver for my HP printer or printer+scanner?](https://askubuntu.com/questions/1070470/how-should-i-install-hplip-binary-proprietary-plugin-driver-for-my-hp-printer-or) – N0rbert Jul 26 '21 at 06:49
  • - Ubuntu 18.04.5 LTS, 15.6 GiB, Intel® Core™ i7-3770 CPU @ 3.40GHz × 8, AMD® Verde, 3.28.2, 64-bit. disk 967.5 GB – Roger Davis Jul 27 '21 at 05:46

1 Answers1

0

I would suggest you dispense with using HPLIP and its non-free plugin and employ a more modern method for scanning. This technique is employed by default on Ubuntu 21.04 so you could get packages from its archive. However, it is probably more convenient and reliable to do the following:

  • Go here (main page), read and move on to this page (Debian packages).
  • Download and install sane-airscan and ipp-usb.
  • Plug the device into USB and execute scanimage -L. The output should show an entry beginning with device 'airscan:....
  • Check scanning with simple-scan airscan:...

Further info

  • 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
brian_p
  • 746
  • 1
  • 4
  • 5
  • Can you please give full detail on how to download and install sane-airscan and ipp-usb? Can I do this with Synaptic Package Manager, or ? I presume no need to remove HPLIP, etc ? Does "airscan" have any meaning other than just a name? That machine does not have wi-fi. Thanks! – Roger Davis Jul 29 '21 at 07:50
  • @Roger Davis I have added to my answer. – brian_p Jul 30 '21 at 11:24
  • I don't see "HP_Color_LaserJet_Pro_MFP_M177fw" in the supported list at https://github.com/alexpevzner/sane-airscan . I assume you know it works for that one, so which of the two "HP_Color_LaserJet_Pro_M xxx" should I use? Or do I just install it and it will go with what works ? And I presume that installed software will use the "SANE" choice as it always has? – Roger Davis Aug 01 '21 at 08:01
  • The M177 has not yet been reported as working with `sane-airscan`. **You are the tester**. A report may be submitted here or as an issue at the website. – brian_p Aug 01 '21 at 09:08
  • Lots of response. Lots of correct information. Zero feedback form @Roger Davis. This hardly helps other users. – brian_p Aug 04 '21 at 17:52
  • Can Synaptic be used to install these? – Roger Davis Aug 06 '21 at 01:52
  • Yes. Indeed Synaptic can be used . – brian_p Aug 07 '21 at 11:36
  • When I search for ipp-usb and saane-airscan, Synaptic places them n the left column, but won't select them, like they aren't found. Do I need to add a repository, or permission, or ??? – Roger Davis Aug 09 '21 at 07:27
  • Have you read the first item under **Further info** in my answer? There is a link to follow that gives detailed instructions on how to add a repository. – brian_p Aug 09 '21 at 11:37
  • I already found the place to add a repository, but the question is what repository? Alternately, can I simply use ''' sudo apt-get install sane-airscan ''' '''' sudo apt-get install ipp-usb ''' Thanks! – Roger Davis Aug 11 '21 at 07:53
  • @Roger Davis I have lost interest in this topic. All you had to do was to go to a site and download and install two packages. What's the problem in that? You add the repository for your distribution, 20.04 etc. – brian_p Aug 11 '21 at 22:25
  • I'm sorry that you have little patience for my need for detail. I can only access the problem machine for a few hours every two or three days, and I'm slow because I'm unsure. While I've been using Ubuntu for a long time, I don't easily dive into Harry Potter incantations - I need strong and specific guidance. It's not lack of interest on my part, it's strong interest in not screwing things up worse. I recognize you are an expert and dance through these details, but I can't. Perhaps you can refer me to someone who has more time for careful detail I need? – Roger Davis Aug 13 '21 at 05:45
  • I need the specific commands needed to download, install, and provide for automatic updating of these packages as time passes, or be specific about hot to make them available to Synaptic, as they don't seem to be now ? – Roger Davis Aug 13 '21 at 05:46
  • I thought I had it installed, by these instructions - but didn't work For xUbuntu 16.04 run the following: echo 'deb http://download.opensuse.org/repositories/home:/pzz/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/home:pzz.list curl -fsSL https://download.opensuse.org/repositories/home:pzz/xUbuntu_16.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_pzz.gpg > /dev/null sudo apt update sudo apt install sane-airscan and then sudo apt install install ipp-usb – Roger Davis Aug 13 '21 at 06:48
  • This didn't work - Simple Scan Failed to scan, unable to connect to scanner For xUbuntu 18.04 run the following: echo 'deb http://download.opensuse.org/repositories/home:/pzz/xUbuntu_18.04/ /' | sudo tee /etc/apt/sources.list.d/home:pzz.list curl -fsSL https://download.opensuse.org/repositories/home:pzz/xUbuntu_18.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_pzz.gpg > /dev/null sudo apt update sudo apt install sane-airscan and then sudo apt install install ipp-usb – Roger Davis Aug 13 '21 at 06:56
  • You do not need a repository. One can set uo later. I am going to assume you know how to download a file and that the file will go in the Downloads directory. `cd Downloads`. Check the files are there with `ls -l`. Then `apt install ./ipp-usb_0.9.19-1+50.1_amd64.deb` followed by `apt install ./sane-airirscan_0.99.26-1+86.1_amd64.deb`. – brian_p Aug 15 '21 at 11:40
  • Typos. airirscan should airscan. op should be up. – brian_p Aug 15 '21 at 11:50
  • I'll follow up as quickly as I can - Dr. appts over next few days... – Roger Davis Aug 17 '21 at 06:16
  • No luck - Harry Potter not here... Tried every variation and sudo I could up with as well... can't give complete into, limited characters - roger@roger-desktop:~$ apt install ./ipp-usb_0.9.19-1+50.1_amd64.deb E: Unsupported file ./ipp-usb_0.9.19-1+50.1_amd64.deb given on commandline E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? roger@roger-desktop:~$ sudo apt install ./ipp-usb_0.9.19-1+50.1_amd64.deb [sudo] password for roger: Reading package lists...Done – Roger Davis Aug 28 '21 at 05:49
  • Voldemort curses me again - Found ipp-usb and airscan-unstable in Synaptic, tried it, got this - E: /var/cache/apt/archives/sane-airscan-unstable_1620822232-1+21.1_amd64.deb: trying to overwrite '/etc/sane.d/airscan.conf', which is also in package sane-airscan 0.99.26-1+86.1 - I need Dumbledore - HELP !!! – Roger Davis Aug 28 '21 at 06:07
  • (Reading database ... 748874 files and directories currently installed.) Preparing to unpack .../sane-airscan_0.99.26-1+86.1_amd64.deb ... Unpacking sane-airscan (0.99.26-1+86.1) over (0.99.26-1+86.1) ... Selecting previously unselected package sane-airscan-unstable. Preparing to unpack .../sane-airscan-unstable_1620822232-1+21.1_amd64.deb ... Unpacking sane-airscan-unstable (1620822232-1+21.1) ... dpkg: error processing archive /var/cache/apt/archives/sane-airscan-unstable_1620822232-1+21.1_amd64.deb (--unpack): – Roger Davis Aug 28 '21 at 06:09
  • trying to overwrite '/etc/sane.d/airscan.conf', which is also in package sane-airscan 0.99.26-1+86.1 dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/sane-airscan-unstable_1620822232-1+21.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up sane-airscan (0.99.26-1+86.1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... – Roger Davis Aug 28 '21 at 06:09
  • Tried again... 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 device `airscan:w0:HP Color LaserJet Pro MFP M177fw[538144]' is a WSD HP Color LaserJet Pro MFP M177fw[538144] ip=192.168.1.157 roger@roger-desktop:~$ Still no scanning ... – Roger Davis Aug 28 '21 at 06:19
  • Can you scan with `simple-scan "airscan:w0:HP Color LaserJet Pro MFP M177fw[538144]"` ? – brian_p Aug 29 '21 at 18:44
  • YES !!! But the command must be entered twice, thusly: --------------- roger@roger-desktop:~$ simple-scan "airscan:w0:HP Color LaserJet Pro MFP M177fw[538144] > simple-scan "airscan:w0:HP Color LaserJet Pro MFP M177fw[538144] (simple-scan:16458): Gtk-WARNING **: 23:13:42.867: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client roger@roger-desktop:~$ ---------------- – Roger Davis Sep 01 '21 at 06:16
  • 3rd time:@roger-desktop:~$ roger@roger-desktop:~$ simple-scan "airscan:w0:HP Color LaserJet Pro MFP M177fw[538144] > > simple-scan "airscan:w0:HP Color LaserJet Pro MFP M177fw[538144] roger@roger-desktop:~$: command not found roger@roger-desktop:~$ roger@roger-desktop:~$ (simple-scan:16458): Gtk-WARNING **: 23:13:42.867: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client bash: syntax error near unexpected token `:' roger@roger-desktop:~$ roger@roger-desktop:~$ roger@roger-desktop:~$: command not found roger@roger-desktop:~$ – Roger Davis Sep 01 '21 at 06:26
  • Tried this variation - no scan. Simple-scan finds scanner, but gives error "unable to connect to scanner" roger@roger-desktop:~$ simple-scan (simple-scan:16819): Gtk-WARNING **: 23:30:36.950: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client – Roger Davis Sep 01 '21 at 06:34
  • ALSO: roger@roger-desktop:~$ airscan:w0:HP Color LaserJet Pro MFP M177fw[538144] airscan:w0:HP: command not found roger@roger-desktop:~$ – Roger Davis Sep 01 '21 at 06:55
  • I did lots of cleanup and package checking today, and now it seems to work, but ONLY if I select WSD Airscan, which is only sometimes available. True on Xsane, SimpleScan, and Gimp. – Roger Davis Sep 05 '21 at 02:50