[sane-devel] Re: Sane-devel digest, Vol 1 #503 - 1 msg

Jeffery C. May JeffMay@earthlink.net
28 Jun 2003 13:38:10 -0400

On Sat, 2003-06-28 at 09:26, Christoffer Kjlbk wrote:
> Hey
> I have a Canon LiDe30, wich shuold be supported by sane
> And if I run sane-find-scanner, it finds the scanner at /dev/usb/scanner0
> But, Xsane says, that there is no devices available, why?
> Kind regards - and thanks in adance
> Christoffer Kjlbk

I'm having the similar (but not identical) difficulty with a Benq (Acer)
3300U that worked perfectly under Red Hat 7.1.  After upgrading to Red
Hat 9.0 and the latest SANE packages (compiled, not Red Hat packages) I
get the following behavior:

Looking in /proc/bus/usb/devices I find:
===================begin /proc/bus/usb/devices listing=============
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs=  1
P:  Vendor=04a5 ProdID=20b0 Rev= 1.00
S:  Manufacturer=Color
S:  Product= FlatbedScanner 22
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbscanner
===================end /proc/bus/usb/devices listing===============

So the scanner is seen by the kernel and the usbfs system.

===================begin sane-find-scanner output==================
 # No SCSI scanners found. If you expected something different, make
sure that
  # you have loaded a SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a5, product=0x20b0) at /dev/usb/scanner0
found USB scanner (vendor=0x04a5, product=0x20b0) at libusb:001:003
  # Your USB scanner was (probably) detected. It may or may not be
supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Scanners connected to the parallel port or other proprietary ports
can't be
  # detected by this program.

  # You may want to run this program as root to find all devices. Once
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.
===================end sane-find-scanner output====================

Okay, sane-find-scanner sees it.

===================begin scanimage -L output==================
device `snapscan:/dev/usb/scanner0' is a Acer FlatbedScanner22 flatbed
===================end scanimage -L output====================

Okay, so scanimage says it's there.

According to the Sourceforge page (http://snapscan.sourceforge.net/),
the Acer/Benq 3300 uses either the "u222v067.bin" or "u176v046.bin"
firmware files. Looking at the CD that came with the scanner I find the
first one (u222v067.bin), but not the second one:

===================begin listing of CD firmware==================
===================end listing of CD firmware====================

I copied the "u222v67.bin" file to /etc/sane.d/firmware/Benq_3300U and
modified the /etc/sane.d/snapscan.conf file as shown below:

===================begin /etc/sane.d/snapscan.conf================
#------------------------------ General

# Change to the fully qualified filename of your firmware file, if
# firmware upload is needed by the scanner
 firmware /etc/sane.d/firmware/Benq_3300U/u222v067.bin

# If not automatically found you may manually specify a device name.

# For USB scanners also specify bus=usb, e.g.
# /dev/usb/scanner0 bus=usb

# For SCSI scanners specify the generic device, e.g. /dev/sg0 on Linux.
# /dev/sg0

# No changes should be necessary below this line

#-------------------------- SCSI scanners
# These SCSI devices will be probed automatically
scsi AGFA * Scanner
scsi COLOR * Scanner
scsi Color * Scanner
scsi ACERPERI * Scanner

#--------------------------- USB scanners
# These USB devices will be probed automatically
# (This will currently work only on Linux)

# Benq/Acer/Vuego 320U
usb 0x04a5 0x2022

# Benq/Acer/Vuego 620U / 620UT
usb 0x04a5 0x1a2a
usb 0x04a5 0x2040

# Benq/Acer/Vuego 640U
usb 0x04a5 0x2060

# Benq/Acer/Vuego 640BU
usb 0x04a5 0x207e

# Benq/Acer/Vuego 1240U
usb 0x04a5 0x20c0

# Benq/Acer/Vuego 3300 / 4300
usb 0x04a5 0x20b0

# Benq/Acer/Vuego 4300
usb 0x04a5 0x20de

# Benq/Acer/Vuego 5000
usb 0x04a5 0x20fc

# Benq/Acer/Vuego 5300
usb 0x04a5 0x20fe

# Agfa 1236U
usb 0x06bd 0x0002

# Agfa 1212U
usb 0x06bd 0x0001
usb 0x06bd 0x2061

# Agfa Snapscan e10
usb 0x06bd 0x2093

# Agfa Snapscan e20
usb 0x06bd 0x2091

# Agfa Snapscan e25
usb 0x06bd 0x2095

# Agfa Snapscan e26
usb 0x06bd 0x2097

# Agfa Snapscan e40
usb 0x06bd 0x208d

# Agfa Snapscan e42
usb 0x06bd 0x20ff

# Agfa Snapscan e50
usb 0x06bd 0x208f

# Agfa Snapscan e52
usb 0x06bd 0x20fd
===================end /etc/sane.d/snapscan.conf==================

If I run Xsane  at this point it hangs.  

Setting SANE_DEBUG_SNAPSCAN=255 and running scanimage I get the
following messages:

===================begin scanimage debug================
[sanei_debug] Setting debug level of snapscan to 255.
[snapscan] sane_snapscan_init
[snapscan] sane_snapscan_init: Snapscan backend version 1.4.26
[snapscan] add_usb_device(/dev/usb/scanner0)
[snapscan] add_usb_device: Detected (kind of) an  USB device
[snapscan] snapscani_usb_open(/dev/usb/scanner0)
[snapscan] add_usb_device: Checking if 0x04a5 is a supported USB vendor
[snapscan] snapscani_check_device()
[snapscan] mini_inquiry
[snapscan] snapscan_cmd
[snapscan] snapscan_usb_cmd(0,0xbfffc3c0,6,0xbfffc390,0xbfffc38c (36))
[snapscan] atomic_usb_cmd(0,0xbfffc3c0,6,0xbfffc390,0xbfffc38c (36))
[snapscan] usb_cmd(0,0xbfffc3c0,6,0xbfffc390,0xbfffc38c (36))
[snapscan] usb_cmd: cmdlen=6, datalen=0
[snapscan] usb_write: writing: 0x12 0x00 0x00 0x00 0x24 0x00
[snapscan] usb_write: Only 0 bytes written
[snapscan] mini_inquiry: snapscan_cmd command failed: error during
device I/O
[snapscan] snapscani_check_device: mini_inquiry failed with Error during
device I/O
[snapscan] snapscani_usb_close(0)
[snapscan] add_usb_device(libusb:001:003)
[snapscan] add_usb_device: Detected (kind of) an USB device
[snapscan] snapscani_usb_open(libusb:001:003)
[snapscan] add_usb_device: error opening device libusb:001:003: Access
to resource has been denied
[snapscan] sane_snapscan_get_devices (0xbfffd5d8, 0)
scanimage: no SANE devices found
[snapscan] sane_snapscan_exit
===================end scanimage debug==================

Libusb is something new that Red Hat 7.1 didn't have. Any clues as to
what I'm missing?  I'm sure it's something simple.