如何让 Artec e+ 48u 在 Xubuntu 14.10 (amd64) 上运行

如何让 Artec e+ 48u 在 Xubuntu 14.10 (amd64) 上运行

症状:

当我打开 Xsane 时,我得到一个错误,无法找到我的扫描仪

简单扫描将会打开,但当我点击扫描按钮时,我得到了扫描失败错误。当我单击错误旁边的“更改扫描仪”按钮时,会弹出属性子窗口。

我一直在关注这个手册页:

manpages.ubuntu.com/manpages/utopic/man5/sane-artec_eplus48u.5.html

我需要 sane-artec_eplus48u - SANE 后端。

手册页说我需要以下包:

libsane-common-1.0.24-1.1ubuntu1_all

Synaptic 说我的 libsane-common 版本是 1.0.24-1.1ubuntu1。请注意末尾缺少“_all”。

根据该页面,

如果安装了 libusb-0.1.6 或更高版本,则可以跳过此部分。sane-find-scanner 应该可以找到扫描仪,无需进一步的操作。

Synaptic 中的软件包名称是:libusb-0.1-4 Syanaptic 显示安装的版本是:2:0.1.12-24

我是 Linux 新手,但我认为这意味着它是版本 0.1.12-24,应该满足该要求。如果错了,请纠正我。

事情的经过如下:

$ sane-find-scanner
...
found USB scanner (vendor=0x05d8, product=0x4003, chip=GT-6816) at libusb:002:004
...

以下是 scanimage 发生的情况:

$ scanimage -L
device `artec_eplus48u:libusb:002:004' is a Artec E+ 48U flatbed scanner

手册页指出后端安装后将找到以下文件:

/usr/local/etc/sane.d/artec_eplus48u.conf

该文件位于指定位置。

使用手册页,我对其进行了编辑,其当前内容如下:

# artec_eplus48u - SANE Backend configuration file
#
# SANE does not support hardware buttons
# Every device configuration must begin with a usb entry in this form:
# usb vendor-ID and product-ID

usb 0x05d8 0x4003

# The 48u needs a firmware file from its windows install disk called Artec48.usb

artecFirmwareFile /usr/share/sane/artec_eplus48u/Artec48.usb

# These are the recommended settings for the 48u according to the SANE Project:

redGamma 1.0
greenGamma 1.0
blueGamma 1.0
masterGamma 1.9
redOffset 0x28
greenOffset 0x2f
blueOffset 0x2f
redExposure 0xa7
greenExposure 0x116
blueExposure 0xdc
vendorString Artec
modelString E+ 48U

手册页还说我应该在后端安装后找到这些文件:

/usr/local/lib/sane/libsane-artec_eplus48u.a
/usr/local/lib/sane/libsane-artec_eplus48u.so

我在指定位置或其他任何地方都找不到这些文件。以 root 身份运行 Catfish,我在这个非常不同的位置找到了以下类似但不完全相同的文件:/usr/lib/x86_64-linux-gnu/sane/

libsane-artec_eplus48u.1a
libsane-artec_eplus48u.so.1
libsane-artec_eplus48u.so.1.0.24

我看到很多帖子都提到了与权限有关的类似问题。我也在 /usr/share/doc/libsane/README.linux 中找到了这个问题

一个即时设置权限的解决方案是 Linux udev,它随当前发行版提供。SANE 随 tools/udev 目录中的 udev 规则文件提供,该文件可供发行版使用,也可以手动复制到 /etc/udev/rules.d。文件格式在文件本身的顶部有说明。您需要 libusb 0.1.12 或更新版本,或者必须将 USB_DEVFS_PATH=/dev/bus/usb 导出为系统范围的环境变量。

Linux 新手 = 不知道如何找到他们所指的正确的文件夹或脚本。

Xubuntu 14.10 确实使用了 udev,但是作为新手,我并不完全了解其后果。

暂时更改扫描仪设备上的权限以允许所有人读写并不能改变症状。

作为权限问题的第二次测试,我分别在带和不带 sudo 的情况下运行了 simple-scan 和 xsane。两个程序的症状均无变化。

根据手册页,我需要一个名为 Artec48.usb 的固件文件供后端使用。根据 catfish 的说法,只有一个 Artec48.usb 副本。它位于 /usr/share/sane/artec_eplus48u/

它归 root 所有,其组为 root。所有者具有 RW 权限。组和其他用户仅具有 R 权限。Artec48.usb 的 MD5 哈希为:55113258bc41f30ef5f5be748e1b01ee

我尝试了几个不同的 USB 端口,结果都一样。我的系统没有 USB3,只有 USB2,顺便说一句,我发现这也会导致 SANE 出现问题。

我也尝试过删除 ~/.sane,然后重启系统。但问题仍然存在。

答案1

最后它归结为语法,呃!

在 /usr/local/etc/sane.d/artec_eplus48u.conf 中,除以 usb 开头的行之外,每一项前面都必须加上:

option 

修订版本有效:

# artec_eplus48u - SANE Backend configuration file
#
# SANE does not support hardware buttons
# Every device configuration must begin with a usb entry in this form:
# usb vendor-ID and product-ID

usb 0x05d8 0x4003

# The 48u needs a firmware file from its windows install disk called Artec48.usb

option artecFirmwareFile /usr/share/sane/artec_eplus48u/Artec48.usb

# These are the recommended settings for the 48u according to the SANE Project:

option redGamma 1.0
option greenGamma 1.0
option blueGamma 1.0
option masterGamma 1.9
option redOffset 0x28
option greenOffset 0x2f
option blueOffset 0x2f
option redExposure 0xa7
option greenExposure 0x116
option blueExposure 0xdc
option vendorString Artec
option modelString E+ 48U

相关内容