简单扫描无法找到扫描仪

简单扫描无法找到扫描仪

以下是 lsusb 和 sane-find-scanner 的输出:

janos@AndrasXubuntu:~/Desktop$ sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x1205 [hp scanjet scanner]) at libusb:002:002
could not open USB device 0x1d6b/0x0001 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 001:001: Access denied (insufficient permissions)
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.
janos@AndrasXubuntu:~/Desktop$ scanimage -L
[hp5590] hp5590_get_status: USB-in-USB: got non-zero device status (status 12)
[hp5590] hp5590_init_scanner: scanner reports non-zero status: Device busy

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).
janos@AndrasXubuntu:~/Desktop$

附加信息:

(1)gscan2pdfxsane同样的问题 - 找不到设备

(2)当我使用 xubuntu 12.04 扫描仪时

(3)如果我将笔记本电脑(与台式机一样是 Ubuntu 16.04)连接到笔记本电脑是 64 位,台式机是 32 位) 然后就可以在笔记本电脑上进行简单的扫描了。

Sudo 输出,请参阅下面 janos 的评论

janos@AndrasXubuntu:~/Desktop$ sudo sane-find-scanner
[sudo] password for janos: 

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x1205 [hp scanjet scanner]) at libusb:002:002
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
janos@AndrasXubuntu:~/Desktop$ sudo scanimage -L
[hp5590] hp5590_get_status: USB-in-USB: got non-zero device status (status 12)
[hp5590] hp5590_init_scanner: scanner reports non-zero status: Device busy

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).
janos@AndrasXubuntu:~/Desktop$ 

lsusb 的输出(抱歉,我第一次提出这个问题时就想把它包括在内)

janos@AndrasXubuntu:~/Desktop$ sudo lsusb
[sudo] password for janos: 
Bus 002 Device 002: ID 03f0:1205 Hewlett-Packard ScanJet 4500C/5550C
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
janos@AndrasXubuntu:~/Desktop$ 

请注意,如果我将扫描仪插入不同的 USB 插座(例如,总线 001 中的插座),lsusb会在那里找到它,但简单扫描仍然不起作用。

附加信息:我可以将这台机器双启动到旧版 Fedora-3。扫描仪在那里工作。但是,scanimage -L找不到它,lsusbsane-find-scanner确实找到了。请参见 Fedora-3 启动时终端的以下输出。

[apu@andraslinux ~]$ su -c "scanimage -L"
Password: 

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).
[apu@andraslinux ~]$ /sbin/lsusb
Bus 002 Device 002: ID 03f0:1205 Hewlett-Packard 
Bus 002 Device 001: ID 1d6b:0001  
Bus 001 Device 001: ID 1d6b:0001  
[apu@andraslinux ~]$ sane-find-scanner 

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x1205 [hp scanjet scanner]) at libusb:002:002
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

是否可能导致libusbFC3 能够运行扫描仪但 Ubuntu 16.04 无法使用libusb

正如我之前提到的,扫描仪在 12.04 上可以工作,但在升级到 14.04 后停止工作,现在升级到 16.04

有关 libusb 的其他信息:

32 位台式机(扫描仪不工作)和 64 位笔记本电脑(扫描仪工作)的终端输出相同,如下所示:

janos@acerlinux:~/Desktop$ dpkg -l libusb
dpkg-query: no packages found matching libusb

事实上,我刚刚检查过我的 64 位笔记本电脑没有 libsane-dev,并再次检查,如果连接到笔记本电脑,扫描仪就可以工作。

从以下评论中复制的附加信息:

/etc/sane.d/dll.conf没问题,hp5590 没有被注释;然后我/etc/sane.d/hp5400.conf通过添加正确的 usb 线进行了修改;扫描仪仍然无法工作,即使scanimage -L检测到它,但报告为繁忙。请参见此处:

janos@AndrasXubuntu:~/Desktop$ sudo scanimage -L
[sudo] password for janos: 
[hp5590] hp5590_get_status: USB-in-USB: got non-zero device status (status 12)
[hp5590] hp5590_init_scanner: scanner reports non-zero status: Device busy

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).
janos@AndrasXubuntu:~/Desktop$ 

