Brother MFC-7340 Setup Under Linux

I just bought a Brother MFC-7340 multifunction laser printer to replace my old Lexmark Optra E310 which I have had for about ten years. Lexmark Optra E310 has excellent Linux support and I have been using CUPS to make it a networked printer. So naturally, I wanted to setup the new printer the same way.

Initially, I was a bit hesitant to buy the Brother MFC-7340 since I couldn’t find it in openprinting‘s Linux compatible printer database. And it seems that people who did get it to work under Linux also had some issues with the driver. But I decided to give it a try anyway since the price is quite attractive and plus I figured I would definitely be able to get it to work under Linux with some tinkering, one way or the other.

Surprisingly, MFC-7340’s Linux support is actually quite good and I would say it is almost 100% Linux compatible given my own experience, at least under Ubuntu 10.04 (LTS) since I was able to get both printing and scanning to work on the network without any issues. And here is what I did to setup printing and scanning in Linux (Note, the photocopy function works with or without a computer so it doesn’t matter which OS you are using). Please note that the instructions below are geared towards setting up the printer for network printing/scanning, for local printing (i.e. print from the machine to which the printer is directly connected via USB) it should be even easier as many steps won’t be necessary.

Printer Setup

First, download the LPR driver and cupswrapper driver from Brother’s Linux Driver Site. The 32 bit and 64 bit drivers come in both rpm and deb formats and should work with most of the Linux distributions.

The instructions on Brother’s website are actually quite accurate and up-to-date and the important steps all have screen shots. Unfortunately, they are not organized well enough to be easily followed. I would recommend reading through all the related information a couple of times prior to performing your own installation.

Assume that you have already installed CUPS (if not, take a look at this guide). According to Brother’s website, it is recommended to use the printer with CUPS even if if you are using the printer locally:

sudo aa-complain cupsd

Create a model directory. This is where the MFC7340.ppd file will be copied into later during the installation/configuration process.

sudo mkdir /usr/share/cups/model

Create a spool directory if it doesn’t exist already.

sudo mkdir /var/spool/lpd

For 64bit systems, you will need to install ia32-libs:

sudo apt-get install ia32-libs

I believe that psutils comes with Ubuntu’s default installation, but if you are unsure or are using other Linux distributions, you may need to install it:

sudo apt-get install psutils

Then you can issue the following commands to install the brmfc7340lpr driver (the latest version as of this writing is 2.0.2-1) and the CUPS wrapper driver (current version is 2.0.2-1)

sudo dpkg -i –force-all brmfc7340lpr-{version}.{arch}.deb
sudo dpkg -i –force-all cupswrapperMFC7340-{version}.{arch}.deb

Restart the CUPS daemon:

sudo /etc/init.d/cups restart

Go to your CUPS admin page (http(s)://{server-ip-address}:631/admin), use add printer to add Brother MFC 7340 from the list (be sure to check the checkbox Share this Printer if you want to make it available to other computers on the same network). I believe on one of the pages MFC 7340 is missing from the list, but it is in there if you choose another make/manufacture.

Now you have setup the printer successfully.

Scanner Setup

The scanner setup is a little bit more involved since I intend to set it up for using across the network. SANE network daemon is used for this purpose.

sudo apt-get install sane-utils

Download the brscan3 (current version 0.2.11-2) and scan-key-tool (0.2.1-3) packages from Brother’s Linux Driver Site and install them.

sudo dpkg -i –force-all brscan3-{version}.{arch}.deb
sudo dpkg -i –force-all brscan-skey-{version}.{arch}.deb

The brscan-skey utility is used to interact with the printer’s scan key and can be configured to automatically start with the system (see here for more information). If brscan-skey is not installed, scans can only be done on the PC side and the scan button on the printer will not work.

After you installed the scanner driver, you should see a brother3 entry in /etc/sane.d/dll.conf

/etc/sane.d/dll.conf
brother3

Ubuntu’s community site has an excellent article on how to setup a networked scanner. And here is how I my setup the scanner under Ubuntu 10.04:

Make sure that you add a line to your saned.conf to allow network access within your designated IP ranges:

/etc/sane.d/saned.conf
192.168.1.0/24

Also setup the daemon to run automatically and run as user saned (/etc/default/sane.d):

/etc/default/sane.d

RUN = yes
RUN_AS_USER = saned

Verify that /etc/services has an entry for the port sane daemon uses:

/etc/services
sane-port 6566/tcp sane saned # SANE network scanner daemon

You can further verify whether this is setup correctly using telnet. If the port is open, you will get something similar to the following:

telnet localhost 6566

Trying ::1…
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

/etc/inetd.conf
sane-port stream tcp nowait saned.saned /usr/sbin/saned saned

After installing the scanner driver, you should be able to list the driver with scanimage -L command:

scanimage -L
device `brother3:bus1;dev2′ is a Brother MFC-7340 USB scanner

The above output is obtained on the machine to which the MFC-7340 is connected. You should also be able to run the same command on a networked computer and see an output like the following:

device `net:192.168.1.69:brother3:bus1;dev2′ is a Brother MFC-7340 USB scanner

On the computer where the printer is connected, issue the following command

sudo scanimage > test.pnm

You should be able to obtain a scanned image.

In order for the scanner to work across the network, permissions must be set correctly for the user saned daemon runs under. If the permissions are not setup properly, you will get the following error when trying to invoke scanimage or xsane.

scanimage: open of device net:192.168.1.69:brother3:bus1;dev2 failed: Invalid argument

To set up the proper permission, use sane-find-scanner to locate where the scanner is installed:

sane-find-scanner
found USB scanner (vendor=0x04f9, product=0x01e7) at libusb:001:002

In my case, the device is installed at /dev/bus/usb/001/002. Find out which group this device is created under:

ls -la /dev/bus/usb/001/002
crw-rw-r– 1 root lp 189, 1 2010-11-20 11:40 /dev/bus/usb/001/002

Since the it is created under group ‘lp’, we’ll need to add user saned to the lp group:

sudo adduser saned lp

Now, you can enjoy network printing/scanning with your MFC-7340!

Notes

The LPR driver Brother provided does not seem to come with a 64bit version. But the Ubuntu supplied Brother 8440 Foomatic/Postscript driver seems to be working well without any issues.

Also, initial print seems to suffer the “streaking” problem many people had encountered. Changing the default resolution to 1200 dpi worked for me.

Be Sociable, Share!

4 Comments

  1. […] Kerry D. Wong » Blog Archive » Brother MFC-7340 Setup Under Linux Surprisingly, MFC-7340s Linux support is actually quite good and I would say it is almost 100% Linux compatible given my own experience, at least under Ubuntu 10.04 (LTS) since I was able to get both printing and scanning to work on the … Printer Setup. First, download the LPR driver and cupswrapper driver from Brother’s Linux Driver Site. The 32 bit and 64 bit drivers come in both rpm and deb formats and should work with most of the Linux distributions. … http://www.kerrywong.com/2010/ .. […]

  2. David says:

    Great instructions, thanks. Works on Lubuntu 12.10 with mfc-7340

  3. Romario says:

    Thank you very much. Works on Debian 7 with MFC-7440N

Leave a Reply to David