Re: Problem with SANE and SCSI scanner

Laura DeWitt (cats-rule@home.net)
Wed, 01 Dec 1999 21:16:49 -0600

This is a multi-part message in MIME format.
--------------61AA1EBB10B3D592894D346F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This information was captured as a user other than root, since when I try
any of the commands as root, the machine locks up and I have to power
cycle. I will capture that information also and send it to you next.

BTW, I was running the find-scanner command as root, but the others as
another user. Then when I changed the permimssions per Markus's
recommendation, I could run find-scanner as user. Sorry for the confusion.

Laura

--------------61AA1EBB10B3D592894D346F
Content-Type: text/plain; charset=us-ascii;
name="sane.debug"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="sane.debug"

sh-2.03$ whoami
ldewitt
sh-2.03$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: CANON Model: IX-06015C Rev: 2.02
Type: Scanner ANSI SCSI revision: 02
sh-2.03$ find-scanner
# You may want to run this program as super-user to find all devices.
# Once you found the scanner devices, be sure to adjust access
# permissions as necessary.

find-scanner: found scanner "CANON IX-06015C 2.02" at device /dev/scanner
find-scanner: found scanner "CANON IX-06015C 2.02" at device /dev/sg0
find-scanner: found scanner "CANON IX-06015C 2.02" at device /dev/sga
sh-2.03$ export SANE_DEBUG_CANON=128
sh-2.03$ export SANEI_DEBUG_CANON=128
sh-2.03$ ls -l /dev/sga /dev/sg0 /dev/scanner
lrwxrwxrwx 1 root root 8 Nov 24 19:54 /dev/scanner ->
/dev/sga
lrwxrwxrwx 1 root root 3 Nov 10 03:57 /dev/sg0 -> sga
crwxrwxrwx 1 root scanner 21, 0 May 5 1998 /dev/sga
-----------------------------------------------------------------
sh-2.03$ scanimage --list-devices
[sanei_init_debug]: Setting debug level of canon to 128.
[canon] >> sane_init
[canon] sane_init: sane 1.0.1
[canon] >> attach_one
[canon] >> attach
[canon] attach: opening /dev/scanner
[canon] attach: sending (standard) INQUIRY
[canon] >> inquiry
[canon] << inquiry
[canon] attach: sending TEST_UNIT_READY
[canon] >> test_unit_ready
[canon] << test_unit_ready
[canon] attach: sending RESERVE UNIT
[canon] >> reserve_unit
[canon] << reserve_unit
[canon] attach: sending GET SCAN MODE for scan control conditions
[canon] get scan mode: cmd[4]='0x14'
[canon] << get scan mode
[canon] attach: GET SCAN MODE for scan control conditions failed
[canon] << attach_one
[canon] << sane_init
[canon] >> sane_get_devices
[canon] << sane_get_devices
[canon] >> sane_exit
[canon] << sane_exit
-----------------------------------------------------------------
sh-2.03$ scanimage -d canon:/dev/sga
[sanei_init_debug]: Setting debug level of canon to 128.
[canon] >> sane_init
[canon] sane_init: sane 1.0.1
[canon] >> attach_one
[canon] >> attach
[canon] attach: opening /dev/scanner
[canon] attach: sending (standard) INQUIRY
[canon] >> inquiry
[canon] << inquiry
[canon] attach: sending TEST_UNIT_READY
[canon] >> test_unit_ready
[canon] << test_unit_ready
[canon] attach: sending RESERVE UNIT
[canon] >> reserve_unit
[canon] << reserve_unit
[canon] attach: sending GET SCAN MODE for scan control conditions
[canon] get scan mode: cmd[4]='0x14'
[canon] << get scan mode
[canon] attach: GET SCAN MODE for scan control conditions failed
[canon] << attach_one
[canon] << sane_init
[canon] >> sane_open
scanimage: open of device canon:/dev/sga failed: Invalid argument
[canon] >> sane_exit
[canon] << sane_exit
-----------------------------------------------------------------