还有一件有趣的事情,该/etc/sane.d/hp5400.conf文件在 64 位笔记本电脑和 32 位 Fc3 台式机上是相同的,无需编辑添加 5590 usb 线,但自从 12.04 升级以来,两者都可以与扫描仪一起使用,除了 32 位 Ubuntu 台式机。

因此,我认为最大的问题是“为什么 32 位 16.04 Ubuntu 桌面报告设备繁忙?”

附加信息-修改了 libusb 的输出,这次带有星号:

32位桌面上的 libusb

janos@AndrasXubuntu:~/Desktop$ dpkg -l libusb*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  libusb-0.1-4:i 2:0.1.12-28  i386         userspace USB programming library
ii  libusb-1.0-0:i 2:1.0.20-1   i386         userspace USB programming library
un  libusb-dev     <none>       <none>       (no description available)
un  libusbmuxd-too <none>       <none>       (no description available)
ii  libusbmuxd4:i3 1.0.10-2ubun i386         USB multiplexor daemon for iPhone
janos@AndrasXubuntu:~/Desktop$

64位笔记本电脑上的libusb:

janos@acerlinux:~/Desktop$ dpkg -l libusb*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  libusb-0.1-4:a 2:0.1.12-28  amd64        userspace USB programming library
ii  libusb-1.0-0:a 2:1.0.20-1   amd64        userspace USB programming library
ii  libusb-1.0-0:i 2:1.0.20-1   i386         userspace USB programming library
un  libusb-dev     <none>       <none>       (no description available)
un  libusbmuxd-too <none>       <none>       (no description available)
ii  libusbmuxd4:am 1.0.10-2ubun amd64        USB multiplexor daemon for iPhone
janos@acerlinux:~/Desktop$

附加信息:

根据我对 FC3 和 man sane-usb 的说明,必须安装 usbfs 才能使扫描仪工作。因此,在我的 FC3 中,我在 fstab 中有一行包含 none /proc/bus。因此,我查看了 32 位 Ubuntu 和 64 位 Ubuntu 上安装的文件系统。参见以下比较:

32 位 Ubuntudf -ha

janos@AndrasXubuntu:~/Desktop$ sudo df -ha
Filesystem      Size  Used Avail Use% Mounted on
sysfs              0     0     0    - /sys
proc               0     0     0    - /proc
udev            482M     0  482M   0% /dev
devpts             0     0     0    - /dev/pts
tmpfs           100M  5.1M   95M   6% /run
/dev/sda1       9.1G  4.0G  4.7G  47% /
securityfs         0     0     0    - /sys/kernel/security
tmpfs           500M  108K  500M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           500M     0  500M   0% /sys/fs/cgroup
cgroup             0     0     0    - /sys/fs/cgroup/systemd
pstore             0     0     0    - /sys/fs/pstore
cgroup             0     0     0    - /sys/fs/cgroup/blkio
cgroup             0     0     0    - /sys/fs/cgroup/cpu,cpuacct
cgroup             0     0     0    - /sys/fs/cgroup/cpuset
cgroup             0     0     0    - /sys/fs/cgroup/net_cls,net_prio
cgroup             0     0     0    - /sys/fs/cgroup/freezer
cgroup             0     0     0    - /sys/fs/cgroup/memory
cgroup             0     0     0    - /sys/fs/cgroup/hugetlb
cgroup             0     0     0    - /sys/fs/cgroup/pids
cgroup             0     0     0    - /sys/fs/cgroup/perf_event
cgroup             0     0     0    - /sys/fs/cgroup/devices
systemd-1          0     0     0    - /proc/sys/fs/binfmt_misc
hugetlbfs          0     0     0    - /dev/hugepages
debugfs            0     0     0    - /sys/kernel/debug
mqueue             0     0     0    - /dev/mqueue
fusectl            0     0     0    - /sys/fs/fuse/connections
tmpfs           100M  4.0K  100M   1% /run/user/108
tmpfs           100M   36K  100M   1% /run/user/1000
gvfsd-fuse      0.0K  0.0K  0.0K    - /run/user/1000/gvfs
janos@AndrasXubuntu:~/Desktop$ 

比较 FC3(扫描仪工作的地方)和 Ubuntu 上的 32 位桌面文件

janos@AndrasXubuntu:/media/janos/_1/etc/sane.d$ diff hp5400.conf /etc/sane.d/hp5400.conf
14c14
< #/dev/usb/scanner0
---
> #/dev/usbscanner
janos@AndrasXubuntu:/media/janos/_1/etc/sane.d$ 

