Can't scan from USB connected Photosmart Premium C310

Asked by William Colls

Kubuntu 10.04 64 Bit system.
HP Photosmat Premium C310 series device connect to computer via USB port. Printing works correctly.
There are no other USB devices connected to the machine.

When I try hp-scan from a terminal I get the following:

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

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

Using device: hpaio:/usb/Photosmart_Prem_C310_series?serial=CN16N210NW05KM

warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/usb/Photosmart_Prem_C310_series?serial=CN16N210NW05KM
Opening connection to device...
error: SANE: Error during device I/O (code=9)

When I try from the xsane icon in the GUI menu I get basically the same message.

Output from hp-check:

HP Linux Imaging and Printing System (ver. 3.12.6)
Dependency/Version Check Utility ver. 15

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

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the
HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies
are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball
has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode
will check both of the above cases (both compile- and run-time dependencies).

Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION

Status Types:
    OK
    MISSING - Missing Dependency or Permission or Plug-in
    INCOMPAT - Incompatible dependency-version or Plugin-version

Saving output in log file: /home/william/hp-check.log

Initializing. Please wait...

---------------
| SYSTEM INFO |
---------------

 Kernel: 2.6.32-42-generic #95-Ubuntu SMP Wed Jul 25 15:56:09 UTC 2012 GNU/Linux
 Host: william64
 Proc: 2.6.32-42-generic #95-Ubuntu SMP Wed Jul 25 15:56:09 UTC 2012 GNU/Linux
 Distribution: ubuntu 10.04

-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.12.6
HPLIP-Home: /usr/share/hplip
HPLIP-Installation: Auto installation is supported for ubuntu distro 10.04 version

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.12.6

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.12.6
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
libusb01-build=no
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.12.6
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=no
hpijs-only-build=no
lite-build=no
udev-acl-rules=yes
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no

Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of '~/.hplip/hplip.conf' file:
[last_used]
printer_name =
working_dir = .
device_uri = hpaio:/usb/Photosmart_Prem_C310_series?serial=CN16N210NW05KM

[commands]
scan = /usr/bin/xsane -V %SANE_URI%

[upgrade]
notify_upgrade = true
last_upgraded_time = 1345338479
latest_available_version = 3.12.6
pending_upgrade_time = 0

[installation]
version = 3.12.6
date_time = 09/01/2012 18:51:31

[settings]
systray_messages = 0
systray_visible = 0

[fax]
email_address =
voice_phone =

[refresh]
rate = 30
enable = false
type = 1

[polling]
enable = false
device_list =
interval = 5

 <Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>

--------------------------
| External Dependencies |
--------------------------

 gs Ghostscript REQUIRED 7.05 8.71 OK -
 network Network-wget OPTIONAL - 1.12 OK -
 dbus DBus REQUIRED - 1.2.16 OK -
 scanimage Shell-Scanning OPTIONAL 1.0 1.0.20 OK -
 policykit Admin-Policy-framework OPTIONAL - 0.96 OK -
 xsane SANE-GUI OPTIONAL 0.9 0.996 OK -
 cups CUPS REQUIRED 1.1 1.4.3 OK 'CUPS Scheduler is running'

-------------------------
| General Dependencies |
-------------------------

 reportlab Python-PDF-Lib OPTIONAL 2.0 2.4 OK -
 libcrypto OpenSSL-Crypto-Lib REQUIRED - 0.9.8 OK -
 pil Python-Image-Lib OPTIONAL - 1.1.7 OK -
 pyqt4-dbus PyQt4-DBUS REQUIRED 4.0 4.7.2 OK -
 libjpeg JPEG-Lib REQUIRED - - OK -
 libpthread POSIX-Threads-Lib REQUIRED - 2.11.1 OK -
 python-dbus Python-DBUS REQUIRED 0.80.0 0.83.0 OK -
 python-devel Python-SDK REQUIRED 2.2 2.6.5 OK -
 pyqt4 Python-Qt4 REQUIRED 4.0 4.7.2 OK -
 cups-devel CUPS-SDK REQUIRED - 1.4.3 OK -
 sane-devel SANE-SDK REQUIRED - 1.0.20 OK -
 libusb USB-Lib REQUIRED - 1.0 OK -
 sane Scan-Lib REQUIRED - 1.0.20 OK -
 cups-image CUPS-Image-Lib REQUIRED - 1.4.3 OK -
 libnetsnmp-devel SNMP-Networking-SDK REQUIRED 5.0.9 5.4.2 OK -
 python-xml Python-XML-Lib REQUIRED - 2.0.0 OK -
 python-notify Desktop-notifications OPTIONAL - - OK -

------------------------------
| Compile Time Dependencies |
------------------------------

 gcc gcc-Compiler REQUIRED - 4.4.3 OK -
 libtool Build-tools REQUIRED - 2.2.6 OK -
 make GNU-Build-tools REQUIRED 3.0 3.81 OK -

