无效参数 - 升级后 Brother 扫描仪不工作(brscan2 驱动程序)

vir*_*xtc 34 scanner mint brother 13.10

我最近升级了 Ubuntu 13.10 (Saucy)。

通过我的 MFC-420CN 进行扫描一直在 Ubuntu 和 Linux Mint 中通过 Olivia 和 Oneric 安装。但是,一旦我从这些升级,扫描就会中断。我安装了一个新的 saucy 副本来验证它不仅仅是与升级有关。

兄弟官网上有通知,从Ubuntu 11.10开始,所有brscan1型号都不再支持usb扫描,但似乎不适用于brscan2和brscan3型号。此外,我发现其他几篇文章似乎表明至少 brscan4 模型目前正在工作。但是,我无法验证使用 brscan2(或 brscan4 以外的其他潜水员)和 ubuntu 13.10(实际上是 12.10 及更高版本)的扫描仪当前是否正在运行。

为了交叉引用/帮助其他人解决问题,brscan2 扫描仪的完整列表如下:

DCP-110C DCP-115C DCP-117C DCP-120C DCP-130C DCP-135C DCP-150C DCP-153C DCP-155C DCP-310CN DCP-315CN DCP-330C DCP-340CW DCP-340CW DCP-3535 540CN DCP-560CN DCP-7010 DCP-7020 DCP-7025 DCP-750CW DCP-770CW DCP-8060 DCP-8065DN MFC-210C MFC-215C MFC-230C MFC-235C MFC-235C MFC-770CW DCP-8060 MFC-235C MFC-230MFC-240 MFC-240 -3360C MFC-410CN MFC-420CN MFC-425CN MFC-440CN MFC-465CN MFC-5440CN MFC-5460CN MFC-5840CN MFC-5860CN MFC-620CN MFC-640CW MFC-6606CWFC-6656CWFC20MFC-6656CWFC52MFC MFC-7225N MFC-7420 MFC-7820N MFC-820CW MFC-845CW MFC-8460N MFC-8660DN MFC-8670DN MFC-885CW MFC-8860DN MFC-8870DW MFC-9420CN

类似的先前提出的问题/问题(但针对 brscan3 驱动程序硬件):


到目前为止,我已经尝试过:

  • 安装 sane-utils

  • 兄弟网站上关于 brscan2 安装的说明,包括使用 dpkg -f 标志

  • 编辑 /lib/udev/rules.d/40-libsane.rules 以包括

代码:

# Brother scanners

ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
Run Code Online (Sandbox Code Playgroud)
  • 将文件从 lib 复制到 lib64:

代码:

cd /usr/lib
ln -s ../lib64/libbrscandec2.so.1.0.0 .
ln -s ../lib64/libbrcolm2.so.1.0.1 .
ln -s ../lib64/libbrcolm2.so .
ln -s ../lib64/libbrscandec2.so.1 .
ln -s ../lib64/libbrscandec2.so .
ln -s ../lib64/libbrcolm2.so.1
cd sane
ln -s ../../lib64/sane/libsane-brother2.so.1.0.7 .
ln -s ../../lib64/sane/libsane-brother2.so.1 .
ln -s ../../lib64/sane/libsane-brother2.so .
Run Code Online (Sandbox Code Playgroud)
  • 安装 ia32-libs 并重复 sane-utils 安装
  • 删除 64 位 brscan2 驱动程序并将其替换为 32 位驱动程序,但是使用 32 位驱动程序设置为 USB 或网络模式的 scanimage 结果不太理想:

代码:

# scanimage -L

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).
Run Code Online (Sandbox Code Playgroud)
  • 32 位 Windows 驱动程序与 WINE 集成 Win2000 或 XP——它几乎在 2000 年完成。

调试 64 位驱动程序:

安装 brscan2 后,我可以打开简单扫描并找到扫描仪;此外 scanimage 输出表明一切正常:

