Package Details: brscan2 0.2.5_1-1

Git Clone URL: https://aur.archlinux.org/brscan2.git (read-only, click to copy)
Package Base: brscan2
Description: SANE driver from Brother for brscan2 models
Upstream URL: http://support.brother.com
Licenses: GPL, custom:brother
Submitter: leidola
Maintainer: pmattern
Last Packager: pmattern
Votes: 38
Popularity: 0.000000
First Submitted: 2008-08-15 02:08 (UTC)
Last Updated: 2015-08-04 22:29 (UTC)

Latest Comments

SvenX commented on 2021-04-09 06:58 (UTC) (edited on 2021-04-09 07:04 (UTC) by SvenX)

Installed it yesterday and found out, that the udev rule in https://wiki.archlinux.org/index.php/SANE#Permission_problem was wrong. It stated group="scanner" which removed printing permissions from CUPS. The site https://wiki.archlinux.org/index.php/CUPS/Troubleshooting#Conflict_with_SANE had it correct so I fixed the SANE page accordingly. To print and scan with CUPS and SANE add the following udev rule file:

/etc/udev/rules.d/99-printer.rules

# Brother device rule for printing with CUPS and scanning with SANE
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="*", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"

Then reboot or reload rules to fix printing and scanning. This worked for me with a Brother DCP-135C.

docquantum commented on 2020-12-14 22:56 (UTC)

I didn't have issues with installation like other commenters did. In fact, the lib64 was symlinked to lib on my system. I but did have permissions issues with simple-scan and xsane however. I had to run either of them as root to be able to communicate with the USB scanner (MFC-7420).

congtyproship commented on 2019-05-23 08:42 (UTC)

Thanks for sharing, nice post!!!https://muahangamazon.net/dich-vu-giao-hang-tan-noi-gia-re.html

giaonhanquocte commented on 2018-05-03 18:06 (UTC)

Thanks for sharing, nice post!!! https://giaonhanquocte247.com/order-hang-nhat/

reuver commented on 2018-04-14 12:00 (UTC)

I plugged in my old MFC as a scanner. Since I had a hard time finding the missing links in the installation process I will document them here:

First install the following packages: - brscan2 - sane-utils - xsane Most users will have a 64-bit distribution nowadays, therefore the standard package from 2011 installs wrong.

To get all working you need:

brsaneconfig2 -a name=mfc model=MFC-xxxxxx ip=aa.bb.cc.dd

This creates /usr/local/Brother/sane/brsanenetdevice2.cfg It also adds a line with "brother2" to /etc/sane.d/dll.conf The simple test however will fail.

scanimage -L

This fails because the libraries are not in the right place.

Copying the libraries from /usr/lib64 to /usr/lib solves the problem mentioned above:

