Officejet 710 parallel probe works only once after printer power up

Asked by Fergus M

Hi all..

I am trying to install a minimal hplip setup on an openfiler 2.2/rpath linux to allow scanning from an Officejet 710 (parallel port) with no GUI or Printing support required.

hp-check -t output at end of message

# lsmod
lp 9160 0
parport_pc 22724 1
ppdev 6916 0

# ls -l /dev/parport0
crw-rw-rw- 1 lp lp 99, 0 Nov 22 23:26 /dev/parport0

When I cycle the power on the Officejet 710, and then run hp-probe -g -bpar I get the following:

--------------------
| DEVICE DISCOVERY |
--------------------

hp-probe[4080]: debug: {None: (<built-in function gt>, 0)}
hp-probe[4080]: debug: hp:/par/OfficeJet_Series_700?device=/dev/parport0
hp-probe[4080]: debug: Cache miss: officejet_series_700
hp-probe[4080]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-probe[4080]: debug: Searching for section [officejet_series_700] in file /usr/share/hplip/data/models/models.dat
hp-probe[4080]: debug: Found section [officejet_series_700] in file /usr/share/hplip/data/models/models.dat
 Device URI Model
 ------------------------------------------------- -----------------------
 hp:/par/OfficeJet_Series_700?device=/dev/parport0 HP OfficeJet Series 700

Found 1 printer(s) on the 'par' bus.

However, if I run it a second time, I get this:

--------------------
| DEVICE DISCOVERY |
--------------------

hp-probe[4081]: debug: {None: (<built-in function gt>, 0)}
warning: No devices found on the 'par' bus. If this isn't the result you are expecting,
warning: check to make sure your devices are properly connected and powered on.

Other tools like hp-info and hp-scan similarly will exit with unknown device unless the printer has just been restarted, in which case they seem to acknowledge the device exists, but then fail with Device I/O error (code=12).

Rebooting the PC makes no difference. Having hpssd running or not makes no difference. Also, configuring printer port as EPP instaed of ECP in the BIOS makes no difference either.

Any ideas on why the probe will not work repeatedly?

# hp-check -t
hp-check[3124]: info: :
Initializing. Please wait...
1.1.23

Linux colossus 2.6.19.4-0.1.x86.i686.cmov #1 Tue Feb 20 12:26:42 EST 2007 i686 i686 i386 GNU/Linux

hp-check[3124]: info: :
hp-check[3124]: info: :---------------
hp-check[3124]: info: :| SYSTEM INFO |
hp-check[3124]: info: :---------------
hp-check[3124]: info: :
hp-check[3124]: info: :Basic system information:
hp-check[3124]: info: :Linux colossus 2.6.19.4-0.1.x86.i686.cmov #1 Tue Feb 20 12:26:42 EST 2007 i686 i686 i386 GNU/Linux
hp-check[3124]: info: :
hp-check[3124]: info: :Distribution:
hp-check[3124]: info: :unknown 0.0
hp-check[3124]: info: :
HPOJ running?
hp-check[3124]: info: :No, HPOJ is not running (OK).
hp-check[3124]: info: :
hp-check[3124]: info: :Checking Python version...
hp-check[3124]: info: :OK, version 2.4.1 installed
hp-check[3124]: info: :
hp-check[3124]: info: :Checking PyQt version...
error: NOT FOUND OR FAILED TO LOAD!
hp-check[3124]: info: :
hp-check[3124]: info: :Checking SIP version...
hp-check[3124]: info: :OK, Version 4.4.3 installed
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for CUPS...
error: Status: (Not available. CUPS may not be installed or not running.)
hp-check[3124]: info: :Version: 1.1.23
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for Reportlab...
warning: Not installed.
hp-check[3124]: info: :
hp-check[3124]: info: :----------------
hp-check[3124]: info: :| DEPENDENCIES |
hp-check[3124]: info: :----------------
hp-check[3124]: info: :
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: cups - Common Unix Printing System...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: cups-devel- Common Unix Printing System development files...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: gcc - GNU Project C and C++ Compiler...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: libcrypto - OpenSSL cryptographic library...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: libjpeg - JPEG library...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: libpthread - POSIX threads library...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: libtool - Library building support services...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: libusb - USB library...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: make - GNU make utility to maintain groups of programs...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: ppdev - Parallel port support kernel module....
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: PyQt - Qt interface for Python...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: python-devel - Python development files...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: Python 2.3 or greater - Required for fax functionality...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: Python 2.2 or greater - Python programming language...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: Reportlab - PDF library for Python...
warning: NOT FOUND! This is an OPTIONAL dependency. Some HPLIP functionality may not function properly.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: SANE - Scanning library...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: SANE - Scanning library development files...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: scanimage - Shell scanning program...
warning: NOT FOUND! This is an OPTIONAL dependency. Some HPLIP functionality may not function properly.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking for dependency: xsane - Graphical scanner frontend for SANE...
warning: NOT FOUND! This is an OPTIONAL dependency. Some HPLIP functionality may not function properly.
hp-check[3124]: info: :
hp-check[3124]: info: :
hp-check[3124]: info: :----------------------
hp-check[3124]: info: :| HPLIP INSTALLATION |
hp-check[3124]: info: :----------------------
hp-check[3124]: info: :
hp-check[3124]: info: :
hp-check[3124]: info: :Currently installed HPLIP version...
hp-check[3124]: info: :HPLIP 2.7.10 currently installed in '/usr/share/hplip'.
hp-check[3124]: info: :
hp-check[3124]: info: :Current contents of '/etc/hp/hplip.conf' file:
hp-check[3124]: info: :# hplip.conf. Generated from hplip.conf.in by configure.