# scanimage -L
device `brother2:bus5;dev2' is a Brother DCP-350C USB scanner
Run Code Online (Sandbox Code Playgroud)

但是扫描(即使是 root 用户)仍然不起作用。

> sudo scanimage >image.pnm
scanimage: open of device brother2:bus2;dev4 failed: Invalid argument
Run Code Online (Sandbox Code Playgroud)

xsane 产生类似的错误:

 Failed to start scanner: Invalid argument
Run Code Online (Sandbox Code Playgroud)

sane-find-scanner 产生如下所示的管道错误:http : //pastebin.com/tTNMyD1m 但这似乎与兄弟提供驱动程序的事实有关,而不是理智的。

我很困在这一点上,任何帮助将不胜感激。

小智 26

更新到 13.10 后,我在扫描时遇到了同样的错误。这里有两个问题。

  1. 错误无效参数不是参数问题,而是写访问问题。
  2. 另一个问题是由于 scanimage 错误,总线和开发编号是错误的。

如何发现并解决问题?

从兄弟网站安装brscan4驱动

sudo dpkg -i brscan4-0.4.2-1.amd64.deb
Run Code Online (Sandbox Code Playgroud)

检查它是否有效

sudo brsaneconfig4 -d
Run Code Online (Sandbox Code Playgroud)

测试是否安装了扫描仪(扫描仪需要开机)。并以用户而非 root 身份运行

$ scanimage -L
device `brother4:bus5;dev1' is a Brother ADS-2000 USB scanner
$ scanimage --test
scanimage: open of device brother4:bus5;dev1 failed:
Invalid argument
Run Code Online (Sandbox Code Playgroud)

或者

$ scanimage
scanimage: open of device brother4:bus5;dev1 failed:
Invalid argument
Run Code Online (Sandbox Code Playgroud)

您可以使用以下脚本更新扫描仪的权限。

lsusb | grep -i brother | sed 's/://' | awk '{printf "/dev/bus/usb/%s/%s", $2,$4}' | xargs -i -t sudo chmod 666 "{}"
Run Code Online (Sandbox Code Playgroud)

lsusb 列出 USB 设备

grep -i brother 会找到兄弟设备(我假设你一次只有一个兄弟设备连接到 USB)

sed 's/://' | awk '{printf "/dev/bus/usb/%s/%s", $2,$4}' 会找到总线和设备号

xargs -i -t sudo chmod 666 "{}" 将为扫描仪添加写入权限

以下是有关我们为什么要执行上述操作的更多详细信息

要找出兄弟扫描仪在公共汽车上的位置,请使用lsusb。这是扫描图像中的问题之一。总线是 003,设备是 002 而不是总线 5,根据 scanimage 的 dev 1

$ lsusb
Bus 003 Device 002: ID 04f9:60a0 Brother Industries, Ltd**  
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...
Run Code Online (Sandbox Code Playgroud)

要解决此问题,您需要使用基于lsusb命令中兄弟扫描仪位置的路径。就我而言,它是bus 003device 002。请注意,如果您将 USB 电缆拔出扫描仪并将其重新插入设备,您将获得一个新号码和/或总线。(当您重新启动 PC 时,该数字会恢复为 2)

例子:

sudo cd /dev/bus/usb/003
sudo chmod 666 002
Run Code Online (Sandbox Code Playgroud)

要不就:

sudo chmod 666 /dev/bus/usb/003/002
Run Code Online (Sandbox Code Playgroud)

Scanimage 当它无法访问扫描仪以获得正确的总线和开发编号时,需要修复消息,并告诉用户问题是写访问问题。

Brother需要更新驱动程序代码,以便全局用户可以写入扫描仪,即chmod 666扫描仪驱动程序位置

  • 它没有为我修好 (2认同)
  • 这个解决方案适用于我的 Lubuntu 16.04 和 Brother DCP-7030。但是,重新启动后,所有权限都会重置。看起来需要 udev 规则? (2认同)

Bel*_*era 5

Just add your user to the lp group:

usermod -a -G lp username
Run Code Online (Sandbox Code Playgroud)

After this you will have write permissions for your scanner.

Tested with:

  • 14.04 LTS 64 bit up-to-date
  • Brother DCP-J315W
  • linux-brprinter-installer-2.0.0-1 downloaded from Brother Support Center

打印机/扫描仪的权限为/dev/bus/usb/001

crw-rw-r-- 1 root lp
Run Code Online (Sandbox Code Playgroud)

正因为如此,将您的用户添加到lp组中是一个解决方案。