[sane-devel] Yet another mail about libusb and scanner ;-)

syrius.ml@no-log.org syrius.ml@no-log.org
Tue, 20 Apr 2004 18:02:51 +0200


Hi,

I'm trying to get my HP 4300C working.
For that I'm using sane + the niash external backend.
niash is compiled to work with libusb.

here are some informations:

debian sid + 2.6.5-mm6 kernel
libsane is 1.0.13
libusb is 0.1.8

(atm all commands are run as root)

After a fresh boot lsusb does not see the scanner.
But it's present in /proc/bus/usb/device:
 T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=12  MxCh= 0
 D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
 P:  Vendor=03f0 ProdID=0305 Rev= 0.00
 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 48mA
 I:  If#= 0 Alt= 0 #EPs= 3 Cls=10(unk. ) Sub=01 Prot=00 Driver=(none)
 E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
 E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
 E:  Ad=83(I) Atr=03(Int.) MxPS=   1 Ivl=8ms

After running 'scanimage -h', lsusb sees the scanner:
 Bus 002 Device 005: ID 03f0:0305 Hewlett-Packard ScanJet 4300c

the result of scanimage is:
 scanimage: open of device niash:libusb:002:005 failed: Device busy
 List of available devices:
    niash:libusb:002:005

when i strace it, it shows:
 ioctl(6, USBDEVFS_SETCONFIGURATION, 0xbfffead4) = -1 EPROTO (Protocol
 error)
and it doesn't produce a kernel error.

running testtool (correctly compiled for libusb):
 # ./testtool
  No NIASH chipset found!
  _ProbeRegisters failed!

stracing it shows a lot of:
 21141 ioctl(4, USBDEVFS_CONTROL, 0xbffffa70) = -1 EPROTO (Protocol
 error)

it does produce kernel errors:
 usbfs: USBDEVFS_CONTROL failed cmd testtool dev 5 rqt 64 rq 12 len 1
 ret -71
 usbfs: USBDEVFS_CONTROL failed cmd testtool dev 5 rqt 192 rq 12 len 1
 ret -71

result of a 'SANE_DEBUG_SANEI_USB=255 scanimage -h' :
 [sanei_usb] sanei_usb_open: trying to open device `libusb:002:005'
 USB error: could not set config 1: Protocol error
 [sanei_usb] sanei_usb_open: libusb complained: could not set config 1:
  Protocol error
 scanimage: open of device niash:libusb:002:005 failed: Device busy

Any advice ?

TIA

--