无法使用 Canon TR4550 进行扫描:SANE_STATUS_DEVICE_BUSY 错误

无法使用 Canon TR4550 进行扫描:SANE_STATUS_DEVICE_BUSY 错误

我刚买了一台佳能 Pixma TR4550。它通过 USB 连接到运行 Ubuntu 20.04 的台式机。

  • 为了打印,我安装了佳能提供的“cnijfilter2-5.70-1-deb”。打印效果很好。
  • 为了扫描,我安装了佳能提供的“scangearmp2-3.70-1-deb”,但我无法使其工作,尽管安装正常且没有任何错误。

扫描仪似乎被正确检测到:

$ scanimage -L
device `pixma:04A91854' is a CANON Canon PIXMA TR4500 Series multi-function peripheral
device `escl:http://127.0.0.1:60000' is a ESCL TR4500 series flatbed scanner

当我启动简单扫描时,它也被检测到:

检测正常

但是当我按下扫描按钮时,它返回一个错误(无法连接......”),这是“simple-scan -d”命令的输出:

pascal$ simple-scan -d
[+0,00s] DEBUG: simple-scan.vala:1720: Starting simple-scan 3.36.3, PID=13292
[+0,00s] DEBUG: unsetenv() is not thread-safe and should not be used after threads are created
[+0,01s] DEBUG: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
[+0,06s] DEBUG: app-window.vala:1906: Loading state from /home/pascal/.cache/simple-scan/state
[+0,06s] DEBUG: app-window.vala:1885: Restoring window to 676x421 pixels
[+0,12s] DEBUG: scanner.vala:1539: sane_init () -> SANE_STATUS_GOOD
[+0,12s] DEBUG: scanner.vala:1545: SANE version 1.0.31
[+0,12s] DEBUG: scanner.vala:1606: Requesting redetection of scan devices
[+0,12s] DEBUG: scanner.vala:828: Processing request
[+0,51s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+8,29s] DEBUG: scanner.vala:341: sane_get_devices () -> SANE_STATUS_GOOD
[+8,29s] DEBUG: scanner.vala:353: Device: name="pixma:04A91854" vendor="CANON" model="Canon PIXMA TR4500 Series" type="multi-function peripheral"
[+8,29s] DEBUG: scanner.vala:353: Device: name="escl:http://127.0.0.1:60000" vendor="ESCL" model="TR4500 series" type="flatbed scanner"
[+8,61s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+11,47s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+14,08s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+15,77s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+15,99s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+16,04s] DEBUG: simple-scan.vala:1536: Requesting scan at 300 dpi from device 'pixma:04A91854'
[+16,04s] DEBUG: scanner.vala:1674: Scanner.scan ("pixma:04A91854", dpi=300, scan_mode=ScanMode.COLOR, depth=8, type=single, paper_width=0, paper_height=0, brightness=0, contrast=0, delay=3000ms)
[+16,04s] DEBUG: scanner.vala:828: Processing request
[+16,37s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+16,56s] DEBUG: scanner.vala:889: sane_open ("pixma:04A91854") -> SANE_STATUS_DEVICE_BUSY
[+16,56s] WARNING: scanner.vala:893: Unable to open device: Device busy
[+16,89s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state

知道这里出了什么问题吗?为什么是 SANE_STATUS_DEVICE_BUSY?

注意:我尝试启动“scangearmp2”命令,但它说“未检测到扫描仪”,并且研究永无止境。

答案1

当我让它工作时,我回复自己:我刚刚使用 Wifi 连接了打印机!(顺便说一下,这是佳能推荐的)

我卸载了 scangearmp2 驱动程序,因为它似乎没用(无法检测到扫描仪,见上文),然后我断开 USB 电缆,并使用 WPS 方法将打印机连接到我的 wifi 网络(昨天,我尝试使用打印机键盘输入 wifi 密码,但很乱,因此我使用了我的 USB 电缆......)。

没什么别的事可做,现在一切正常:

pascal$ scanimage -L

device `escl:https://192.168.1.29:443' is a Canon TR4500 series flatbed scanner
[~]
pascal$ 
[~]
pascal$ simple-scan -d
[+0,00s] DEBUG: simple-scan.vala:1720: Starting simple-scan 3.36.3, PID=26141
[+0,00s] DEBUG: unsetenv() is not thread-safe and should not be used after threads are created
[+0,02s] DEBUG: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
[+0,07s] DEBUG: app-window.vala:1906: Loading state from /home/pascal/.cache/simple-scan/state
[+0,07s] DEBUG: app-window.vala:1885: Restoring window to 676x421 pixels
[+0,13s] DEBUG: scanner.vala:1539: sane_init () -> SANE_STATUS_GOOD
[+0,13s] DEBUG: scanner.vala:1545: SANE version 1.0.31
[+0,13s] DEBUG: scanner.vala:1606: Requesting redetection of scan devices
[+0,13s] DEBUG: scanner.vala:828: Processing request
[+0,54s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+8,06s] DEBUG: scanner.vala:341: sane_get_devices () -> SANE_STATUS_GOOD
[+8,06s] DEBUG: scanner.vala:353: Device: name="escl:https://192.168.1.29:443" vendor="Canon" model="TR4500 series" type="flatbed scanner"
[+8,36s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+12,86s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+14,19s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+14,34s] DEBUG: simple-scan.vala:1536: Requesting scan at 300 dpi from device 'escl:https://192.168.1.29:443'
[+14,34s] DEBUG: scanner.vala:1674: Scanner.scan ("escl:https://192.168.1.29:443", dpi=300, scan_mode=ScanMode.COLOR, depth=8, type=single, paper_width=0, paper_height=0, brightness=0, contrast=0, delay=3000ms)
[+14,34s] DEBUG: scanner.vala:828: Processing request
[+14,66s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+14,98s] DEBUG: scanner.vala:889: sane_open ("escl:https://192.168.1.29:443") -> SANE_STATUS_GOOD

解决这个问题是件好事!

编辑:在调查期间,我更新了 libsane-common理智项目网站。不确定这是否是必需的,但最好提到:

pascal$ sudo apt show libsane-common
[sudo] Mot de passe de pascal : 
Package: libsane-common
Version: 1.0.31+git20210131-focal0

编辑 2:我在托管模式下检测来自 VM (QEMU) 的扫描仪时遇到问题。通过编辑/etc/sane.d/escl.conf文件并添加如下所示的新设备行解决了此问题:

device https://192.168.1.29:443 "Canon TR4550 Serie"

scanimage -L(如上图主机的输出所示)。

相关内容