8

If I try to scan (xsane or simple-scan) I get this output:

Device URI: hpaio:/net/HP_LaserJet_MFP_M129-M134?hostname=hp-drucker

I was told that this device has great linux support ... See https://hardwarerecs.stackexchange.com/questions/8323/small-printerscanner-with-very-good-support-for-ubuntu

MIB search path: /home/guettli/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (MTA-MIB): At line 0 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TC): At line 15 in /usr/share/snmp/mibs/UCD-DISKIO-MIB.txt
Cannot find module (SNMPv2-SMI): At line 34 in /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Cannot find module (SNMPv2-TC): At line 37 in /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Did not find 'enterprises' in module #-1 (/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)
Did not find 'DisplayString' in module #-1 (/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)
Did not find 'TruthValue' in module #-1 (/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)
.... (cut)

After updateing snmp packages I get this error now:

===> hp-scan 

HP Linux Imaging and Printing System (ver. 3.16.11)
Scan Utility ver. 2.2

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.

warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/net/HP_LaserJet_MFP_M129-M134?hostname=NPIBC8C62.local
Opening connection to device...
error: SANE: Error during device I/O (code=9)

Still no scanning possible :-(

guettli
  • 2,932
  • 12
  • 67
  • 115

5 Answers5

3

I solved the error: SANE: Error during device I/O (code=9) by installing the hplip-plugin.

I had to manually download it from there website and use sh hplip-3.19.3-plugin.run to install it (use the same version as your own hplip, you can see your version number by running the command hp-info). Using the command hp-plugin did not work for me.

After this hp-scan and programs like Simple Scan worked correctly.

Ralph Bisschops
  • 271
  • 3
  • 10
  • This did not work for me. Running `hp-scan`, I still get the same `error: SANE: Error during device I/O (code=9)` error after installing the matching plugin. – nealmcb Nov 12 '21 at 01:00
  • Make user you select the right version from the website (preferably the latest). If that does not work, try the previous versions. In `hp-info` there is a field `support-ver`, I think this denotes the minimal version required by your device. This might also depend on the OS library installed. What version of `hp-scan` do you have? Can view using `hp-scan --help`. – Ralph Bisschops Nov 12 '21 at 14:46
  • Thanks for the followup! `hp-scan --help` says HP Linux Imaging and Printing System (ver. 3.20.3) Scan Utility ver. 2.2 . I installed `hplip-3.20.3-plugin.run`. Running `hp-info` yields: `error: No device found that support this feature.` When running `hp-scan` I select `hpaio:/usb/OfficeJet_5200_series?serial=TH82H4B0QN` I'm running Ubuntu 20.04 – nealmcb Nov 21 '21 at 03:01
  • Hmm, not sure. But I noticed my device url is: `hp:/usb/...` so maybe give that a try, instead of the `hpaio:/usb/` you used. Don't know if it makes a difference. (although think the `hp:/` is for printing, `hpaio:/` for scanning) Maybe you don't have the appropriate CUPS drivers? See if `http://localhost:631/` shows anything (it should show a static webpage with version number on top, `http://localhost:631/printers/` lists the printers it knows about. – Ralph Bisschops Dec 06 '21 at 15:32
3

The somewhat brute-force answer is that you had installed at some point snmp on your system, and it has not been entirely removed. The easiest fix for this will be re-installation of snmp:

Open a terminal, and enter the command

sudo apt update
sudo apt install snmp snmp-mibs-downloader

After having fixed the snmp issues, the I/O error 9 referenced by hp-scan seems to indicate tht it may not be fully installed - see https://bugzilla.redhat.com/show_bug.cgi?id=1347231

To fix this, enter the command

sudo apt install --reinstall hplip
Charles Green
  • 20,952
  • 21
  • 60
  • 92
  • I entered the command you wrote. The verbose error does not happen any more. But xsane or sane-find-scanner bring to output. But still not working. I added the output of hp-scan to the question. – guettli Nov 22 '17 at 19:49
  • @guettli Please reinstall the hplip program - this can most easily be done by `sudo apt install --reinstall hplip` – Charles Green Nov 24 '17 at 22:09
  • 1
    I followed your commands, but it didn't help. – Pavel_K Jun 08 '20 at 15:20
0

Encountered similar issue with quite similar error messages for my hp-scanner (it is in an hp-all-in-one, the printer works, but the scanner could not work)

None of the direct answers to the original post resolved my issue, but installing hplip-gui, and then run hp-setup makes my hp-scanner work perfectly.

water stone
  • 418
  • 2
  • 5
  • 14
-1

According to the man page

hp-scan [DEVICE_URI|PRINTER_NAME] [MODE] [OPTIONS]

To specify a device-URI:
    -d<device-uri> or --device=<device-uri> 
To specify a CUPS printer:
    -p<printer> or --printer=<printer> 

Note that you need to specify the URI for hp-scan

Configuration of Sane is also required

Elder Geek
  • 35,476
  • 25
  • 95
  • 181
-1

This is a work-around, but it works.

I use the "HP Smart (HP AiO Remote)" Android App for scanning. This works easy and reliably ... I am happy.

guettli
  • 2,932
  • 12
  • 67
  • 115
  • irrelevant to the question here about ubuntu – nealmcb Nov 12 '21 at 00:11
  • Do you know the difference between a goal and a strategy? I guess the goal of the question is to get scanning working. In many cases the strategy (the how?) does not matter much. – guettli Nov 12 '21 at 08:46
  • OK, I hear you. Indeed, if someone has Android this can be helpful. But I tried the Android app, and it didn't work for me. Could have been a wifi config restriction on the local infrastructure. But for the `askubuntu` site, with an answer that you could leave for any problem related to HP scanning, I'd leave the down vote, except for the fact that you have a total of 0 up-votes and it seems unnecessary to put the post in negative territory. So I tried to undo my downvote, but it is "locked in" until the answer is changed. At any rate, thanks for engaging, and all your other good answers! – nealmcb Nov 21 '21 at 03:19