[sane-devel] Sane backend sm3600 do not working

su.petr@seznam.cz su.petr@seznam.cz
Sat, 30 Apr 2005 04:18:52 +0200


SuSE Linux 9.3 Professional x86_64 (64 bit)
kernel 2.6.11.4 (x86_64)
libusb-0.1.so.4.4.0 (libusb version 0.1.8)
libsane.so.1.0.15 (sane version 1.0.15)
Microtek ScanMaker 3600 (vendor=0x05da product=0x40ca)
(Genius WebCam Web V4 (vendor=0458 product=700f))

"cat /proc/bus/usb/devices"
---cut here---
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh=10
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.11.4-20a-default ohci_hcd
S:  Product=OHCI Host Controller
S:  SerialNumber=0000:00:02.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=08 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0458 ProdID=700f Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=160mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=01(Isoc) MxPS= 128 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=01(Isoc) MxPS= 192 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=01(Isoc) MxPS= 256 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=01(Isoc) MxPS= 384 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=01(Isoc) MxPS= 512 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 6 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=01(Isoc) MxPS= 768 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 7 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=01(Isoc) MxPS=1023 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

T:  Bus=02 Lev=01 Prnt=01 Port=09 Cnt=02 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=05da ProdID=40ca Rev= 0.00
C:* #Ifs= 1 Cfg#= 1 Atr=60 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbscanner
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh=10
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.11.4-20a-default ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:02.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms
---cut here---

- after my scanner power on:
"tail /var/log/messages"
---cut here---
Apr 30 02:32:58 linux kernel: usb 2-10: new full speed USB device using 
ohci_hcd and address 3
Apr 30 02:33:00 linux kernel: scanner: unsupported module, tainting kernel.
Apr 30 02:33:00 linux kernel: 
/usr/src/linux-2.6.11.4-20a/drivers/usb/image/scanner.c: USB scanner 
device (0x05da/0x40ca) now attached to usb/scanner0
Apr 30 02:33:00 linux kernel: usbcore: registered new driver usbscanner
Apr 30 02:33:00 linux kernel: 
/usr/src/linux-2.6.11.4-20a/drivers/usb/image/scanner.c: 0.4.16:USB 
Scanner Driver
Apr 30 02:33:00 linux kernel: 
/usr/src/linux-2.6.11.4-20a/drivers/usb/image/scanner.c: probe_scanner: 
User specified USB scanner -- Vendor:Product - 5da:40ca
Apr 30 02:33:00 linux /etc/hotplug.d/usb/50-usb.hotplug[8291]: setting 
permissions of /proc/bus/usb/002/003
---cut here---

"sane-find-scanner"
---cut here---
  # 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=0x05da, product=0x40ca) at /dev/usb/scanner0
found USB scanner (vendor=0x05da, product=0x40ca) at /dev/usbscanner
found USB scanner (vendor=0x05da, product=0x40ca) at libusb:002:003
found USB scanner (vendor=0x0458, product=0x700f) at libusb:002:002
  # Your USB scanner was (probably) detected. It may or may not be 
supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

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

"SANE_DEBUG_SM3600=255 scanimage -L"
---cut here---
[sanei_debug] Setting debug level of sm3600 to 255.
[sm3600] SM3600 init
[sm3600] SM3600 version: 1000005

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).
---cut here---

1) I add support for scanner.ko for recent 2.6.x kernel 
(http://www.linuxquestions.org/questions/showthread.php?s=&postid=851819)

2) create files libsane.usermap, libusbscanenr, sm3600, sm3600.usermap, 
scanner, sm3600
"cat /etc/hotplug/usb/libsane.usermap"
---cut here---
libusbscanner             0x0003      0x05da   0x40ca    0x0000       
0x0000       0x00         0x00            0x00            
0x00            0x00               0x00               0x00000000
---cut here---

"cat /etc/hotplug/usb/libusbscanenr"
---cut here---
if [ -z "$DEVICE" ] ; then
  IF=`echo $DEVPATH | sed 's/\(bus\/usb\/devices\/\)\(.*\)-\(.*\)/\2/'`
  DEV=`echo $DEVPATH | sed 's/\(bus\/usb\/devices\/\)\(.*\)-\(.*\)/\3/'`
  DEV=`expr $DEV + 1`
  DEVICE=`printf '/proc/bus/usb/%.03d/%.03d' $IF $DEV`
