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

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

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

通过我的 MFC-420CN 进行扫描在 Ubuntu 和 Linux Mint 安装中一直有效,直到 Olivia 和 Oneric。然而,一旦我从这些升级,扫描就中断了。我安装了一份全新的 saucy 副本,以验证这不仅仅是与升级有关。

Brother 网站上有通知,从 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-350C DCP-353C DCP-357C DCP-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-240C MFC-260C MFC-3240C MFC-3340CN MFC-3360C MFC-410CN MFC-420CN MFC-425CN MFC-440CN MFC-465CN MFC-5440CN MFC-5460CN MFC-5840CN MFC-5860CN MFC-620CN MFC-640CW MFC-660CN MFC-665CW MFC-680CN MFC-685CW MFC-7220 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

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

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

代码:

# Brother scanners

ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
  • 将文件从 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 .
  • 安装 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).
  • 使用 WINE 模拟 Win2000 或 XP 的 32 位 Windows 驱动程序——它在 2000 年几乎完成。

调试 64 位驱动程序:

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

# scanimage -L
device `brother2:bus5;dev2' is a Brother DCP-350C USB scanner

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

> sudo scanimage >image.pnm
scanimage: open of device brother2:bus2;dev4 failed: Invalid argument

xsane 产生类似的错误:

 Failed to start scanner: Invalid argument

sane-find-scanner 产生管道错误,如下所示: http://pastebin.com/tTNMyD1m 但这似乎与兄弟提供司机有关,不太理智。

我现在很困惑,任何帮助我都会很感激。

答案1

更新到 13.10 后,扫描时出现同样的错误。这里有两个问题。

  1. 错误无效的论点不是一个参数问题,而是一个写访问问题。
  2. 另一个问题是 scanimage 错误导致总线和设备编号错误。

如何发现并修复问题?

从兄弟网站安装 brscan4 驱动程序

sudo dpkg -i brscan4-0.4.2-1.amd64.deb

检查是否有效

sudo brsaneconfig4 -d

测试扫描仪是否已安装(扫描仪需要打开电源)。并以用户身份运行,而不是 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

或者

$ scanimage
scanimage: open of device brother4:bus5;dev1 failed:
Invalid argument

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

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

lsusb列出 USB 设备

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

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

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

以下是有关我们为何采取上述行动的更多详细信息

要找出兄弟扫描仪在总线上的位置,请使用lsusb。这是 scanimage 中的问题之一。总线为 003,设备为 002,而不是总线 5,设备 1,如 scanimage 所示

$ lsusb
Bus 003 Device 002: ID 04f9:60a0 Brother Industries, Ltd**  
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...

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

例子:

sudo cd /dev/bus/usb/003
sudo chmod 666 002

要不就:

sudo chmod 666 /dev/bus/usb/003/002

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

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

答案2

只需将您的用户添加到该lp组:

usermod -a -G lp username

此后,您将拥有扫描仪的写权限。

已测试:

  • 14.04 LTS 64 位最新
  • 兄弟 DCP-J315W
  • 从 Brother 支持中心下载的 linux-brprinter-installer-2.0.0-1

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

crw-rw-r-- 1 root lp

因此,将您的用户添加到lp组是一种解决方案。

答案3

尝试一下这个名为 VueScan 的程序,我正在寻找 mfc-420cn 驱动程序,然后我遇到了这个网站:“http://www.hamrick.com/“虽然我还没有能够测试这一点(因为我还没有找到已经积满灰尘的旧打印机的电源线),但它确实说它可以支持各种各样的打印机,所以我想我应该发布它。无论如何,希望这会有所帮助。

答案4

我正在使用 Ubuntu 13.10 32 位

我使用 MFC-7820N,每次升级内核时,我都必须重新安装所有兄弟驱动程序。我拥有的驱动程序有:brmfc7840nlpr-2.0.2-1.i386、brscan2-0.2.5-1.i386、cupswrapperMFC7840N-2.0.2-1.i386

然后我仔细检查规则“ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"”在 /lib/udev/rules.d/40-libsane.rules 中没有被修改或删除

完成所有操作后我重新启动。

最后,我将为兄弟打印机提供自己的 USB 主机控制器,作为额外的测试措施。

相关内容