execve("/usr/local/bin/scanimage", ["scanimage", "-d", "canon:/dev/sga"], [/* 26 vars */]) = 0
brk(0) = 0x804d3a8
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/i686/mmx/libsane.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/i686/mmx", 0x7ffff4f8) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/i686/libsane.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/i686", 0x7ffff4f8) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/mmx/libsane.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/mmx", 0x7ffff4f8) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libsane.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=65457, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\21"..., 4096) = 4096
mmap(NULL, 17436, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2aac0000
mprotect(0x2aac4000, 1052, PROT_NONE) = 0
mmap(0x2aac4000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x2aac4000
close(3) = 0
open("/usr/local/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=35655, ...}) = 0
mmap(NULL, 35655, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aac5000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=14137, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\31\0"..., 4096) = 4096
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aace000
mmap(NULL, 11404, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2aacf000
mprotect(0x2aad1000, 3212, PROT_NONE) = 0
mmap(0x2aad1000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x2aad1000
close(3) = 0
open("/usr/local/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libnsl.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=101021, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\3607\0"..., 4096) = 4096
mmap(NULL, 90536, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2aad2000
mprotect(0x2aae5000, 12712, PROT_NONE) = 0
mmap(0x2aae5000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12000) = 0x2aae5000
mmap(0x2aae6000, 8616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aae6000
close(3) = 0
open("/usr/local/lib/libjpeg.so.62", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libjpeg.so.62", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=139271, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20#\0\000"..., 4096) = 4096
mmap(NULL, 122716, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2aae9000
mprotect(0x2ab06000, 3932, PROT_NONE) = 0
mmap(0x2ab06000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1c000) = 0x2ab06000
close(3) = 0
open("/usr/local/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=193747, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200=\0"..., 4096) = 4096
mmap(NULL, 121288, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2ab07000
mprotect(0x2ab24000, 2504, PROT_NONE) = 0
mmap(0x2ab24000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1c000) = 0x2ab24000
close(3) = 0
open("/usr/local/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=1281824, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0T\205\1"..., 4096) = 4096
mmap(NULL, 1021308, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2ab25000
mprotect(0x2ac17000, 30076, PROT_NONE) = 0
mmap(0x2ac17000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xf1000) = 0x2ac17000
mmap(0x2ac1b000, 13692, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac1b000
close(3) = 0
mprotect(0x2ab25000, 991232, PROT_READ|PROT_WRITE) = 0
mprotect(0x2ab25000, 991232, PROT_READ|PROT_EXEC) = 0
munmap(0x2aac5000, 35655) = 0
personality(PER_LINUX) = 0
getpid() = 611
brk(0) = 0x804d3a8
brk(0x804d548) = 0x804d548
brk(0x804e000) = 0x804e000
open("./dll.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/sane.d/dll.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=83, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac5000
read(3, "# enable the next line if you wa"..., 4096) = 83
read(3, "", 4096) = 0
close(3) = 0
munmap(0x2aac5000, 4096) = 0
open("/usr/local/lib/sane/libsane-canon.so.1", O_RDONLY) = 3
open("/usr/local/lib/sane/libsane-canon.so.1", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=197017, ...}) = 0
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\31"..., 4096) = 4096
mmap(NULL, 73400, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x2ac1f000
mprotect(0x2ac30000, 3768, PROT_NONE) = 0
mmap(0x2ac30000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x10000) = 0x2ac30000
close(4) = 0
write(2, "[sanei_init_debug]: Setting debu"..., 57[sanei_init_debug]: Setting debug level of canon to 128.
) = 57
write(2, "[canon] >> sane_init\n", 21[canon] >> sane_init
) = 21
write(2, "[canon] sane_init: sane 1.0.1\n", 30[canon] sane_init: sane 1.0.1
) = 30
open("./canon.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/sane.d/canon.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=13, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac5000
read(4, "/dev/scanner\n", 4096) = 13
read(4, "", 4096) = 0
close(4) = 0
munmap(0x2aac5000, 4096) = 0
write(2, "[canon] >> attach_one\n", 22[canon] >> attach_one
) = 22
write(2, "[canon] >> attach\n", 18[canon] >> attach
) = 18
*****************************************************************************************
write(2, "[canon] attach: opening /dev/sca"..., 37[canon] attach: opening /dev/scanner
) = 37
open("/proc/sys/kernel/sg-big-buff", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/scanner", O_RDWR|O_EXCL) = 4
ioctl(4, TIOCSCCINI, 0x7fffd8a8) = 0
write(2, "[canon] attach: sending (standar"..., 43[canon] attach: sending (standard) INQUIRY
) = 43
write(2, "[canon] >> inquiry\n", 19[canon] >> inquiry
) = 19
brk(0x8057000) = 0x8057000
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
write(4, "*\0\0\0H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 42) = 42
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
read(4, "H\0\0\0H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 72) = 72
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(2, "[canon] << inquiry\n", 19[canon] << inquiry
) = 19
write(2, "[canon] attach: sending TEST_UNI"..., 40[canon] attach: sending TEST_UNIT_READY
) = 40
write(2, "[canon] >> test_unit_ready\n", 27[canon] >> test_unit_ready
) = 27
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
write(4, "*\0\0\0$\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 42) = 42
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
read(4, "$\0\0\0$\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 36) = 36
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(2, "[canon] << test_unit_ready\n", 27[canon] << test_unit_ready
) = 27
write(2, "[canon] attach: sending RESERVE "..., 37[canon] attach: sending RESERVE UNIT
) = 37
write(2, "[canon] >> reserve_unit\n", 24[canon] >> reserve_unit
) = 24
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
write(4, "*\0\0\0$\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 42) = 42
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
read(4, "$\0\0\0$\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 36) = 36
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(2, "[canon] << reserve_unit\n", 24[canon] << reserve_unit
) = 24
write(2, "[canon] attach: sending GET SCAN"..., 66[canon] attach: sending GET SCAN MODE for scan control conditions
) = 66
write(2, "[canon] get scan mode: cmd[4]=\'0"..., 37[canon] get scan mode: cmd[4]='0x14'
) = 37
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
write(4, "*\0\0\0n\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 42) = -1 EIO (Input/output error)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(2, "[canon] << get scan mode\n", 25[canon] << get scan mode
) = 25
write(2, "[canon] attach: GET SCAN MODE fo"..., 65[canon] attach: GET SCAN MODE for scan control conditions failed
) = 65
close(4) = 0
*****************************************************************************************
write(2, "[canon] << attach_one\n", 22[canon] << attach_one
) = 22
write(2, "[canon] << sane_init\n", 21[canon] << sane_init
) = 21
write(2, "[canon] >> sane_open\n", 21[canon] >> sane_open
) = 21
write(2, "scanimage: open of device canon:"..., 66scanimage: open of device canon:/dev/sga failed: Invalid argument
) = 66
write(2, "[canon] >> sane_exit\n", 21[canon] >> sane_exit
) = 21
write(2, "[canon] << sane_exit\n", 21[canon] << sane_exit
) = 21
munmap(0x2ac1f000, 73400) = 0
_exit(1) = ?

--------------61AA1EBB10B3D592894D346F--

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com