Now let's get it working:
here, you get alle drivers you need:
http://solutions.brother.com/linux/en_us/
I'll show you the installation on the basis of my MFC-5840CN AIO:
Update7: this drivers work fine with x86 & x86_64 (amd64 / em64t)
(if you follow the guide at brother's site)
0. Installing the required kernel version
Update3: the Brother bscan2 and bscan backends have been updated and should work pretty fine with the most configurations
Big thanks to the Brother linux-driver team !
Install the newest gentoo-sources by typing in (if you haven't already got them / this step is optional):
Code: Select all
emerge gentoo-sources1. Getting your system ready
Next install rpm & tcsh, sane-frontends, sane-backends and xsane or kooka and if not already installed hotplug (if needed: gimp)
The last two are graphical frontends to sane; rpm & csh are both needed by the *.rpm-packages (unfortunately the source installation method didn't work for me):
Code: Select all
emerge rpm tcsh sane-frontends sane-backends xsane kooka hotplug gimp if you want a neat interface for scanning with sane add the following line to your /etc/portage/package.use
Code: Select all
media-gfx/sane-frontends gimp
Code: Select all
echo "media-gfx/sane-frontends" >> /etc/portage/package.keywords
echo "media-gfx/sane-backends" >> /etc/portage/package.keywords
echo "media-gfx/xsane" >> /etc/portage/package.keywords
WARNING! only do this if you know what you are doing
If you don't know what you are doing (you should
Code: Select all
echo "media-gfx/sane-backends" >> /etc/portage/package.unmaskCode: Select all
echo "media-gfx/sane-frontends" >> /etc/portage/package.unmaskCode: Select all
echo "media-gfx/xsane" >> /etc/portage/package.unmaskCode: Select all
rc-update -a hotplug default
the functions of coldplug should now be handled by the new udev (for those running ~x86)
2. Fetching driver's from the brother's site
if you just want to scan, you'll only need one rpm, which can be found here:
http://solutions.brother.com/linux/sol/ ... ivers.html
in my case it's the "brscan2" rpm-package
but since it's a AIO multifunctional printer, you'll probably also want to make it print
so here are the needed links:
(1) http://solutions.brother.com/linux/sol/ ... ivers.html
here you'll find an lpr-driver which you'll need for the cupswrapper (perhaps also for the sane-driver? i've installed them all so i don't know how the dependencies are ...)
(2) http://solutions.brother.com/linux/sol/ ... ivers.html
the needed cupswrapper driver
if you just wanted to make your printer print you're almost done:
your printer / AIO should be connected to your computer
open up a browser, type in
Code: Select all
127.0.0.1:631Code: Select all
/etc/init.d/cupsd restartthen add your printer (if it isn't already in the list):
the connection should be
Code: Select all
/dev/usb/lp0 the scanning part
(3) http://solutions.brother.com/linux/sol/ ... ivers.html
behind this link you'll find the sane-drivers
3. Now configure and compile you kernel
cd /usr/src/linux
Code: Select all
make menuconfigcompile them as modules so you can unload one or another if needed (sometimes usb-storage interferes with usblpCONFIG_USB_PRINTER=m
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
# may also be needed; see USB_STORAGE Help for more information
CONFIG_USB_STORAGE=m
don't forget to activate:
if you're all done you can cook it:[*] USB device filesystem
Code: Select all
make && make modules && make modules_install && make install 4. Reboot!
Reboot your system to the new cooked kernel, you'll be able to scan in no time from here on ...
5. Install the drivers
here the commands for me:
Code: Select all
rpm -ivh --nodeps MFC5840CNlpr-1.0.2-1.i386.rpm
rpm -ivh --nodeps cupswrapperMFC5840CN-1.0.0-1.i386.rpm
rpm -ivh --nodeps brscan2-0.0.2-1.i386.rpm
just copy /usr/lib/cups/filter/brlpdwrapper* to /usr/libexec/cups/filter/brlpdwrapper* (this changed with the new version)
and you should be going fine with cups-1.2*
6. Last steps
Add the following line to your fstab:
umount your /proc/bus/usbusbfs /proc/bus/usb usbfs auto,devmode=0666 0 0
Code: Select all
umount /proc/bus/usb Code: Select all
mount /proc/bus/usb Code: Select all
mknod -m 666 /dev/usbscanner c 180 48 7. Is it working for you ? It took pretty long for me at the beginning to work ...
you can check if it it's properly detected by typing in (in the console) / a terminal-window and should get similar results:
Code: Select all
sane-find-scanner -q
found USB scanner (vendor=0x04f9, product=0x016e) at libusb:003:002
Code: Select all
scanimage -L
device `brother2:bus3;dev2' is a Brother MFC-5840CN MFC ScannerALT + F2 -> kooka
ALT + F2 -> xsane
and select your device, for example:
Brother MFC-5840CN MFC Scanner [brother2;bus2;dev2 ]
ideally it should work and you're all set: congrats
in my case it doesn't work for the normal user and I have to be root to be able to scan
but in the moment I haven't got much time, so this problem should be fixed in the future and added to this howto sometime
So if you get an error message like the following:
try to fix the access rules in the /proc/bus/usb-section by chmodding or simply execute xsane (or your favorite scanning application) withFailed to open device `brother2:bus3;dev2`:
Error during device I/O.
root rights (remember: this can be a security problem!)
Is it working for you?? I'm looking forward to hear from you
8. Troubleshooting: If it doesn't work for you: (the following steps shouldn't be necessary any more!)
add / change to the following:
If you are using the brscan-backend
/etc/sane.d/brother.conf
#port /dev/usb/lp0
#port /dev/usbscanner
#brother2 /dev/usbscanner
#usb 04f9 016e -> applicable for MFC5840CN only ??? to get yours: type sane-find-scanner -q
usb 0x4f9 0x16e
option connect-device
/etc/sane.d/dll.conf
brother
If you are using the brscan2-backend
simply create a new file in /etc/sane.d -> /etc/sane.d/brother2.conf
and add
Code: Select all
port /dev/usb/lp0 brother2
Other
/etc/hotplug/usb/libsane.usermap
# Brother|MFC 5840
libusbscanner 0x0003 0x04f9 0x016e 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00
0x00 0x00000000
update 1:
added coldplug and hotplug to the install guide
update2:
added information concerning kernel-version & printer-communication
update3:
added new information at the end of the post to make the backend / scanner work with up-to-date kernels
update4:
redid the whole howto, hopefully it should work on most of the hardware configurations
update5:
made some minor changes
update6:
added udev-rules
update7:
cups-1.2* support / howto