64 位 Ubuntudf -ha

janos@acerlinux:~/Desktop$ sudo df -ha
[sudo] password for janos: 
Filesystem      Size  Used Avail Use% Mounted on
sysfs              0     0     0    - /sys
proc               0     0     0    - /proc
udev            1.4G     0  1.4G   0% /dev
devpts             0     0     0    - /dev/pts
tmpfs           276M  5.0M  271M   2% /run
/dev/sda5        17G  7.1G  8.5G  46% /
securityfs         0     0     0    - /sys/kernel/security
tmpfs           1.4G  260K  1.4G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           1.4G     0  1.4G   0% /sys/fs/cgroup
cgroup             0     0     0    - /sys/fs/cgroup/systemd
pstore             0     0     0    - /sys/fs/pstore
cgroup             0     0     0    - /sys/fs/cgroup/hugetlb
cgroup             0     0     0    - /sys/fs/cgroup/cpuset
cgroup             0     0     0    - /sys/fs/cgroup/pids
cgroup             0     0     0    - /sys/fs/cgroup/freezer
cgroup             0     0     0    - /sys/fs/cgroup/memory
cgroup             0     0     0    - /sys/fs/cgroup/cpu,cpuacct
cgroup             0     0     0    - /sys/fs/cgroup/devices
cgroup             0     0     0    - /sys/fs/cgroup/blkio
cgroup             0     0     0    - /sys/fs/cgroup/net_cls,net_prio
cgroup             0     0     0    - /sys/fs/cgroup/perf_event
systemd-1          -     -     -    - /proc/sys/fs/binfmt_misc
hugetlbfs          0     0     0    - /dev/hugepages
mqueue             0     0     0    - /dev/mqueue
debugfs            0     0     0    - /sys/kernel/debug
fusectl            0     0     0    - /sys/fs/fuse/connections
/dev/sda7       3.0G  1.3G  1.7G  44% /mnt/DOS_E
/dev/sda8        22G  6.1G   15G  30% /mnt/save
binfmt_misc        0     0     0    - /proc/sys/fs/binfmt_misc
tmpfs           276M   44K  276M   1% /run/user/1000
gvfsd-fuse      0.0K  0.0K  0.0K    - /run/user/1000/gvfs
janos@acerlinux:~/Desktop$

FC3df -ha

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdb1              18G  7.0G   11G  41% /
none                     0     0     0   -  /proc
none                     0     0     0   -  /sys
none                     0     0     0   -  /dev/pts
none                  506M     0  506M   0% /dev/shm
none                     0     0     0   -  /proc/bus/usb
none                     0     0     0   -  /proc/sys/fs/binfmt_misc
none                     0     0     0   -  /var/named/chroot/proc

FC3ls | grep hp5400.conf

hp5400.conf

FC3ls | grep hp 5550.conf没有输出。

因此,需要注意以下几点:(a)FC3 和 64 位 Ubuntu 笔记本电脑都没有 hp5550.conf 文件,但两台机器上的扫描仪都可以工作;(b)32 位和 64 位 Ubuntu 都没有挂载 usbfs,但扫描仪可以在 64 位 Ubuntu 上运行,但在 32 位 Ubuntu 上不能运行。

关于尝试建议的软件包的附加信息:

janos@AndrasXubuntu:~/Desktop$ sudo dpkg -i libsane-dev_1.0.25+git20150528-1ubuntu2.16.04.1_i386.deb 
[sudo] password for janos: 
(Reading database ... 196333 files and directories currently installed.)
Preparing to unpack libsane-dev_1.0.25+git20150528-1ubuntu2.16.04.1_i386.deb ...
Unpacking libsane-dev (1.0.25+git20150528-1ubuntu2.16.04.1) over (1.0.25+git20150528-1ubuntu2) ...
dpkg: dependency problems prevent configuration of libsane-dev:
 libsane-dev depends on libsane (= 1.0.25+git20150528-1ubuntu2.16.04.1); however:
  Version of libsane:i386 on system is 1.0.25+git20150528-1ubuntu2.

dpkg: error processing package libsane-dev (--install):
 dependency problems - leaving unconfigured
