Brother networked printer

This document covers the installation of Brother printers.

User feedback
After having applied this guide to the printer, please update the following table so that other users can easily confirm if successful installations have been performed with their printer model or not:

cups
Make sure is installed:

The cups service must be started before the driver(s) can be installed.

OpenRC
If OpenRC is used, then the following command can be issued to start the cups service.

To have it started automatically at boot time, use :

Systemd
If systemd is used, then the following command can be issued to start the cups service.

To have it started automatically at boot time, invoke the following:

Preferred: Using drivers from ebuild repositories
If the printer is supported by an ebuild in the brother-overlay ebuild repository or some other ebuild repository, the ebuild should be used, as it usually contains all the prerequisites mentioned here. It would allow to skip the section "Alternative: rpm installation".

To enable an ebuild repository, create the proper /etc/portage/repos.conf file and it as shown here for the brother-overlay ebuild repository:

Since this ebuild repository uses  the package  needs to be installed. Alternatively, layman can be used for adding the repository.

From the ebuild repository, install the driver as shown here for Brother's Generic LPR and CUPSwrapper printer driver from the brother-overlay ebuild repository.

brother-genml1-bin contains the Generic printer drivers as offered on support.brother.com for a wide range of compatible models (click the Compatible Model link on BrGenML1 Compatible Models):
 * Generic LPR printer driver (rpm package) (contains ELF 32-bit LSB executables)
 * Generic CUPSwrapper printer driver (rpm package)

The ppd file installed is and the make and model is Brother BrGenML1 for CUPS.

Alternative: rpm installation
As the drivers are available from Brother in the form of an file, the  package needs to be installed.

Missing directories
Please create these directories up front; it will save a lot of trouble later:

Downloading the driver from Brother
The drivers for Brother printers are available at Brother solutions' web page.

Search for the correct model name by following the directions given by the pages.

After having chosen the right model, four drivers will be presented for download. Please download the two ones ending in for LPR driver and cupswrapper driver.

Installing the drivers
Installing the drivers may be a multiple-step process as some needed directories may appear missing on the system.

To install a driver change to the directory where the downloaded files are located.

Next, issue the following command to see the filenames:

Of course the driver names may change according to the model's name. The output of the previous command can be used to copy and paste the filenames in the rpm command to avoid typos when entering them.

First install the LPR driver.

The installation may give some warnings, telling that some directories are missing. In this case, add the missing directories by hand and re-install the driver with this command:

Next install the cupswrapper driver the same way:

Again, the installation may give some warnings, telling that some directories are missing. Try to add the missing directories by hand and re-install the driver with this command:

Copying the filter at the right place
Copy the filter to the right place with the following command:

Connect the printer to the network
Connect the printer to the network as described in the network section of the printer model's Online User Guide. From this step, the printer's network address can be obtained which is needed for CUPS in the next step. When pointing the browser to the printer's network address it will go to the printer's user interface.

Networked printer detection
CUPS is capable of automatically detecting networked printers. In case it does not work it might be blocked by a firewall. As a workaround, temporarily connect the printer to the computer.

Use CUPS' web interface to install the printer
Using CUPS' web interface http://localhost:631/admin is quite self-explanatory. The Add Printer button will list the networked printer(s) starting at the Discovered Network Printers line.

Use command line to install the printer
Add the printer with using device uri and ppd file:

For further options see.

Check the setup with :

Don't forget to set the user's default printer

Prerequisites
Make sure the package is installed in order to install the driver for the scanner. As most users will use to scan a document, just emerge it. The package will be pulled in as a dependency.

Installing the driver
Download the driver from the Brother Solutions's download page for the scanner.

Change to the directory where the downloaded drivers are, and run the following command:

This will show the file names of the downloaded files, allowing for easy copy/paste for the next commands.

Install the drivers using :

Configuring the scanner for network access
Once the driver is correctly installed, use the following command:

Now check everything is correctly installed:

Congratulation! The scanner is now ready for use!

Generic LPR printer driver on amd64
The printer driver uses statically compiled x86 32-bit binaries. To be able to execute them the kernel needs to have the following configuration enabled: IA32_EMULATION.

Further, the binaries from Brother (rawtobr3 and brprintconflsr3) require two 32-bit glibc library files in order to be executed on a 64-bit system. You can compile them yourself, or even easier, obtain a pre-compiled version (glibc i686) from rpmfind.net or similar site. Install the rpm utilities:

Create a /lib32 directory if it doesn't exist:

Move the rpm file you downloaded into a temporary directory and convert to a simpler tar file:

Extract the tar file in the temporary directory:

A lib/ subdirectory should be created containing the libraries. Copy them to the /lib32 directory on your system.

Under /lib32, you will only need libc.so.6, but since there may be symlinks, it's easier to copy them all. Run the 'file' command on libc.so.6 to ensure it is an ELF 32-bit format. If not, install the correct version:

Finally, copy ld-linux.so.2 into the main /lib directory.

You also need to edit two Perl wrapper/filter scripts provided with the Brother drivers to instruct these binaries to load the 32-bit libraries, not the default 64-bit ones. First, locate and edit the two files (replace YOURPRINTER with the printer name you provided the Brother installation script):

(in my case, /opt/brother/Printers/MFCL2680W/lpd/filter_MFCL2680W) and:

(in my case, /opt/brother/Printers/MFCL2680W/cupswrapper/brother_lpdwrapper_YOURPRINTER).

At the top of each file, below the comment header, add the following line:

This sets the default library path before the scripts execute the binaries. rawtobr3 processes the print data and brprintconflsr3 processes the page formatting data. Once all of these instructions have been successfully performed, your printer should work as intended!

Text shifted up
Sometimes it happens that the text is shifted up toward the upper border of the page.

To correct this, enter the following command:

Scanner not detected
It may happen that, when xsane is launched, the scanner is not detected. This is probably due to a too recent version of libusb. In order to solve this, it might be necessary to install.

Contrary to what the name suggests, this may even be required if the scanner is used over the network. It is known to be required for these models even when they are used over the network instead of through a direct USB connection:


 * DCP-1610WE
 * MFC-9120CN
 * MFC-9142CDN

External resources

 * Brother solutions, Linux page on Brother.com
 * brother-overlay on GitHub.com
 * Using Network Printers Documentation by CUPS.org