The scanner's firmware revision is 1.80 (much older than the 2.7 or so
that is 'known to work' according to the docs), and the interface card
is a jumperless, IRQ-less, ISA bus DTC-3181A (newer than the scanner; it
replaced an older card with jumpers that stopped working when I upgraded
from a 486 to a Pentium). The computer it's on right now is a 100 MHz
Pentium w/ 32 MB of RAM (and 32 MB or so of swap) running Red Hat Linux
5.0 with a 2.0.33 kernel. To get the card working I applied the
mustek-scsi-patch-0.5 to the kernel, and modified drivers/scsi/Makefile
as per the directions for the DTC-3181E (note the slightly different
model number). The scanner originally had device ID 0, but that didn't
seem to sit well with SANE and it didn't work at all until I changed it
to device ID 5.
The "chunky" effect is not only annoying-sounding and slow, but it seems
to degrade the scanned image. For example, at 300 dpi the vertical
resolution is effectively limited to 75 dpi, that is an image that
should look like this (where each character is a pixel of a certain
color):
ABCDEF
GHIJKL
MNOPQR
STUVWX
YZ0123
456789
!@#$%^
&*()_+
looks a bit more like this:
ABCDEF
ABCDEF
ABCDEF
GHIJKL
YZ0123
YZ0123
YZ0123
456789
At lower resolutions it doesn't seem quite so even, but is even more
uglified. Also, the "chunks" scan progressively smaller distances at a
time at higher resolutions (which would seem to indicate that it's a
problem with a fixed-size buffer somewhere). Note that the
mustek-scsi-patch set SG_BIG_BUFF to (128*1024-512), supposedly the
maximum, and I compiled SANE after patching and compiling the kernel so
that shouldn't be it.
However, when scanning in xscanimage (with full debug output on) I get
messages like this:
[sanei_scsi] sanei_scsi_req_wait: read 108496 bytes
[mustek] mustek.send_data: data=0x4029a008, lpb=187, bpl=580,
extra=(nil)
[dll]
read(handle=0x80ae1b0,data=0x8055a0c,maxlen=32768,lenp=0xbffff798)
[mustek] read 4096 bytes
[dll]
read(handle=0x80ae1b0,data=0x8055a0c,maxlen=32768,lenp=0xbffff798)
[mustek] read 4096 bytes
So it seems to be dealing with a 32k buffer but is only getting 4k at a
time.
Here is my mustek.conf:
#option strip-height 1
/dev/scanner
# option linedistance-fix
# option lineart-fix
(Note that the chunkiness seems the same whether the options are on or
off. Oh, and /dev/scanner is a symlink to /dev/sga.)
Here's my Linux kernel configuration in case anything is obviously
conflicting:
CONFIG_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KERNELD=y
CONFIG_NET=y
CONFIG_PCI=y
CONFIG_SYSVIPC=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_M586=y
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_CMD640=y
CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_TRITON=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_INET=y
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y (for ZIP drive)
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_GENERIC_NCR5380=y (this is the driver that is hacked by
the patch)
CONFIG_SCSI_GENERIC_NCR53C400=y (I'm not sure if this is right)
CONFIG_SCSI_G_NCR5380_PORT=y (setting to memory doesn't work at all,
so I think this is right)
CONFIG_SCSI_PPA=y (for the parallel-port ZIP, but it doesn't work)
CONFIG_NETDEVICES=y
CONFIG_PPP=y
CONFIG_NET_ETHERNET=y
CONFIG_NET_ISA=y
CONFIG_NE2000=y
CONFIG_MINIX_FS=y
CONFIG_EXT2_FS=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
CONFIG_SMB_FS=y
CONFIG_SMB_WIN95=y
CONFIG_ISO9660_FS=y
CONFIG_SERIAL=y
CONFIG_PRINTER=y (could be conflicting with the ZIP but shouldn't
affect the scanner's card)
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
CONFIG_APM=y
CONFIG_APM_POWER_OFF=y (why did I enable this? the motherboard doesn't
support it. I feel dumb now! ;)
CONFIG_SOUND=y
CONFIG_SB=y
CONFIG_AUDIO=y
CONFIG_MIDI=y
CONFIG_YM3812=y
And here are the boot messages about SCSI detection:
scsi0 : interrupts not enabled. for better interactive performance,
scsi0 : please jumper the board for a free IRQ.
scsi0 : at port 0x240 interrupts disabled options CAN_QUEUE=16
CMD_PER_LUN=2 release=1 generic options AUTOPROBE_IRQ AUTOSENSE PSEUDO
DMA USLEEP, USLEEP_POLL=1 USLEEP_SLEEP=20 generic release=7
PPA: ports at 0x378 are not available
scsi0 : Generic NCR5380/53C400 Driver
scsi : 1 host.
Vendor: MUSTEK˙˙ Model: MFS-06000CX˙˙˙˙˙ Rev: 1.80
Type: Scanner ANSI SCSI revision: 00
Detected scsi generic sga at scsi0, channel 0, id 5, lun 0
scsi : detected total.
Thanks in advance for any help! (Especially if I'm just doing something
stupid seeing as I am a SANE newbie...) Oh, and I think I forgot to
mention, this is SANE 0.73 that I'm working with. Ah yes, and the
chunkiness occurs with scanimage as well as xscanimage, and in both
grayscale and color, at any resolution, at any speed setting, and at any
sharpness.
-- brion vibber (brion@pobox.com)
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com