fi

if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
 chmod 0666 "$DEVICE"
fi
---cut here---

"cat /etc/hotplug/usb/sm3600"
---cut here---
#!/bin/sh
cd /etc/hotplug
. hotplug.functions
mesg setting permissions of $DEVICE
chown 777 $DEVICE
---cut here---

"cat /etc/hotplug/usb/sm3600.usermap"
---cut here---
sm3600  0x0003  0x05da  0x40ca  0x0000  0x0000  0x00    0x00    0x00    
0x00    0x00    0x00    0x000000000
---cut here---

"cat /etc/modprobe.d/scanner"
---cut here---
alias char-major-180 scanner
options scanner vendor=0x05da product=0x40ca
---cut here---

"cat /etc/modprobe.d/sm3600"
---cut here---
alias char-major-180 sm3600
options sm3600 vendor=0x05da product=0x40ca
---cut here---

3) edit files usb.usermap, usb.handmap, modules.alias, mudels.usbmap, 
dll.conf
"cat /etc/hotplug/usb.usermap"
---cut here---
sm3600  0x0003  0x05da  0x40ca  0x0000  0x0000  0x00    0x00    0x00    
0x00    0x00    0x00    0x000000000
libusbscanner  0x0003  0x05da  0x40ca  0x0000  0x0000  0x00    0x00    
0x00    0x00    0x00    0x00    0x000000000
---cut here---

"cat /etc/hotplug/usb.handmap"
---cut here---
0x00            0x00            0x00            0x00000000
---cut here---

"cat /lib/modules/2.6.11.4/modules.alias" (other lines with "alia xyz 
scanner" removed)
---cut here---
alias usb:v05DAp40CAdl*dh*dc*dsc*dp*ic*isc*ip* scanner
---cut here---

"cat /lib/modules/2.6.11.4/modules.usbmap" (other lines with "scanner 
xyz" removed)
---cut here---
scanner              0x0003      0x05da   0x40ca    0x0000       
0x0000       0x00         0x00            0x00            
0x00            0x00               0x00               0x0
---cut here---

"cat /etc/sane.d/dll.conf"
---cut here---
microtek
microtek2
sm3600
---cut here---

4) Scanner do not working with or without support scanner.ko in recent 
2.6.x kernel.

some tryes:
linux:/ # scanimage -d sm3600:/dev/usb/scanner0 >image.pnm
scanimage: open of device sm3600:/dev/usb/scanner0 failed: Invalid argument
linux:/ # scanimage -d sm3600:/dev/usbscanner >image.pnm
scanimage: open of device sm3600:/dev/usbscanner failed: Invalid argument
linux:/ # scanimage -d sm3600:/proc/bus/usb/002/003 >image.pnm
scanimage: open of device sm3600:/proc/bus/usb/002/003 failed: Invalid 
argument
linux:/ # scanimage -d sm3600:/libusb:002:003 >image.pnm
scanimage: open of device sm3600:/libusb:002:003 failed: Invalid argument
linux:/ # scanimage -d sm3600:libusb:002:003 >image.pnm
scanimage: open of device sm3600:libusb:002:003 failed: Invalid argument
linux:/ # scanimage -d microtek:/dev/usb/scanner0 >image.pnm
scanimage: open of device microtek:/dev/usb/scanner0 failed: Invalid 
argument
linux:/ # scanimage -d microtek:/dev/usbscanner >image.pnm
scanimage: open of device microtek:/dev/usbscanner failed: Invalid argument
linux:/ # scanimage -d microtek:/proc/bus/usb/002/003 >image.pnm
scanimage: open of device microtek:/proc/bus/usb/002/003 failed: Invalid 
argument
linux:/ # scanimage -d microtek2:/dev/usb/scanner0 >image.pnm
scanimage: open of device microtek2:/dev/usb/scanner0 failed: Invalid 
argument
linux:/ # scanimage -d microtek2:/dev/usbscanner >image.pnm
scanimage: open of device microtek2:/dev/usbscanner failed: Invalid argument
linux:/ # scanimage -d microtek2:/proc/bus/usb/002/003 >image.pnm
scanimage: open of device microtek2:/proc/bus/usb/002/003 failed: 
Invalid argument

Can You help me please how can I make Microtek ScanMaker 3600 working?

Thank You very much for answer
Petr Novak
su.petr@seznam.cz