Bug 129957

Summary: Acer/Benq USB scanner not working
Product: [openSUSE] SUSE Linux 10.1 Reporter: Alexander Lavrinenko <lavrinenko_alex>
Component: OtherAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Alpha 1   
Target Milestone: ---   
Hardware: x86   
OS: Linux   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Debug log according to given howto

Description Alexander Lavrinenko 2005-10-21 12:04:34 UTC
Hello,  
  
I have got Acer S2W 3300U/4300U USB scanner. Here's lsusb output:  
Bus 001 Device 013: ID 04a5:20b0 Acer Peripherals Inc. (now BenQ Corp.) S2W  
3300U/4300U  
  
I configured it with yast, and it informed me of firmware download. I googled  
for firmware for my type and found that it is U222V067.BIN which I downloaded  
from Acer site to /etc/sane.d/ directory. then I  
edited /etc/sane.d/snapscan.conf to read:  
firmware /etc/sane.d/U222V067.BIN  
  
Now the problem:  
After I power on scanner, sane-find-scanner and scanimage -L show me the  
following:  
swordfish:/etc/sane.d # sane-find-scanner  
found USB scanner (vendor=0x04a5 [Color], product=0x20b0 [ FlatbedScanner 22])  
at libusb:001:013  
swordfish:/etc/sane.d # scanimage -L  
device `snapscan:libusb:001:013' is a Acer FlatbedScanner22 flatbed scanner  
swordfish:/etc/sane.d # lsusb  
Bus 001 Device 013: ID 04a5:20b0 Acer Peripherals Inc. (now BenQ Corp.) S2W  
3300U/4300U  
  
When I start Kooka or xsane, both applications take a while and after report  
that no scanner found. After that if I run sane-find-scanner and scanimage -L  
I get the following:  
swordfish:/etc/sane.d # sane-find-scanner  
found USB scanner (vendor=0x04a5, product=0x20b0) at libusb:001:013  
swordfish:/etc/sane.d # 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).  
swordfish:/etc/sane.d # lsusb  
Bus 001 Device 013: ID 04a5:20b0 Acer Peripherals Inc. (now BenQ Corp.) S2W  
3300U/4300U  
 
In both cases rcsane-dev start gives the following: 
swordfish:/etc/sane.d # rcsane-dev start 
Searching for configured scanners in SANE.... 
No scanner device files found.                                        done 
swordfish:/etc/sane.d # 
 
Please help getting scanner work :(
Comment 1 Johannes Meixner 2005-10-21 13:03:46 UTC
You reported a problem for Suse Linux 10.1 alpha1.
Did it work for Suse Linux 10.0 (or 9.3)?
How did you install 10.1?
Was it a new installation from scratch
or a complete update from which previous version
or only a partial update of which exact packages?

See
http://portal.suse.com/sdb/en/2004/10/jsmeix_scanner-setup-92.html
"Trouble-Shooting (Debugging)"
and attach the different debug outputs as different plain text
attachments to this bug.
Comment 2 Alexander Lavrinenko 2005-10-23 20:16:18 UTC
This was new install at the PC which had never had before Linux on it. This scanner works well in windows with drivers available from ftp.acer.ru. Right now I don't have access to hardware, I will post debug outputs tomorrow.
Comment 3 Alexander Lavrinenko 2005-10-24 08:22:01 UTC
Created attachment 55174 [details]
Debug log according to given howto
Comment 4 Johannes Meixner 2005-10-24 10:20:25 UTC
Next time please read the instructions more carefully:
export SANE_DEBUG_backend=128
is useless.

Regardless of the missing log for the backend, it is no problem
in the SANE software but a USB problem because for some time
USB I/O works but then for an unknown reason there is a USB I/O
error and "sanei_usb" reports:
--------------------------------------------------------------------
[sanei_usb] sanei_usb_read_bulk: trying to read 8 bytes
[sanei_usb] sanei_usb_read_bulk: read failed:
                                 Resource temporarily unavailable
scanimage: open of device snapscan:libusb:001:018 failed:
           Error during device I/O
--------------------------------------------------------------------

The matching source code in sanei/sanei_usb.c is:
---------------------------------------------------------------------------
sanei_usb_read_bulk
...
  if (read_size < 0)
    {
      DBG (1, "sanei_usb_read_bulk: read failed: %s\n", strerror (errno));
---------------------------------------------------------------------------

I don't know why EAGAIN (i.e. "Resource temporarily unavailable")
happens on your system.
What is worse is that a subsequent try doesn't work for you
i.e. in your case the resource has become permanently unavailable.

Only a guess:
The error happens after sanei_usb_write_bulk successfully wrote
30246 bytes.
I assume this is the firmware which is uploaded to your scanner.
It seems after the firmware upload your scanner has become unavailable.

Are you sure that you use the exact right firmware for your scanner?
Note that we cannot help you here because we don't have such a scanner.

Try the following:

A)
Use the scanner under Windows (i.e. scan something).
This will make sure that the Windows driver uploads the firmware.
Keep the scanner switched on and boot Linux.
Change /etc/sane.d/snapscan.conf not to upload any firmware.
Do the above test (scanimage -d snapscan:libusb:xxx:yyy -T).

B)
Switch the scanner and the comuter completely off the power
(i.e. disconnect any power supply).
This should make sure that both the scanner and the USB hardware
are in a clean state.
Boot Linux.
Change /etc/sane.d/snapscan.conf to upload the firmware.
Do the above test (scanimage -d snapscan:libusb:xxx:yyy -T).
Comment 5 Alexander Lavrinenko 2005-11-09 08:17:56 UTC
Well, seems that ths piece of hardware works very unreliable. I'm closing this ticket - it sometimes works, and tends to fail most of time even under Win.