[hpssd]
# Note: hpssd does not support dynamic ports
# Port 2207 is the IANA assigned port for hpssd
port=2207

[hplip]
version=2.7.10

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-2.7.10
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
foomatic=/usr/share/foomatic

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=no
pp-build=yes
gui-build=no
scanner-build=yes
fax-build=no
cups11-build=no
doc-build=yes
shadow-build=no
foomatic-xml-install=yes
foomatic-ppd-install=no
internal-tag=2.7.10.11

hp-check[3124]: info: :
hp-check[3124]: info: :----------------------
hp-check[3124]: info: :| INSTALLED PRINTERS |
hp-check[3124]: info: :----------------------
hp-check[3124]: info: :
hp-check[3124]: info: :
warning: No queues found.
hp-check[3124]: info: :
hp-check[3124]: info: :----------------------
hp-check[3124]: info: :| SANE CONFIGURATION |
hp-check[3124]: info: :----------------------
hp-check[3124]: info: :
hp-check[3124]: info: :'hpaio' in '/etc/sane.d/dll.conf'...
hp-check[3124]: info: :OK, found. SANE backend 'hpaio' is properly set up.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking output of 'scanimage -L'...
error: scanimage not found.
hp-check[3124]: info: :
hp-check[3124]: info: :---------------------
hp-check[3124]: info: :| PYTHON EXTENSIONS |
hp-check[3124]: info: :---------------------
hp-check[3124]: info: :
hp-check[3124]: info: :Checking 'cupsext' CUPS extension...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking 'pcardext' Photocard extension...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking 'hpmudext' I/O extension...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :Checking 'scanext' SANE scanning extension...
hp-check[3124]: info: :OK, found.
hp-check[3124]: info: :
hp-check[3124]: info: :
hp-check[3124]: info: :-----------------
hp-check[3124]: info: :| USB I/O SETUP |
hp-check[3124]: info: :-----------------
hp-check[3124]: info: :
hp-check[3124]: info: :
hp-check[3124]: info: :-----------
hp-check[3124]: info: :| SUMMARY |
hp-check[3124]: info: :-----------
hp-check[3124]: info: :
error: 12 errors and/or warnings.
hp-check[3124]: info: :
hp-check[3124]: info: :Please refer to the installation instructions at:
hp-check[3124]: info: :http://hplip.sourceforge.net/install/index.html

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Fergus M
Solved:
Last query:
Last reply:
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#1

At this point it doesn't look like your system is configured correctly for using hplip. You are missing a large number of dependency's required to make hplip function correctly. Also we try and get hplip to function on as many linux distro's however we haven't tested on openfiler 2.2/rpath linux so although in theory it should work, I can't say for sure and at this point it's unsupported.

You could try to resolve the dependency problems and you may have better luck.

Sorry I couldn't help more.

Revision history for this message
Fergus M (hplip-schartz) said :
#2

Hi... I will look into the missing deps further, but in the meantime.. I recompiled with more debugging info to examine the source of the error, and I found the following:

The first time hp-probe runs, the Device ID info seems to come back successfully from hpmud.c as evidenced from the debug log:

Nov 24 23:28:17 linuxbox python: io/hpmud/hpmud.c 526: [8237] hpmud_probe_devices() bus=2
Nov 24 23:28:17 linuxbox kernel: ppdev0: registered pardevice
Nov 24 23:28:17 linuxbox python: io/hpmud/pp.c 590: claimed pp fd=3
Nov 24 23:28:17 linuxbox python: io/hpmud/pp.c 639: read actual device_id successfully fd=3 len=96
Nov 24 23:28:17 linuxbox python: io/hpmud/pp.c 611: released pp fd=3
Nov 24 23:28:17 linuxbox kernel: ppdev0: unregistered pardevice
Nov 24 23:28:18 linuxbox python: io/hpmud/hpmud.c 341: [8237] hpmud_exit()

