Bug 124180

Summary: xsane identifies but fails to work with HP scanjet 6200C USB flatbed scanner
Product: [Fedora] Fedora Reporter: Matthew Bandy <bugzilla>
Component: sane-backendsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: armijn, rlocke
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-28 09:33:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch for sane-backends 1.0.13, ripped from SANE CVS, has some issues though... none

Description Matthew Bandy 2004-05-24 16:31:29 UTC
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
scanner"
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
scanner
[inti@atacama] scanimage
scanimage: unable to determine option count

Comment 1 Tim Waugh 2004-05-24 16:45:35 UTC
Does switching the scanner off and then on help?

Comment 2 Matthew Bandy 2004-05-24 17:04:49 UTC
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.
http://www.fedoraforum.org/forum/showthread.php?s=&threadid=2270

Also, I found a report of something similar in the fedora test list
archives. Again, no solution.
http://www.redhat.com/archives/fedora-test-list/2004-March/msg00949.html

Thanks for responding so quickly!

Matt

Comment 3 Thijs van der Vossen 2004-05-27 14:32:46 UTC
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 15:26:29 UTC
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 16:29:23 UTC
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 17:21:10 UTC
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 17:50:28 UTC
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 18:34:32 UTC
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>

	* 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. 

Matt

Comment 9 Armijn Hemel 2004-06-02 18:35:28 UTC
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 18:36:17 UTC
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 18:49:28 UTC
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 22:19:02 UTC
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 14:37:33 UTC
Problem Comment #4 is solved by patch from Comment #13. Scanner
HP6300C by USB work OK.

Comment 14 Armijn Hemel 2004-06-03 17:32:48 UTC
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-08 00:25:34 UTC
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 15:17:37 UTC
So is it okay to close this as RAWHIDE now?