----------------------
| Python Extentions |
----------------------

 cupsext CUPS-Extension REQUIRED - 3.12.6 OK -
 pcardext PhotoCard-Extension REQUIRED - 3.12.6 OK -
 hpmudext IO-Extension REQUIRED - 3.12.6 OK -

-----------------------
| Scan Configuration |
-----------------------

 hpaio HPLIP-SANE-Backend REQUIRED - 3.12.6 OK 'hpaio found in /etc/sane.d/dll.conf'
 scanext Scan-SANE-Extension REQUIRED - 3.12.6 OK -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

device `hpaio:/usb/Photosmart_Prem_C310_series?serial=CN16N210NW05KM' is a Hewlett-Packard Photosmart_Prem_C310_series all-in-one

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

  Device URI Model
  -------------------------------- ------------------------------
  hp:/usb/Photosmart_Prem_C310_ser HP Photosmart Prem C310 series
  ies?serial=CN16N210NW05KM

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

HPPhotosmart
------------
Type: Printer
Device URI: hp:/usb/Photosmart_Prem_C310_series?serial=CN16N210NW05KM
PPD: /etc/cups/ppd/HPPhotosmart.ppd
PPD Description: HP Photosmart Prem c310 Series, hpcups 3.12.6
Printer status: printer HPPhotosmart is idle. enabled since Sat 01 Sep 2012 05:39:54 PMready to print
Communication status: Good

LaserJet_1012
-------------
Type: Unknown
Device URI: smb://heather/laserjet%201012
PPD: /etc/cups/ppd/LaserJet_1012.ppd
PPD Description: HP LaserJet 1012 hpijs, 3.10.2
Printer status: printer LaserJet_1012 is idle. enabled since Mon 09 Jul 2012 09:43:06 AM EDT
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

--------------
| PERMISSION |
--------------

groups user-groups Required - - OK william root adm lp dialout cdrom plugdev lpadmin admin sambashare libvirtd

USB HPPhotosmart Required - - OK Node:'/dev/bus/usb/001/004' Perm:' root lp rw- rw- rw- rw- r--'

-----------
| SUMMARY |
-----------

Missing Required Dependencies
-----------------------------
None

Missing Optional Dependencies
-----------------------------
None

Total Errors: 1
Total Warnings: 0

Done.

I assume that the 1 error relates to the HP 1012 printer, which is actually connected to a different (Windows XP) machine.

Not sure what do next.

Suggestions welcome.

Thanks for your time.

William.

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Sanjay Kumar
Solved:
Last query:
Last reply:
Revision history for this message
Best Sanjay Kumar (sanjay-kumar14) said :
#1

Hi,

Thanks for reporting the issue in HPLIP. There was an issue in Scan for this device in HPLIP-3.12.6 release. Please follow below steps to fix the issue.
=> Download and install the latest HPLIP release from http://hplipopensource.com/hplip-web/install/install/index.html (automatic) or http://hplipopensource.com/hplip-web/install/manual/index.html (manual if automatic does not work)

=> Reconfigure print queue with the commands in the terminal mentioned below.
       => system-config-printer (remove all print queues)
       => hp-setup (It should not be run in a root mode. This command is adding print queue, make sure you select ppd name having "-ps" or "hpcups" substring)
=>Try scanning/printing now.

Revision history for this message
William Colls (william-colls) said :
#2

Thank you very much. Scanner now works beautifully.

As a note, the otherwise excellent install instructions didn't mention the case where the user is updating/replacing an existing installation. I selected the option remove and install, which seems to also taken care of reconfiguring the printer queue when setup program was run from inside the script.

Thanks for your help.

Revision history for this message
Jussi Hukkanen (jussi-hukkanen) said :
#3

Scanning is not working here using the same printer/scanner model. My c310 prints but does not scan. I have HPLIP version 3.12.9 installed, but my OS is Debian wheezy. `hp-check -t' gives no errors, however it does warn me about the lack of support for Debian testing.

`sane-find-scanner' finds the machine but `scanimage -L' cannot see it. When I run `xsane' from the terminal, it says "no devices available". When I try to scan via the HPLIP Device Manager, I get "Failed to open device: [...] Operation not supported".

Is this purely a SANE issue or am I wasting my time trying to get scanning to work in wheezy?

Revision history for this message
Jussi Hukkanen (jussi-hukkanen) said :
#4

I finally got it working. It seems to have been a 64-bit/32-bit issue (or something along those lines?).

Following the advice in question #176385 <https://answers.launchpad.net/hplip/+question/176385> I created symlinks in /usr/lib/sane/ (which was empty) pointing to the corresponding files in /usr/lib64/sane/, specifically libsane-hpaio.la and libsane-hpaio.so.1.0.0, and just to be sure, the two existing symlinks to the latter, i.e. libsane-hpaio.so and libsane-hpaio.so.1. Now `scanimage -L' finds the device and both xsane and hp-scan work beautifully.

I wonder if something went wrong with my installation of HPLIP as I figure the install script should probably have created the symlinks in /usr/lib/sane/.