But then on the second attempt, this happens:

Nov 25 00:08:15 linuxbox python: io/hpmud/hpmud.c 336: [16655] hpmud_init()
Nov 25 00:08:16 linuxbox python: io/hpmud/hpmud.c 526: [16655] hpmud_probe_devices() bus=2
Nov 25 00:08:16 linuxbox python: io/hpmud/pp.c 594: claimed pp fd=3
Nov 25 00:08:16 linuxbox kernel: ppdev0: registered pardevice
Nov 25 00:08:16 linuxbox python: ParDevice::nibble_read failed: Input/output error
Nov 25 00:08:16 linuxbox python: io/hpmud/pp.c 643: read actual device_id successfully fd=3 len=0
Nov 25 00:08:16 linuxbox python: io/hpmud/pp.c 615: released pp fd=3
Nov 25 00:08:16 linuxbox python: hp-probe[16655]: warning: No devices found on the 'par' bus. If this isn't the result you are expecting,
Nov 25 00:08:16 linuxbox python: hp-probe[16655]: warning: check to make sure your devices are properly connected and powered on.
Nov 25 00:08:16 linuxbox python: io/hpmud/hpmud.c 341: [16655] hpmud_exit()
Nov 25 00:08:16 linuxbox kernel: ppdev0: unregistered pardevice

This time, the returned device id string is length 0 rather than 96. This is actually because nibble_read gets an input/output error on the IEEE1284_MODE_NIBBLE ioctl call to pprev. This seems to be due to -1 being returned by the parport_negotiate function in ieee1284.c in the parport driver, which imples a timeout waiting for a response for the device ID from the printer.

Does this throw any more light on things? I can't really see how any of the mising dependencies would affect a problem like this within the ppdev module.. but I'm open to suggestions.

Revision history for this message
David Suffield (david-suffield) said :
#3

Lets remove hp-probe from the test. Does the "hp" backend discovery work repeatedly? Run the following command.

$ /usr/lib/cups/backend/hp

You should see the hp:/par/... URI everytime.

-dave

Revision history for this message
Fergus M (hplip-schartz) said :
#4

Same thing. Restart machine.. restart printer.. then:

$ /usr/lib/cups/backend/hp
direct hp:/par/OfficeJet_Series_700?device=/dev/parport0 "HP OfficeJet Series 700" "HP OfficeJet Series 700 LPT parport0 HPLIP" "MFG:Hewlett-Packard;MDL:OfficeJet Series 700;CMD:MLC,PCL,PML;CLASS:PRINTER;REV:4.00c;STATUS:000;"
$ /usr/lib/cups/backend/hp
direct hp "Unknown" "HP Printer (HPLIP)"

The debug log for the first attempt shows:

Nov 26 18:12:14 linuxbox hp: io/hpmud/hpmud.c 336: [2635] hpmud_init()
Nov 26 18:12:14 linuxbox hp: io/hpmud/hpmud.c 526: [2635] hpmud_probe_devices() bus=3
Nov 26 18:12:14 linuxbox hp: io/hpmud/pp.c 594: claimed pp fd=4
Nov 26 18:12:14 linuxbox hp: io/hpmud/pp.c 643: read actual device_id successfully fd=4 len=96
Nov 26 18:12:14 linuxbox kernel: ppdev0: registered pardevice
Nov 26 18:12:14 linuxbox hp: io/hpmud/pp.c 615: released pp fd=4
Nov 26 18:12:14 linuxbox hp: io/hpmud/hpmud.c 341: [2635] hpmud_exit()
Nov 26 18:12:14 linuxbox kernel: ppdev0: unregistered pardevice

And the second time:

Nov 26 18:12:26 linuxbox hp: io/hpmud/hpmud.c 336: [2636] hpmud_init()
Nov 26 18:12:26 linuxbox hp: io/hpmud/hpmud.c 526: [2636] hpmud_probe_devices() bus=3
Nov 26 18:12:26 linuxbox hp: io/hpmud/pp.c 594: claimed pp fd=4
Nov 26 18:12:26 linuxbox kernel: ppdev0: registered pardevice
Nov 26 18:12:26 linuxbox hp: ParDevice::nibble_read failed: Input/output error
Nov 26 18:12:26 linuxbox hp: io/hpmud/pp.c 643: read actual device_id successfully fd=4 len=0
Nov 26 18:12:26 linuxbox hp: io/hpmud/pp.c 615: released pp fd=4
Nov 26 18:12:26 linuxbox hp: io/hpmud/hpmud.c 341: [2636] hpmud_exit()

