Bug 124180 - xsane identifies but fails to work with HP scanjet 6200C USB flatbed scanner
xsane identifies but fails to work with HP scanjet 6200C USB flatbed scanner
Product: Fedora
Classification: Fedora
Component: sane-backends (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2004-05-24 12:31 EDT by Matthew Bandy
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-28 05:33:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for sane-backends 1.0.13, ripped from SANE CVS, has some issues though... (10.68 KB, patch)
2004-06-02 14:36 EDT, Armijn Hemel
no flags Details | Diff

  None (edit)
Description Matthew Bandy 2004-05-24 12:31:29 EDT
Description of problem:
scanimage, both command line and x clients, fail to communicate with
the scanner after having correctly identified it. This is probably a
bug in the hp libusb sane backend. 

The scanner is a Hewlett Packard ScanJet 6200C. It worked in Fedora
Core 1 with no difficulties on the same hardware. This bug appeared
immediately folowing upgrade to FC2.

I have reports that the same scanner will work when attached with a
SCSI cable. Since I don't have a SCSI controller on my machine,
however, I can't test this.

Version-Release number of selected component (if applicable):
xsane 0.92-10, kernel 2.6.5-1.358, libusb 0.1.8-2.1

How reproducible:
Always, every time.

Steps to Reproduce:
1."scanimage -L" identifies scanner correctly
"device `hp:libusb:001:002' is a Hewlett-Packard ScanJet 62x0C flatbed
2."scanimage" fails
"scanimage: unable to determine option count"
Actual results:
scanimage fails, after having correctly identified the scanner

Expected results:
scanimage should have directed .pnm data to STDOUT

Additional info:
Typical session follows - 

[inti@atacama] scanimage -L
device `hp:libusb:001:002' is a Hewlett-Packard ScanJet 62x0C flatbed
[inti@atacama] scanimage
scanimage: unable to determine option count
Comment 1 Tim Waugh 2004-05-24 12:45:35 EDT
Does switching the scanner off and then on help?
Comment 2 Matthew Bandy 2004-05-24 13:04:49 EDT
No, it's not that easy, unfortunately. The problem persists.
Unplugging it and plugging it back in produces the following error.

[inti@atacama] tail /var/log/messages
May 24 09:55:11 localhost kernel: usb 1-1: new full speed USB device
using address 3
May 24 09:55:20 localhost kernel: usb 1-1: control timeout on ep0out

By the way, this same bug seems to have been reported in th fedora
forum, though there is no fix there, or even a real diagnosis.

Also, I found a report of something similar in the fedora test list
archives. Again, no solution.

Thanks for responding so quickly!

Comment 3 Thijs van der Vossen 2004-05-27 10:32:46 EDT
Same problem here. XSane responds _very_ slow and outputs a 'Failed to
start scanner. End of file reached' message after 5-10 minutes.
Comment 4 Rudolf Ulc 2004-05-31 11:26:29 EDT
Same problem here. The scanner is a Hewlett Packard ScanJet 6300C.
Xsane fail to communicate with the scanner after having correctly
identified it. Xsane responds Error during read: Error during device I/O.
Comment 5 Armijn Hemel 2004-06-02 12:29:23 EDT
The same thing with a ScanJet 5200C (worked fine on FC1). I get a
"Error during read: Error during device I/O." and the following shows
up in /var/log/messages:

Jun  2 18:22:42 phaal kernel: usbfs: USBDEVFS_BULK failed dev 4 ep
0x81 len 4096 ret -108
Comment 6 Armijn Hemel 2004-06-02 13:21:10 EDT
I just tried the latest version of sane-backends from the SANE CVS
repository and got it working. This problem seems to be have been
fixed there about two months ago. At least I can scan again with my
5200C, but I would definitely appreciate an update in RPM format so I
can install it on more machines:D
Comment 7 Tim Waugh 2004-06-02 13:50:28 EDT
Excellent news that this is fixed in CVS.

But we're obviously not going to ship a random CVS snapshot. :-)  See
if you can look through the changelog to identify the particular
change that fixed the problem.  I'm afraid I don't have the hardware
to do testing myself.
Comment 8 Matthew Bandy 2004-06-02 14:34:32 EDT
Apparently we are dealing with several bugs. Armijn's error messages
were different from the ones I was getting. I just compiled the latest
sane-backends cvs source and tried it, with exactly the same results
as described in the original bug report. So either the bug is not in
sane-backends, or it has not yet been fixed there.

The relevant line from the sane-backends 1.0.14 changelog is:

2004-03-27  Peter Kirchgessner <peter@kirchgessner.net>

	* backend/hp.c, hp-scl.c, hp.h, doc/sane-hp.man,
	  doc-descriptions/hp.desc: Fix problem with USB-connections
	  on Linux 2.6.x. Add environment SANE_HP_KEPPOPEN... and
	  don't close connections for USB.

However, again, this has not fixed the bug I reported here, though
apparently it fixed the problem Armijn was having. 

Comment 9 Armijn Hemel 2004-06-02 14:35:28 EDT
OK, I grabbed a few files from the SANE CVS that were marked with
"Keep USB-connection open (was problem with Linux 2.6.x)", patched the
sane-backends-1.0.13 tarball, rebuilt the RPM, installed it. It
worked, but scanimage doesn't see my scanner anymore.

It might actually be better to make an RPM for 1.0.14 (released a
month ago, with this fix) and release that instead of patching 1.0.13
(right?). Anyway, I will attach a patch anyway...
Comment 10 Armijn Hemel 2004-06-02 14:36:17 EDT
Created attachment 100801 [details]
patch for sane-backends 1.0.13, ripped from SANE CVS, has some issues though...
Comment 11 Armijn Hemel 2004-06-02 14:49:28 EDT
Hmm, forget what I said about scanimage, because it works just fine
now, probably some PEBKAC on my side. If these are two different bugs,
I guess this report should be split?
Comment 12 Tim Waugh 2004-06-02 18:19:02 EDT
Yes, ideally: one bug per report. :-)

To be honest it had slipped my noticed that sane-backends-1.0.14 had
been released.  I'll update rawhide so we can give it some testing,
and it's certainly the kind of package that a update could be done for
without too much trouble.
Comment 13 Rudolf Ulc 2004-06-03 10:37:33 EDT
Problem Comment #4 is solved by patch from Comment #13. Scanner
HP6300C by USB work OK.
Comment 14 Armijn Hemel 2004-06-03 13:32:48 EDT
Hmm, that's weird as I can make previews now, but sometimes I can't
scan, especially after waiting a little while between making a preview
and the final scan (a few minutes), I get timeouts and can't make
previews anymore, unless I disconnect the scanner and turn it off. I
used the patch I submitted earlier. So, *be warned* if you want to use
the patch and it's best to wait for an official update!
Comment 15 Robert Locke 2004-06-07 20:25:34 EDT
I am having the same problem as described in Comment #4 on an HP 6350
attached via USB.  I found the packages:
sane-backends-1.0.14-1.i386.rpm   xsane-0.92-11.i386.rpm
sane-frontends-1.0.12-1.i386.rpm  xsane-gimp-0.92-11.i386.rpm
under the development tree and wanted to report that they seem to have
resolved the problem for me under FC2.  I have scanned the needed four
pages to "Save" as tiff under xsane....
Comment 16 Tim Waugh 2004-06-24 11:17:37 EDT
So is it okay to close this as RAWHIDE now?

Note You need to log in before you can comment on or make changes to this bug.