[#313394] HP5370C ScanJet XPA (transparency adapter) hangs

View Trackers | Bugs | Export CSV

2011-10-21 18:57
Submitted by:
Graham Roberts (grahamroberts-guest)
Assigned to:
Mike Kelly (mikek-guest)
backends (drivers)
HP5370C ScanJet XPA (transparency adapter) hangs

Detailed description
My HP5370C scans images successfully using sane-avision under Ubuntu 11.10 (Oneiric Ocelot). However, attempting to use the ScanJet XPA transparency lighting attachment causes a problem. On requesting a scan, the scanner moves to the correct position for the transparency adapter, performs its calibration shuffle (or whatever its initial small movement is), but then makes no further movement apart from a few imperceptible advances evidenced by motor noise. After a while, an error window "Error during read: Error during device I/O" is displayed, and the scanner flashes its lamp with what I presume is an error code of five rapid flashes, pause, then repeat.

The same scanner and XPA works faultlessly under Windows XP (and, as noted above, produces document scan faultlessly under Ubuntu) so I am guessing it's not a faulty device.

Hardware is a Sony Vaio VPCYA1V9E laptop (Intel® Core™ i3 CPU U 380 @ 1.33GHz × 4 ).

I am a Linux novice. I couldn't create an edit log using "env SANE_DEBUG_AVISION=7 saneimage > scan.pnm 2> debug.log" as requested in the Avision backend web page (the bash reports "scan.pnm: permission denied")... i am not sure how to fix this.

Any help much appreciated, since the scanner works well in spite of being ten years old.

sane-find-scanner and scanimage -L outputs appended, as well as a sample scanned document to prove it works :-)


Followups: Sort comments antichronologically

Date: 2012-03-25 23:19
Sender: Mike Kelly

So the good news is that I've submitted a patch for this scanner which may fix your problems. You'll have to download and compile the latest version of the sane-backends source code from the git repository.

If that doesn't work, you'll have to send me the log file. I suspect that the reason that the command didn't work for you is that you were not in your home directory.
Date: 2012-04-08 20:41
Sender: Graham Roberts

Mike, thanks for the patch. I tried to install it but all I succeeded in doing was breaking the working 1.0.22 installation and, in spite of trying many times, I can't get it to work again. sane-find-scanner can see the scanner, but scanimage -L cannot. I don't have enough Linux skills to be confident in what I'm doing... basically this:

cd ~/workspace/sane/sane-backends
sudo make uninstall
sudo apt-get remove xsane
sudo apt-get remove libsane
sudo find / -name libsane* -print
# then remove any remaining libsane files manually
# now ready for clean installation
sudo apt-get install libsane
sudo apt-get install xsane
git clone git://
cd sane-backends/
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
# I understand this is correct for Ubuntu 11.10
sudo make install
# reports: found USB scanner (vendor=0x03f0 [Hewlett Packard], product=0x0701 [Hewlett Packard ScanJet 5300C/5370C ]) at libusb:002:008
scanimage -V
# reports: scanimage (sane-backends) 1.0.23git; backend version 1.0.23
scanimage -L
# hangs for about five minutes then gives up on the scanner, finds and reports my laptop's camera, and finishes

xsane also cannot see the scanner (hangs waiting)
I have also downloaded the latest sane-backends-d723944 from git (using http) when trying to use your patch, but get the same results as above.

The scanner is not faulty (works with Windows XP).

Any suggestions?
Date: 2012-04-12 04:29
Sender: Mike Kelly

Hi Graham,

I do a lot of test compiles on Ubuntu. I don't mess with the Ubuntu
installation. Instead I install into my home directory. I compile with:

./configure --prefix=/home/mike/sane ; make ; make install

This creates a directory in my home directory from which to do testing. I
make sure I run all commands with their full path names to be sure I'm using my test version instead of the system's version. For example:


/home/mike/sane/bin/scanimage -L

If I want to generate a log file, I can run:

env SANE_DEBUG_AVISION=7 /home/mike/sane/bin/scanimage > scan.pnm 2> debug.log

If sane-find-scanner says "libusb:002:008", you should add the "-d" option:

/home/mike/sane/bin/scanimage -d avision:libusb:002:008

Keep in mind that this device name may change if you turn off or disconnect your scanner, or if you reboot your computer.

When testing the transparency adaptor, you'll want to use the "--source" option:

/home/mike/sane/bin/scanimage --source=Transparency

You can combine all of this to send me logs:

env SANE_DEBUG_AVISION=7 /home/mike/sane/bin/scanimage -d avision:libusb:002:008 --source=Transparency > scan.pnm 2> debug.log
Date: 2012-04-22 11:02
Sender: Graham Roberts

Hi Mike, thanks very much for these hints. I was successful in producing a log file - the patch doesn't seem to have fixed scanning with the transparency adapter, same behaviour as before (ends up flashing its light five times, pause, repeat indefinitely). scanimage hangs until I yank the power cord on the scanner. See file debug.log Scanning normally works though.

For info, I was not able to use the -d avision:lib:002:0xx option, even though the scanner address was reported by ./sane-fine-scanner. Scanimage reports an error, see debug.log.doption

Subsequent to making the logs, I screwed up my Ubuntu GUI (my own fault), and can only get in via recovery mode until I get help from someone more knowledgeable tomorrow. I transferred the files to a USB key and am sending them to you from a Windows machine. Looking at them on Windows with Notepad, the line feeds are removed... hope they survived the trasnfer and are still present when you view them on Linux. If not, let me know and I'll resend once (I hope!) my Ubuntu GUI is back working.

thanks and best regards

Attached Files:

Size Name Date By Download
19 KiBreport.txt2011-10-21 18:57grahamroberts-guestreport.txt
224 KiBtest-1.jpg2011-10-21 18:57grahamroberts-guesttest-1.jpg
213 bytesdebug.log.doption2012-04-22 11:02grahamroberts-guestdebug.log.doption
41 KiBdebug.log2012-04-22 11:02grahamroberts-guestdebug.log


Field Old Value Date By
File Added4775: debug.log.doption2012-04-22 11:02grahamroberts-guest
File Added4776: debug.log2012-04-22 11:02grahamroberts-guest
assigned_tonone2011-10-21 19:07kitno-guest
File Added4570: report.txt2011-10-21 18:57grahamroberts-guest
File Added4571: test-1.jpg2011-10-21 18:57grahamroberts-guest
Powered By FusionForge