Revision history for this message
David Suffield (david-suffield) said :
#5

Ok now I understand the syslog "ParDevice" message. You enabled the old message in pp.c.

This is helpful, but sorry I have no answer to your problem. Apparently this is a ppdev/parport issue with your hardware. Ppdev cannot negotiate nibble mode for device-id after the second probe.

-dave

Revision history for this message
Fergus M (hplip-schartz) said :
#6

Thanks for the response. I'm thinking this much be something to do with the printer or cable. I installed the printer and cable on a completely different machine running Fedora Core 6, and got exactly the same behavior (detects first time only, works again only after cycling power on the printer).

The thing is, scanning works with the printer and cable when running with a Windows machine.

Here's the hp-check output for the other machine:

# hp-check

HP Linux Imaging and Printing System (ver. 1.7.2)
Dependency/Version Check Utility ver. 5.3

Copyright (c) 2003-6 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.

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

Basic system information:
Linux linuxbox 2.6.22.9-61.fc6 #1 SMP Thu Sep 27 18:48:03 EDT 2007 i686 i686 i386 GNU/Linux

Detected distro (/etc/issue):
fedora 6

Detected distro (lsb_release):
FedoraCore 6 (Zod)

Currently installed HPLIP version...
HPLIP 1.7.2 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf

[hpiod]
# port=0 (dynamic IP port)
port=2208
[hpssd]
# port=0 (dynamic IP port)
port=2207

[hplip]
version=1.7.2
jdprobe=0

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/foomatic/db/source/PPD/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-1.7.2

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=1
pp-build=1
gui-build=1
scanner-build=1
fax-build=1
installinitd=
chkconfig=/sbin/chkconfig
internal-tag=1.7.2.22

HPLIP running?
Yes, HPLIP is running (OK).

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.4.4 installed

Checking PyQt version...
OK, version 3.17 installed.

Checking SIP version...
OK, Version 4.5 installed

----------------
| DEPENDENCIES |
----------------

Checking for dependency libcrypto - OpenSSL cryptographic library...
OK, found.

Checking for dependency gcc - GNU Project C and C++ Compiler...
OK, found.

Checking for dependency SANE - Scanning library...
OK, found.

Checking for dependency GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency libjpeg - JPEG library...
OK, found.

Checking for dependency libpthread - POSIX threads library...
OK, found.

Checking for dependency make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency python-devel - Python development files...
error: Not found!
error: This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.

Checking for dependency Reportlab - PDF library for Python...
error: Not found!
This is an OPTIONAL dependency. Some HPLIP functionality may not function properly.

Checking for dependency PyQt - Qt interface for Python...
OK, found.

Checking for dependency cups-devel- Common Unix Printing System development files...
OK, found.

Checking for dependency ppdev - Parallel port support kernel module....
OK, found.

Checking for dependency libusb - USB library...
OK, found.

Checking for dependency scanimage - Shell scanning program...
OK, found.

Checking for dependency libnetsnmp-devel - SNMP networking library development files...
error: Not found!
error: This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.

Checking for dependency Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency LSB - Linux Standard Base support...
OK, found.

Checking for dependency xsane - Graphical scanner frontend for SANE...
OK, found.

Checking for dependency cups - Common Unix Printing System...
OK, found.

Checking for dependency Python 2.3 or greater - Required for fax functionality...
OK, found.

----------------------
| INSTALLED PRINTERS |
----------------------

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'...
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#7

Are you able to use the cups parallel backend to print okay?

A

Revision history for this message
Fergus M (hplip-schartz) said :
#8

Hi.. cups was also failing once a print job was started, with 'restarting in 30 seconds' status messages.
I also noted I could repeatedly print pages after restarting the printer by using echo -en '\rtest\r\f' >/dev/lp0
until a did a probe for the device. After getting the initial successful probe response, further attempts to echo to /dev/lp0 failed, and the error log showed a kernel: lp0 offline message.

Then I took a closer look at the parallel cable and found on the printer (centronics) end, some dirt had got trapped on the contacts within the socket on the printer. After cleaning this, the printer now successfully responds to probes every time, and printing via cups is working fine.

Unfortunately the scanning still isn't working though.. I am getting a Device busy message from hp-scan, or Device I/O Errors from scanimage. However, I am going to post this as a different question.