通过USB启动从Fujitsu ix500到Linux的扫描


2

我想通过按扫描仪的扫描按钮开始扫描,并将数据传送到Linux机器。

不幸的是,我不能使用扫描仪的WLAN接口,所以我坚持使用USB。

有没有机会让这项工作?

以下是一些实现这一目标的推测方法。你有没有成功?

  • 在Linux上运行客户端(部分)遵守在ScanSnap的Windows和macOS客户端中实现的协议(不太可能)
  • 在扫描仪上安装USB转以太网适配器,让扫描仪将其用作以太网设备。然后我可以扫描到FTP。
  • 通过Wine安装官方Windows客户端。

Answers:


2

scanimage通过usb支持ix500扫描仪

例:

scanimage -L
device `fujitsu:ScanSnap iX500:59766' is a FUJITSU ScanSnap iX500 scanner

那么什么错过了按钮的触发器。我发现

https://www.camroncade.com/cloud-scanner-with-raspberry-pi-fujitsu-ix500-2/

提到scanbuttond包。德语描述如下:

两者都有点过时,但对一般想法给出了一些提示。以下是使用Ubuntu 18.04 LTS虚拟机进行试用的说明。安装后

sudo apt-get install scanbuttond

我通过将USB设备分配给虚拟机来连接扫描仪。

scanimage -L

如上所述工作。

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=0x04c5 [Fujitsu], product=0x132b [ScanSnap iX500]) at libusb:003:007
could not fetch string descriptor: Input/output error
could not fetch string descriptor: Input/output error
could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
could not fetch string descriptor: Input/output error
  # 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.

看起来很有希

sudo scanbd -d7 -f

在调试设置为高级别的前台启动守护进程。在我的情况下,我不得不在dll.conf中注释掉一些扫描仪驱动程序,以摆脱我网络上可用的不同扫描仪的结果。

由于错误https://bugs.launchpad.net/ubuntu/+source/scanbd/+bug/1747115 我还必须更改用户/组设置。

diff --git a/scanbd/scanbd.conf b/scanbd/scanbd.conf
index 5d74933..1356236 100644
--- a/scanbd/scanbd.conf
+++ b/scanbd/scanbd.conf
@@ -39,8 +39,8 @@ global {
         # ArchLinux (ArchLinux doesn't have saned user)
         # user    = daemon
         # *BSD
-        # user    = root
-        user    = saned
+        user    = root
+        #user    = saned

我在scanbd.conf中添加了测试脚本的完整路径5次,在scanner.d / fujitsu.conf中添加了4次:

root@fur:/etc/scanbd# grep scan.sh scanbd.conf 
                script = "/home/wf/bin/scan.sh"
                script = "/home/wf/bin/scan.sh"
                script = "/home/wf/bin/scan.sh"
                script = "/home/wf/bin/scan.sh"
                script = "/home/wf/bin/scan.sh"
root@fur:/etc/scanbd# cd scanner.d/
root@fur:/etc/scanbd/scanner.d# grep scan.sh fujitsu.conf 
                script = "/home/wf/bin/scan.sh"
                script = "/home/wf/bin/scan.sh"
                script = "/home/wf/bin/scan.sh"
                script = "/home/wf/bin/scan.sh"

使用脚本scan.sh:

#!/bin/bash
# WF 2018-12-18
echo "scanning"
echo "scan button pressed on ix500" >> /tmp/ix500.log

然后我测试了

sudo scanbd -f

在一个终端和

tail -f /tmp/ix500.log

在另一个。

scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
scanbd: SANE_CONFIG_DIR not set
scanbd: Not Primary Owner (-1)
scanbd: Name Error (Connection ":1.96" is not allowed to own the service "de.kmux.scanbd.server" due to security policies in the configuration file)
scanbd: trigger action for page-loaded for device fujitsu:ScanSnap iX500:59766 with script /home/wf/bin/scan.sh
scanning

显示守护进程的前景输出

scan button pressed on ix500

从这里看起来似乎都是下坡 - 传递的环境变量在scanbd.conf文件中描述。

例如,将scan.sh修改为:

#!/bin/bash
# WF 2018-12-18
echo "scanning"
cat << EOF >> /tmp/ix500.log
scan button pressed on ix500
function: $SCANBD_FUNCTION
mode: $SCANBD_FUNCTION_MODE
device: $SCANBD_DEVICE
action: $SCANBD_ACTION
EOF

将创造

scan button pressed on ix500
function: 1
mode: Lineart
device: fujitsu:ScanSnap iX500:59766
action: scan

按下扫描按钮:-)

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.