cp -a /usr/lib64/* /usr/lib

(Note: all commands following '#' asume root login. You might use sudo instead.)

Now scanimage will work as intended, als will xsane and gimp.

scanimage -L

device `brother2:net1;dev0' is a Brother MFC-xxxxxx mfc

Adding the (fixed) IP-number to /etc/sane.d/net.conf makes no difference for me.

After installation and testing as root using the scanner under my normal user-ID proved to be no problem. $ scanimage -L device `brother2:net1;dev0' is a Brother MFC-xxxxxx mfc

After this test xsane also works as intended.

swiftgeek commented on 2018-03-03 14:37 (UTC) (edited on 2018-03-03 14:37 (UTC) by swiftgeek)

EDIT: It simply does NOT work with xhci controllers and works fine with ehci one even with recent sane version (1.0.27-1). So simply connect scanner to your USB2.0 port

Fails for me as well, i tried downgrading sane right down to 1.0.22 (2009-2012) and it still fails with the same error

Related thread on stackexchange: https://unix.stackexchange.com/questions/359210/brother-dcp-110c-integrated-scanner-not-working-in-mint-18-1-x64

FreddieChopin commented on 2018-01-14 13:47 (UTC) (edited on 2018-01-14 13:47 (UTC) by FreddieChopin)

I cannot make DCP-135C working... I had to add VID and PID to the udev rules manually, but this did not change anything. No matter what I do I get:

$ scanimage --test

scanimage: open of device brother2:bus6;dev4 failed: Invalid argument

$ scanimage -L

device `brother2:bus6;dev4' is a Brother DCP-135C USB scanner

$ lsusb

Bus 002 Device 002: ID 8087:8001 Intel Corp.

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 8087:8009 Intel Corp.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 003 Device 008: ID 046d:c52b Logitech, Inc. Unifying Receiver

Bus 003 Device 007: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub

Bus 003 Device 006: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub

Bus 003 Device 005: ID 04f9:01ce Brother Industries, Ltd DCP-135C

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Any ideas?

AJSlye commented on 2015-02-26 04:29 (UTC)

I solved my issue by using the brscan2-network AUR package instead: https://aur.archlinux.org/packages/brscan2-network/

AJSlye commented on 2015-02-25 22:25 (UTC)

This seems to be still broken, here is what I'm getting: # scanimage -L bugchk_free(ptr=(nil))@brother_modelinf.c(482) Aborted (core dumped) But It works as root: # scanimage -L bugchk_free(ptr=(nil))@brother_modelinf.c(482) What Am I doing Wrong?

crs commented on 2015-01-11 06:11 (UTC)

/usr/local/Brother is referenced in libsane-brother2.so.1.0.7 the PKGBUILD tries to relocate the files in the RPM package from /usr/local/Brother to /usr/share/brother, but does an incomplete job. This seems contrary to KISS, and the renaming of lib64 to lib seemed inelegant too, so I found a way to do that while extracting from the RPM: if [ "$CARCH" == "i686" ]; then source="http://www.brother.com/pub/bsc/linux/dlf/$pkgname-$pkgver-$pkgrel.i386.rpm" md5sums='944432983dcb918704862147b2a27977' else source="http://www.brother.com/pub/bsc/linux/dlf/$pkgname-$pkgver-$pkgrel.x86_64.rpm" md5sums='88ab217b814ba87ac855b21dc037e0ac' fi rpm=`basename ${source[0]}` noextract=($rpm) # we'll extract manually in prepare() source+=('scanner-license.txt') md5sums+=('SKIP') prepare() { # change "lib64" to "lib" in paths and symlinks rpm2cpio $rpm | bsdtar -xpf - -s @/lib64/@/lib/@ } package() { cp -pR "$srcdir/usr" "$pkgdir" install -m 644 -D scanner-license.txt \ "${pkgdir}/usr/share/licenses/${pkgname}/scanner-license.txt" } And finally, a suggestion for updating /etc/sane.d/dll.conf from brscan2.install: post_install() { echo 'brother2 #brscan2#' >> /etc/sane.d/dll.conf } post_remove() { sed -i '/#brscan2#/d' /etc/sane.d/dll.conf }

ams1 commented on 2014-12-04 17:05 (UTC)

I added that info to the wiki page for dcp150c.

robtaylor commented on 2014-09-17 20:15 (UTC)

I can confirm that to stop the crash on x86_64 you need sudo ln -s /usr/share/brother/sane/ /usr/local/Brother/sane However I can see no reason that it's trying to open /usr/local/Brother/sane/Brsane2.ini. strace confirms that it is, but I can find no occurance of /usr/local in any of the installed files! May break out a debug build of glibc and see if I can figure what's going on...

Evilandi666 commented on 2014-07-29 11:57 (UTC)

I try to fix those bugs on x86_64

commented on 2014-07-23 12:33 (UTC)

As the problem only seems to occur on 64-bit and I cannot test this myself, I will disown the package so that someone else can pick this up.

commented on 2014-07-23 12:26 (UTC)

@pavbaranov: thx, great tip! as this PKGBUILD didnt work on x86_64 (only i686) used this PKGBUILD according to the wiki: pkgname=brscan2 pkgver=0.2.5 pkgrel=1 pkgdesc="SANE drivers from Brother for model-2 scanners" arch=('i686' 'x86_64') url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html" license=('custom') depends=('libusb-compat') makedepends=('rpmextract') source=("http://download.brother.com/welcome/dlf006639/brscan2-0.2.5-1.i386.rpm" "http://download.brother.com/welcome/dlf006640/brscan2-0.2.5-1.x86_64.rpm" 'LICENSE') sha256sums=('f9c12f8467288c48cd00b532b2c64f53764a001f4b193f1c5f1ac746a1bd7c9c' 'ab02c4e2292e9847a0338a225973735ccaec49c3d443f584004c8f91f5d6a8c9' '52d228e8cf2f8b0b25d7c86f8ecb2151bbd7cbe6ec322c26471ae6d7276ecc99') noextract=('brscan2-0.2.5-1.i386.rpm' 'brscan2-0.2.5-1.x86_64.rpm') build() { cd "${srcdir}" if [[ $CARCH = "i686" ]]; then echo "using: brscan2-0.2.5-1.i386.rpm" rpmextract.sh brscan2-0.2.5-1.i386.rpm else echo "using: brscan2-0.2.5-1.x86_64.rpm" rpmextract.sh brscan2-0.2.5-1.x86_64.rpm fi } package() { mv -v "${srcdir}/usr" "${pkgdir}/" # install LICENSE install -Dm0644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }

lsandig commented on 2014-07-13 13:56 (UTC)

@libernux Tested it, still won't work without a link from /usr/local/Brother to /usr/share/brother

commented on 2014-07-10 21:54 (UTC)

I've looked into this and I found a reference to '/usr/local' in one of the shared-libraries. The reference to '/usr/local' is now replaced by '/usr/share'. I hope this fixes all problems. Can someone please test this on 64-bit Arch.

commented on 2014-07-10 12:48 (UTC)

are you on 64-bit?

RoBug commented on 2014-07-09 20:33 (UTC)

@libernux on a fresh arch install i created symlinks as suggested by pavbarnov and lsandig. and just to be on the safe side i created this one: ln -s /usr/share/brother/sane/ /usr/local/brother/sane (note the lowercase b in "brother") and it works great with no leftover files from previous install and it refused to work before i did this

commented on 2014-07-05 10:19 (UTC)

The latest package does not install anything in /usr/local. So if your solution works then there are still files from a previous install left on your system.

lsandig commented on 2014-07-05 09:43 (UTC)

Still had the same error as pavbarnov: bugchk_free(ptr=(nil))@brother_modelinf.c(482) Aborted (core dumped) Adding the link $ sudo ln -s /usr/share/brother/sane/ /usr/local/Brother/sane to match the folder layout from brother's rpm fixed it for me.

commented on 2014-05-16 13:50 (UTC)

Updated PGKBUILD. Now installs in /usr/share/brother instead of /usr/local/Brother. @pavbaranov: if your scanner is not working check that /usr/lib64 is a link to /usr/lib!!

pavbaranov commented on 2014-05-16 11:43 (UTC)

After some changes in Arch it's very probably, that your brscan2 scanner will not work anymore. The solution is very simple. You should do this: # ln -s /usr/lib/sane/libsane-brother2.so /usr/local/lib/sane/ # ln -s /usr/lib/sane/libsane-brother2.so.1 /usr/local/lib/sane/ # ln -s /usr/lib/sane/libsane-brother2.so.1.0.7 /usr/local/lib/sane/

commented on 2014-03-26 19:33 (UTC)

Reverted back to old install location to fix scanner-problem. Thanks pavbaranov for pointing this out to me! So there is no need to follow pavbaranov's previous post.

commented on 2014-03-26 18:55 (UTC)

Reverted back to old install location to fix scanner-problem. Thanks pavbaranov for pointing this out to me!

pavbaranov commented on 2014-03-26 13:56 (UTC)

If somebody has this same problem with brscan2 as I (64bit system!), then: 1. Remove brscan2 2. Install driver according to this: https://wiki.archlinux.org/index.php/Brother_MFC-420CN#Scanner It works.

commented on 2014-03-25 18:38 (UTC)

@pavbaranov That looks okay to me. For me the package works for a brother MFC210-scanner on arch32. I'm not in any printer- or scanner-group. The only group i'm in is the wheel-group (for sudo access). I'm out of ideas at this moment

pavbaranov commented on 2014-03-25 17:40 (UTC)

ldd /usr/lib/sane/libsane-brother2.so.1.0.7 linux-vdso.so.1 (0x00007fff71c00000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f6fb49e8000) libnsl.so.1 => /usr/lib/libnsl.so.1 (0x00007f6fb47d0000) libusb-0.1.so.4 => /usr/lib/libusb-0.1.so.4 (0x00007f6fb45c8000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f6fb42c0000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f6fb40b8000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f6fb3d10000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f6fb4d60000) libusb-1.0.so.0 => /usr/lib/libusb-1.0.so.0 (0x00007f6fb3af8000) libudev.so.1 => /usr/lib/libudev.so.1 (0x00007f6fb3ae8000) librt.so.1 => /usr/lib/librt.so.1 (0x00007f6fb38e0000)

commented on 2014-03-25 15:30 (UTC)

@pavbaranov What is the output of: ldd /usr/lib/sane/libsane-brother2.so.1.0.7

commented on 2014-03-25 15:29 (UTC)

@https://aur.archlinux.org/account/pavbaranov What is the output of: ldd /usr/lib/sane/libsane-brother2.so.1.0.7

pavbaranov commented on 2014-03-25 14:39 (UTC)

@ libernux Yes, it's the same error: SANE_DEBUG_DLL=3 scanimage -L [sanei_debug] Setting debug level of dll to 3. [dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.25git [dll] sane_init/read_dlld: using config directory `/etc/sane.d/dll.d' <CUT; in those lines, sane is adding backends for different scanners I'm not using it> [dll] add_backend: adding backend `brother2' [dll] add_backend: adding backend `brother2' [dll] add_backend: `brother2' is already there [dll] sane_get_devices [dll] load: searching backend `brother2' in `/usr/lib/sane' [dll] load: dlopen()ing `/usr/lib/sane/libsane-brother2.so.1' [dll] init: initializing backend `brother2' bugchk_free(ptr=(nil))@brother_modelinf.c(482) Aborted (core dumped) It's very stange, that: I've just installed vuescan and it scan everything perfectly. Maybe it's not problem with brscan2 but with sane (and sane-git, too - I've just checked it).

commented on 2014-03-25 14:30 (UTC)

Fixed location in .install file @pavbaranov: Do you see any errors if you run: SANE_DEBUG_DLL=3 scanimage -L

pavbaranov commented on 2014-03-25 13:01 (UTC)

I've just installed this on my 64bit Arch (two computers one is on stable and one is on testing, first with KDE and second with MATE). Command: scanimage -L ends with this error: bugchk_free(ptr=(nil))@brother_modelinf.c(482) Aborted (core dumped) I have had my DCP-115C for years and it's working perfectly since early autumn last year (2013) (with the old install script). BTW: There is an error in brsan2.install because setupSaneScan2, after last changes, is in different locations.

commented on 2014-03-15 21:31 (UTC)

Now installs in /usr/share/brother instead of /usr/local/Brother

commented on 2014-03-15 00:01 (UTC)

Improved PKGBUILD

commented on 2014-03-09 13:56 (UTC)

Added license-file

commented on 2014-03-05 23:59 (UTC)

Added dependency to libusb-compat. Otherwise no scanner will be detected.

commented on 2014-03-05 23:57 (UTC)

Added dependency to libusb-compat. This is necessary to detect the correct scanner. Otherwise no scanner will be detected.

commented on 2014-02-28 13:55 (UTC)

Modified the package to build correctly

yhager commented on 2014-02-06 13:38 (UTC)

I had to modify the PKGBUILD for this to work. Otherwise the resulting package contains no files. --- PKGBUILD.1 2012-10-27 09:55:17.000000000 -0700 +++ PKGBUILD 2014-02-05 16:10:30.554751354 -0800 @@ -20,31 +20,32 @@ install="$pkgname.install" build() { - mkdir -p $startdir/src || return 1 - cd $startdir/src || return 1 - ar -x ../$_filename || return 1 - mkdir -p $startdir/pkg || return 1 - cd $startdir/pkg || return 1 - tar -xzf ../src/data.tar.gz || return 1 + cd $srcdir + ar -x $_filename +} - # On x86_64, install in "/usr/lib" instead of "/usr/lib64" - if [ "$CARCH" == "x86_64" ]; then - cd usr || return 1 - mv lib64 lib || return 1 - # some links are wrong now - recreate them - for fn in lib/libbrcolm2.so.1.0.1 \ - lib/libbrscandec2.so.1.0.0 \ - lib/sane/libsane-brother2.so.1.0.7 - do - # break, if file does not exist - if [ ! -f $fn ] ; then - echo "ERROR: $fn does not exist" - return 1 - fi - base=`echo $fn | cut -d. -f1`.so - major=`echo $fn | cut -d. -f3` - ln -sf `basename $fn` $base || return 1 - ln -sf `basename $fn` $base.$major || return 1 - done - fi -} \ No newline at end of file +package() { + cd $pkgdir + tar -xzf $srcdir/data.tar.gz || return 1 + + # On x86_64, install in "/usr/lib" instead of "/usr/lib64" + if [ "$CARCH" == "x86_64" ]; then + cd usr || return 1 + mv lib64 lib || return 1 + # some links are wrong now - recreate them + for fn in lib/libbrcolm2.so.1.0.1 \ + lib/libbrscandec2.so.1.0.0 \ + lib/sane/libsane-brother2.so.1.0.7 + do + # break, if file does not exist + if [ ! -f $fn ] ; then + echo "ERROR: $fn does not exist" + return 1 + fi + base=`echo $fn | cut -d. -f1`.so + major=`echo $fn | cut -d. -f3` + ln -sf `basename $fn` $base || return 1 + ln -sf `basename $fn` $base.$major || return 1 + done + fi +}

flokli commented on 2013-12-30 15:16 (UTC)

@nomisge You can apply the changes as you described, or delete the whole line. I tested it on x86_64. What is needed to get the correct version into AUR?

nomisge commented on 2013-10-30 13:58 (UTC)

@ archlinuxomane I would not put a "/" before "usr" and than run makepkg as root. It would screw up your system! Rather put a "$srcdir/" before "usr" and run makepkg as regular user. Or just delete the line, since we're already in the correct dir. I didn't test this part though, since I have a 32bit system.

archlinuxomane commented on 2013-07-17 15:26 (UTC)

@nomisge Thanks for the package. You symlink creation for x64 systems has a typo near line 39: ||#On x86_64, install in "/usr/lib" instead of "/usr/lib64" || if [ "$CARCH" == "x86_64" ]; then || cd usr || return 1 has a "/" missing in before "usr" It should be noted that your symlink script won't work unless makepkg is started as root.

nomisge commented on 2013-07-14 12:30 (UTC)

I'd like to share an update of the package. It installs in /opt/brother rather than in /usr/local/Brother and comes with patch and .install. You can inspect the code under following url: https://www.dropbox.com/s/vl90w8w6fpu2jjr/brscan2-0.2.5-2.src.tar.gz Please let me know what you think.

cookiewhispers commented on 2013-06-06 23:56 (UTC)

Don't use $srcdir as this is the reason for the empty package. Instead use $srcdir and $pkgdir. Here is a PATCH: http://pastebin.com/8eN4a9UA --- PKGBUILD 2012-09-01 20:29:38.000000000 +0200 +++ PKGBUILD-fixed 2013-06-07 01:20:18.579236435 +0200 @@ -20,12 +20,12 @@ install="$pkgname.install" build() { - mkdir -p $startdir/src || return 1 - cd $startdir/src || return 1 - ar -x ../$_filename || return 1 - mkdir -p $startdir/pkg || return 1 - cd $startdir/pkg || return 1 - tar -xzf ../src/data.tar.gz || return 1 + mkdir -p $srcdir || return 1 + cd $srcdir || return 1 + ar -x $_filename || return 1 + mkdir -p $pkgdir || return 1 + cd $pkgdir || return 1 + tar -xzf $srcdir/data.tar.gz || return 1 # On x86_64, install in "/usr/lib" instead of "/usr/lib64" if [ "$CARCH" == "x86_64" ]; then

Rachus commented on 2013-05-20 18:09 (UTC)

Thanks progandy, this package seems to work flawlessly. But nevertheless it would be nice to have the AUR package fixed, because then also AUR helper could build it.

commented on 2013-05-19 08:38 (UTC)

I agree with Rachus =) I didn't have competence for debug this myself. Thank's !

progandy commented on 2013-05-18 13:04 (UTC)

This package builds, but I don't know if it works (I don't have the hardware) brscan2-0.2.5-2.src.tar.gz http://www56.zippyshare.com/v/21944833/file.html

Rachus commented on 2013-05-13 16:53 (UTC)

makepkg builds an empty package. Could you please fix that?

Durag commented on 2012-10-14 00:31 (UTC)

@kiodo1981: I just added the instruction.

kiodo1981 commented on 2012-09-12 20:15 (UTC)

please add this instruction to complete the install sudo /usr/local/Brother/sane/setupSaneScan2 -i in brscan2.install

Durag commented on 2012-09-02 00:13 (UTC)

I adopted the package and corrected the PKGBUILD, so it can be installed again.

dk0r commented on 2012-06-25 16:32 (UTC)

The versioning of this package may be erroneous. The latest brscan2 version from Brother's official site is '0.2.5-1' but this package shows version '0.2.5-2'. see: http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_scn.html

kiodo1981 commented on 2012-03-26 15:45 (UTC)

This is new archive: 1. fix bug PKGBUILD 2. add /usr/local/Brother/sane/setupSaneScan2 -i in brscan2.install http://www.2shared.com/file/1cF-OZ15/brscan2-025-2srctar.html

kozaki commented on 2012-03-12 15:42 (UTC)

1. Install worked after removing the brackets as Timseal wrote --thanks. 2. Then you just have to run: /usr/local/Brother/sane/setupSaneScan2 -i for the scanner to be detected. As quoted by Kacperas: https://bbs.archlinux.org/viewtopic.php?pid=49663 Hope this is usefull to other this PKGBUILD's users.

timseal commented on 2012-02-09 01:32 (UTC)

The line install=(brscan2.install) should change to install=brscan2.install https://bbs.archlinux.org/viewtopic.php?pid=1054862#p1054862 Should I adopt this package?

herve commented on 2011-08-21 08:44 (UTC)

Sorry I don't use this package anymore. Feel free to adopt it.

wirew0rm commented on 2011-08-20 23:01 (UTC)

HI, would it be possible to include a call to "/usr/local/Brother/sane/setupSaneScan2 -i" as postinstall? regards, wirew0rm