scsi 幻灯片扫描仪对 scanimage -L 可见一次,然后消失

scsi 幻灯片扫描仪对 scanimage -L 可见一次,然后消失

我们有一台 2000 年代初的幻灯片扫描仪。它被 PC 识别,但只能识别一次。某些配置文件(/etc/sane.d/ 或 /etc/udev/rules.d)中似乎有一个小错误,但我们无法找出错误或缺失的地方。

下面的输出表明有一个hardware error和一个lamp failure,但这很可能是误导。扫描仪在运行专有佳能软件的旧 Windows XP PC 上启动时工作正常。扫描在 Windows 下工作,灯泡很旧但没问题。此外,扫描仪在这台 Linux PC 上运行了(只更换了硬盘)很短的一段时间,然后就停止工作了,显然是在第一次运行之后apt upgrade

屏幕截图 sdiff 输出

命令:

    export SANE_DEBUG_CANON=255 && export SANE_DEBUG_SANEI_SCSI=255 && export SANE_DEBUG_DLL=255  && scanimage -L

第一次输出:

device `canon:/dev/sg2' is a CANON IX-27015C        film scanner

输出:

[sanei_debug] Setting debug level of canon to 255.
[canon] >> sane_init
[canon] sane_init: sane-backends 1.0.25git
[canon] >> attach_one
[canon] >> attach
[canon] attach: opening /dev/sg1
[canon] attach: open failed: Invalid argument
[canon] << attach_one
[canon] >> attach_one
[canon] >> attach
[canon] attach: opening /dev/sg2
[canon] attach: sending (standard) INQUIRY
[canon] >> inquiry
[canon] << inquiry
[canon] attach: sending TEST_UNIT_READY
[canon] >> test_unit_ready
[canon] >> sense_handler
[canon] canon_sense_handler(10, 0xb6bf1060, (nil))
[canon] sense buffer: f0 00 44 00 00 00 00 06 00 00 00 00 60 00 00 00
[canon] sense data interpretation for SCSI-2 devices
[canon] sense category: hardware error
[canon] sense message: lamp failure
[canon] << sense_handler
[canon] << test_unit_ready
[canon] attach: test unit ready failed (Error during device I/O)
[canon] << attach_one
[canon] << sane_init
[canon] >> sane_get_devices
[canon] << sane_get_devices

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).
[canon] >> sane_exit
[canon] << sane_exit

生成的输出scanimage -L与此类似:

正在扫描设备 4 0 3 0 ...

OLD: Host: scsi4 Channel: 00 Id: 03 Lun: 00
      Vendor: CANON    Model: IX-27015C        Rev: 1.15
      Type:   Scanner                          ANSI SCSI revision: 02

udevadm 命令:

 udevadm info -a -p /sys/class/scsi_generic/sg2

udevadm 输出:

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1e.0/0000:05:05.0/host4/target4:0:3/4:0:3:0/scsi_generic/sg2':
    KERNEL=="sg2"
    SUBSYSTEM=="scsi_generic"
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:05.0/host4/target4:0:3/4:0:3:0':
    KERNELS=="4:0:3:0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""
    ATTRS{device_blocked}=="0"
    ATTRS{device_busy}=="0"
    ATTRS{dh_state}=="detached"
    ATTRS{eh_timeout}=="10"
    ATTRS{evt_capacity_change_reported}=="0"
    ATTRS{evt_inquiry_change_reported}=="0"
    ATTRS{evt_lun_change_reported}=="0"
    ATTRS{evt_media_change}=="0"
    ATTRS{evt_mode_parameter_change_reported}=="0"
    ATTRS{evt_soft_threshold_reached}=="0"
    ATTRS{iocounterbits}=="32"
    ATTRS{iodone_cnt}=="0x19"
    ATTRS{ioerr_cnt}=="0x6"
    ATTRS{iorequest_cnt}=="0x19"
    ATTRS{model}=="IX-27015C       "
    ATTRS{queue_depth}=="2"
    ATTRS{queue_type}=="none"
    ATTRS{rev}=="1.15"
    ATTRS{scsi_level}=="3"
    ATTRS{state}=="running"
    ATTRS{timeout}=="0"
    ATTRS{type}=="6"
    ATTRS{vendor}=="CANON   "

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:05.0/host4/target4:0:3':
    KERNELS=="target4:0:3"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

  looking at parent device '/devices/pci0000:00/0000:00:1e.0/0000:05:05.0/host4':
    KERNELS=="host4"
    SUBSYSTEMS=="scsi"
    DRIVERS==""

电脑数据:

操作系统版本:4.10.0-20-generic #22-Ubuntu SMP Thu Apr 20 09:22:16 UTC 2017 i686 i686 i686 GNU/Linux

由我们创建:

内容来自/etc/udev/rules.d/45-scsi-scanner.rules(一行:

# canon CanoScan 2700F scsi scanner
SUBSYSTEM=="scsi_generic", ATTRS{vendor}=="CANON", ATTRS{model}=="IX-27015C", NAME="%k", SYMLINK="scanner%n", MODE="0660",GROUP="scanner"

内容/etc/sane.d/canon.conf

#canon.conf
scsi CANON
#scsi CANON IX
#scsi /dev/sg2

另请参阅1999 年的安装说明

答案1

回答我自己的问题:

出乎意料的是,在从 Windows XP 再次访问后,扫描仪发现了驱动器更换后出现的问题。

另一条错误消息(无法在这里重现 - 之前和之后都未见过)表明启动时的自检未能完成。

滑块装置存在电子和/或机械缺陷,导致扫描仪无法正常工作。只需从入口系统中移除滑块即可启动扫描仪。

相关内容