[sane-devel] USB scanner slow, hopping back and forward
gerard klaver
gerard at gkall.hobby.nl
Fri Dec 9 17:53:03 UTC 2005
On Fri, 2005-12-09 at 14:29 +0100, sane at rsenden.speedlinq.nl wrote:
> Hello,
>
> I've got sane installed on a LinkSys NSLU2 embedded linux device running the OpenSlug Linux distribution (see http://www.nslu2-linux.org) for use with my Trust Direct WebScan 19200 scanner.
>
> The scanner basically works, but scanning is slow due to the scanner hopping backwards quite often. E.g. basically it scans one centimeter, and then hops back half a centimeter. This happens when scanning A4-width at 300dpi. The higher the resolution, the smaller the steps get.
>
> I guess every now and then some data gets lost so the scanner has to rescan a line. When doing an 'export SANE_DEBUG_GT68XX=5', I see the following for about every 13th line (at 300dpi A4 width):
>
> [gt68xx] sane_read: getting line 190 of 3531
> [gt68xx] sane_read: getting line 191 of 3531
> [gt68xx] sane_read: exit (line 192 of 3531, byte_count 1987 of 2563, 32768 bytes, 491520 total)
> [gt68xx] sane_read: start (line 192 of 3531, byte_count 1987 of 2563)
> [gt68xx] sane_read: getting line 192 of 3531
>
> Does anybody know a solutions for this? Using the scanner on a regular PC running Windows, scans are smooth. Scanning is also smooth on the nslu2 when scanning at low resolutions (preview) or scanning only a small width. Could it be that the NSLU2 is too slow for handling the amount of data? I've also read something about different ohci-drivers, but I'm not sure whether that is applicable to my situation, and how to find/build/use another version.
>
> Some system information:
> Linux version 2.6.12.2 (openslug at openslug.org) (gcc version 3.4.4) #1 Tue Sep 27 20:21:18 CDT 2005
> scanimage (sane-backends) 1.0.15; backend version 1.0.15 (also tried 1.0.16 with latest gt68xx backend)
> Scanner is currently connected through an USB hub, but also tried without it with same results.
>
> >From /proc/cpuinfo:
> Processor: XScale-IXP42x Family rev 1 (v5b)
> BogoMIPS: 131.48
>
> >From /proc/meminfo:
> MemTotal: 30660 kB
> MemFree: 6304 kB
>
> >From /proc/bus/usb/devices:
> T: Bus=01 Lev=02 Prnt=03 Port=02 Cnt=02 Dev#= 5 Spd=12 MxCh= 0
> D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
> P: Vendor=055f ProdID=021c Rev= 1.00
> S: Product=USB Scanner
> C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
> I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
> E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
>
> lsusb:
> Bus 003 Device 001: ID 0000:0000
> Bus 002 Device 001: ID 0000:0000
> Bus 001 Device 006: ID 03f0:6004 Hewlett-Packard DeskJet 5550
> Bus 001 Device 005: ID 055f:021c Mustek Systems, Inc. BearPaw 1200 CU Plus
> Bus 001 Device 004: ID 0840:0098 Argosy Research, Inc.
> Bus 001 Device 003: ID 05e3:0605 Genesys Logic, Inc.
> Bus 001 Device 002: ID 0781:5151 SanDisk Corp.
> Bus 001 Device 001: ID 0000:0000
>
> dmesg | egrep -i "usb|ehci|ohci"
> usbcore: registered new driver usbfs
> usbcore: registered new driver hub
> ehci_hcd 0000:00:01.2: EHCI Host Controller
> ehci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
> ehci_hcd 0000:00:01.2: irq 26, io mem 0x48002000
> ehci_hcd 0000:00:01.2: park 0
> ehci_hcd 0000:00:01.2: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004
> hub 1-0:1.0: USB hub found
> ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
> ohci_hcd 0000:00:01.0: OHCI Host Controller
> ohci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 2
> ohci_hcd 0000:00:01.0: irq 28, io mem 0x48000000
> hub 2-0:1.0: USB hub found
> ohci_hcd 0000:00:01.1: OHCI Host Controller
> ohci_hcd 0000:00:01.1: new USB bus registered, assigned bus number 3
> ohci_hcd 0000:00:01.1: irq 27, io mem 0x48001000
> hub 3-0:1.0: USB hub found
> usb 1-1: new high speed USB device using ehci_hcd and address 2
> Initializing USB Mass Storage driver...
> usb 1-2: new high speed USB device using ehci_hcd and address 3
> hub 1-2:1.0: USB hub found
> scsi0 : SCSI emulation for USB Mass Storage devices
> usb-storage: device found at 2
> usb-storage: waiting for device to settle before scanning
> usbcore: registered new driver usb-storage
> USB Mass Storage support registered.
> usb 1-2.1: new high speed USB device using ehci_hcd and address 4
> scsi1 : SCSI emulation for USB Mass Storage devices
> usb-storage: device found at 4
> usb-storage: waiting for device to settle before scanning
> usb 1-2.3: new full speed USB device using ehci_hcd and address 5
> usb 1-2.4: new full speed USB device using ehci_hcd and address 6
> usb-storage: device scan complete
> usb-storage: device scan complete
> drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x03F0 pid 0x6004
> usbcore: registered new driver usblp
> drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
>
> With kind regards,
> Ruud Senden.
>
>
>
If you use scanimage, try the -B option (buffersize frontend)
(sane-backends 1.0.16) maybe it will help a bit?
--
--------
m.vr.gr.
Gerard Klaver
More information about the sane-devel
mailing list