HP M1522nf issue: error: SANE: Error during device I/O (code=9)

Asked by Bruce Garlock

OS: 64-bit CentOS 5.3
HPLIP: ver 3.9.8 (most current version as of this post)
Printer is a network printer (Not locally connected via USB)

This is the 2nd Network attached printer I am setting up on this server. The first one works fine (HP PSC7310) This printer is on a different subnet, however. I can ping it fine, and it looks like it is setup, as here is the output from 'scanimage -L':

[root@athena rules.d]# scanimage -L
[sanei_debug] Setting debug level of dll to 128.
[dll] sane_init: SANE dll backend version 1.0.12 from sane-backends 1.0.18
[dll] sane_init: reading dll.conf
[dll] add_backend: adding backend `net'
[dll] add_backend: adding backend `hpaio'
[dll] sane_get_devices
[dll] load: searching backend `hpaio' in `/usr/lib64/sane'
[dll] load: trying to load `/usr/lib64/sane/libsane-hpaio.so.1'
[dll] load: dlopen()ing `/usr/lib64/sane/libsane-hpaio.so.1'
[dll] init: initializing backend `hpaio'
[dll] init: backend `hpaio' is version 1.0.0
[dll] load: searching backend `net' in `/usr/lib64/sane'
[dll] load: trying to load `/usr/lib64/sane/libsane-net.so.1'
[dll] load: dlopen()ing `/usr/lib64/sane/libsane-net.so.1'
[dll] init: initializing backend `net'
[dll] init: backend `net' is version 1.0.18
[dll] sane_get_devices: found 2 devices
device `hpaio:/net/Officejet_7300_series?ip=192.168.200.189' is a Hewlett-Packard Officejet_7300_series all-in-one
device `hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.205.66' is a Hewlett-Packard HP_LaserJet_M1522nf_MFP all-in-one
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `hpaio's exit function
[dll] sane_exit: calling backend `net's exit function
[dll] sane_exit: finished

When I run 'hp-scan':

[root@athena rules.d]# hp-scan
warning: hp-scan should not be run as root/superuser.

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

Copyright (c) 2001-9 Hewlett-Packard 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.

-----------------
| SELECT DEVICE |
-----------------

  Num Scan device URI
  -------- ----------------------------------------------------
  0 hpaio:/net/Officejet_7300_series?ip=192.168.200.189
  1 hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.205.66

So, it looks like it is setup properly. If I choose '0' above, that scanner scans just fine. But when I select '1', I immediately get this:

Enter number 0...1 for device (q=quit) ?1
warning: No destinations specified. Adding 'file' destination by default.
warning: File destination enabled with no output file specified.
Setting output format to JPEG for color/lineart mode.
warning: Defaulting to '/etc/udev/rules.d/hpscan001.jpg'.
[sanei_debug] Setting debug level of dll to 128.
[dll] sane_init: SANE dll backend version 1.0.12 from sane-backends 1.0.18
[dll] sane_init: reading dll.conf
[dll] add_backend: adding backend `net'
[dll] add_backend: adding backend `hpaio'
[dll] sane_get_devices
[dll] load: searching backend `hpaio' in `/usr/lib64/sane'
[dll] load: trying to load `/usr/lib64/sane/libsane-hpaio.so.1'
[dll] load: dlopen()ing `/usr/lib64/sane/libsane-hpaio.so.1'
[dll] init: initializing backend `hpaio'
[dll] init: backend `hpaio' is version 1.0.0
[dll] load: searching backend `net' in `/usr/lib64/sane'
[dll] load: trying to load `/usr/lib64/sane/libsane-net.so.1'
[dll] load: dlopen()ing `/usr/lib64/sane/libsane-net.so.1'
[dll] init: initializing backend `net'
[dll] init: backend `net' is version 1.0.18
[dll] sane_get_devices: found 2 devices
Using device hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.205.66
Opening connection to device...
[dll] sane_open: trying to open `hpaio:/net/HP_LaserJet_M1522nf_MFP?ip=192.168.205.66'
error: SANE: Error during device I/O (code=9)

Any idea what that code=9 means? I have searched the net, and launchpad, but cannot find any posts with the error I am getting.

My plan is to write a web based scanning program with PHP, making system calls to 'hp-scan', and that works fine when the PSC7310 is chosen, but I can't seem to get anywhere with this other printer.

Does 'hp-scan' work with printers on another subnet? The printer does have the correct default route on it, and I can ping it from the other subnet, and use Safari to go into the printers webserver for config changes. I just think that 'hp-scan' doesn't like the fact that the 'scanner' is on another subnet.

Any help is greatly appreciated.

Best Regards,

Bruce

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Bruce Garlock
Solved:
Last query:
Last reply:
Revision history for this message
Bruce Garlock (bruceg-garlockprinting) said :
#1

Oh, here is my tail of /var/log/messages:

Aug 26 14:07:59 athena python: hp-scan[6116]: warning: hp-scan should not be run as root/superuser.
Aug 26 14:08:24 athena python: hp-scan[6116]: warning: No destinations specified. Adding 'file' destination by default.
Aug 26 14:08:24 athena python: hp-scan[6116]: warning: File destination enabled with no output file specified.
Aug 26 14:08:24 athena python: hp-scan[6116]: warning: Defaulting to '/etc/udev/rules.d/hpscan001.jpg'.
Aug 26 14:08:24 athena python: scan/sane/soapht.c 86: unable to load restricted library /usr/share/hplip/scan/plugins/bb_soapht.so: /usr/share/hplip/scan/plugins/bb_soapht.so: cannot open shared object file: No such file or directory
Aug 26 14:08:24 athena python: hp-scan[6116]: error: SANE: Error during device I/O (code=9)

So, it is looking to load a lib that is not there? I can say that that file does not exist. Here is the output from the dir listing:

[root@athena scan]# ll
total 52
-rwxr-xr-x 1 root root 799 Aug 8 09:02 __init__.py
-rw-r----- 1 root root 113 Aug 8 09:25 __init__.pyc
-rw-r--r-- 1 root root 113 Aug 15 2008 __init__.pyo
-rwxr-xr-x 1 root root 20806 Aug 8 09:02 sane.py
-rw-r----- 1 root root 15400 Aug 8 09:25 sane.pyc
[root@athena scan]# pwd
/usr/share/hplip/scan

That plugins folder is not there - where do I get it, or how do I get it, and why does the first printer work without this plugin?

Thanks,

Bruce

Revision history for this message
Bruce Garlock (bruceg-garlockprinting) said :
#2

I knew as soon as I posted this, that I would figure it out, and I did. I needed to run 'hp-plugin -i' I don't recall seeing that in the install instructions, so maybe I just missed it when I got the first printer running. Anyway, everything seems to be working now. This site is a great resource. It got me pointed in the right direction as far as what things to check.

Many thanks,

Bruce

Revision history for this message
mikhou (mikhou) said :
#3

I just waned to post that I also needed to run "hp-plugin -i" to get the proprietary plugin to work for an HP Laserjet M1120 MFP on Linux Mint Debian Edition. This is the only place on the net where I found this suggestion. So I wanted to drop in my printer model number here for others searching for a solution.

mikhou