Processing triggers for doc-base (0.10.7) ...
Processing 1 changed doc-base file...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 libsane-dev
janos@AndrasXubuntu:~/Desktop$ sudo dpkg -i libsane_1.0.25+git20150528-1ubuntu2.16.04.1_i386.deb 
[sudo] password for janos: 
(Reading database ... 196333 files and directories currently installed.)
Preparing to unpack libsane_1.0.25+git20150528-1ubuntu2.16.04.1_i386.deb ...
Unpacking libsane:i386 (1.0.25+git20150528-1ubuntu2.16.04.1) over (1.0.25+git20150528-1ubuntu2) ...
dpkg: dependency problems prevent configuration of libsane:i386:
 libsane:i386 depends on libsane-common (= 1.0.25+git20150528-1ubuntu2.16.04.1); however:
  Version of libsane-common on system is 1.0.25+git20150528-1ubuntu2.

dpkg: error processing package libsane:i386 (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Errors were encountered while processing:
 libsane:i386
janos@AndrasXubuntu:~/Desktop$

答案1

我没有那个特定的扫描仪可供测试,但研究表明,特定型号需要使用sane-hp5590 后端由包提供libsane-dev与 sane 一起运行。安装该软件包应该可以解决您的问题并允许您正常配置 sane。

笔记:我可以在这个后端找到的第一个文档表明它最初是为 64 位系统设计的,基于它所放置的文件 /usr/lib64/sane/32 位版本有相同的文件,/usr/lib/i386-linux-gnu/sane/因此看起来它受支持。但是我无法确认或否认这一点,因为我没有可用于测试的硬件。这可能很快就会成为一个没有实际意义的问题,因为 32 位支持即将消失,这一点已经变得非常明显。请参阅故事在这里和一个32 位处理器列表已经删除

有时扫描仪会得到默认未启用的合理后端的支持。启用它通常可以使事情正常进行。

检查以确保您的扫描仪受支持这里。在您的情况下,4500C 被列为完全支持,而 5500C 被列为未经测试。

/etc/sane.d/dll.conf通过编辑并取消注释或添加该行来启用适当的后端hp5590(如果有疑问,请检查其他 Linux 上上述文件中的工作配置以获取线索)完成编辑任务后,保存并关闭文件。

继续运行该命令sane-find-scanner(如果这不起作用,则可能是权限问题,在这种情况下,您可能会得到不同的结果sudo sane-find-scanner

该命令的输出将如下所示:

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x01aa [EXAMPLE], product=0x0001 [EXAMPLE SCANNER]) at libusb:001:003

  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

现在将扫描仪添加到后端配置文件:

每个合理的后端都有自己的配置文件。

  1. 下一步我们需要 sane-find-scanner 的结果。你可以忽略以井号开头的所有内容,但重要的是这一行:

    在 libusb:001:003 处找到 USB 扫描仪(供应商=0x01aa [示例],产品=0x0001 [示例扫描仪])

  2. 我们需要将这两个值添加到扫描仪的后端,在本例中为示例后端。为此,使用以下命令以 root 身份启动 gedit:

gksudo gedit /etc/sane.d/hp5590.conf(通过检查来仔细检查conf文件的拼写是否符合你的情况ls /etc/sane.d

  1. 找到以下行:

usb

在其后我们需要添加一行,其中包含单词“usb”,后面跟着供应商编号和使用 scanimage -L 命令获得的产品编号。该行应类似于以下内容:

usb 0x01aa 0x0001或者根据您的情况usb 03f0:1205(根据您的lsusb输出。)

编辑:如果其他方法都失败了,你可以尝试为您的版本推荐 32 位 libsane-dev 包。然而,这是否会成功可能取决于这个错误我建议您订阅它,以便开发人员可以最好地优先考虑他们的工作。

资料来源:

http://manpages.ubuntu.com/manpages/xenial/man5/sane-hp.5.html

http://www.sane-project.org/man/sane-hp5590.5.html

http://packages.ubuntu.com/xenial/amd64/libsane-dev/filelist

https://help.ubuntu.com/community/SANE%20-%20Installing%20a%20scanner%20that%20isn%27t%20auto-detected

答案2

我在 Debian 上使用 HP 扫描仪 (HP DeskJet 1050A) 时也遇到了同样的问题。修复这个问题的方法是

  • sudo adduser <user> lp
  • sudo apt-get install libsane-hpaio
  • 注销并重新登录(获取lp权限)

相关内容