How to install a Brother HL2270dw laser printer?

How can I install my Brother HL2270dw laser printer? There are no drivers available in the Software Center.


  1. Open a terminal: Ctrl+Alt+T
  2. Download the driver installation script:

    wget http://download.brother.com/welcome/dlf006893/linux-brprinter-installer-2.0.0-1.gz
    
  3. Unzip it:

    gunzip linux-brprinter-installer-2.0.0-1.gz
    
  4. Run it as root:

    sudo bash linux-brprinter-installer-2.0.0-1
    
  5. Enter HL2270-DW as "model name", then y to continue

  6. When asked "Will you specify the DeviceURI?" choose "No" for USB connection or "Yes" for network connection.

i know a ton of people have had major issues getting this printer to work with both ubuntu and mint, so i thought i'd pass this along since it's pretty painless. i found the attached script (following the instructions) in an ubuntu forum somewhere (I forget exactly where) which worked for me on both Ubuntu 12.04 and Mint Cinnamon 13 (64-bit versions). as long as the printer is already on your network (i installed mine through my windows 7 partition), it should work. just copy and paste the code sample below into an empty text document and save it as PrinterInstall.sh . Then run the application from the terminal with:

sudo ./PrinterInstall

It may tell you that you need bsdtar to run the script, just install that with:

sudo apt-get install bsdtar

and then run ./PrinterInstall again.

The terminal will ask you where your init.d directory is -- just check the choices in your file browser to confirm one or the other.

Next, turn on the printer and run the following from the terminal:

system-config-printer

When the config GUI opens, right click on the printer and select 'properties'. Under the device URI, click 'change' --> network printer --> select first brother option --> apply

that's it!

script code below:


#!/bin/bash
# Brother HL-2270DW printer install tested on arch and ubuntu 12.04
# https://bbs.archlinux.org/viewtopic.php?id=109570
# https://bugs.gentoo.org/show_bug.cgi?id=285166#c12
# http://github.com/willejos/bash

[[ $UID -ne 0 ]] && echo "Must run as root" && exit 1

which bsdtar > /dev/null
if [ $? == 1 ]; then
  echo "you need to install bsdtar before running this script"
  exit 1;
fi

which perl > /dev/null
if [ $? == 1 ]; then
  echo "you need to install perl before running this script"
  exit 1;
fi

echo -e "\nMake sure cups is running before proceeding...\n"
read -p "Hit any button to continue." -n 1

echo -e "\n\nWhere's your init script directory?"
echo -e "1. /etc/init.d/\n2. /etc/rc.d/"
read -p "(Select 1 or 2): " INIT_DIR
while [[ $INIT_DIR != 1 && $INIT_DIR != 2 ]]; do
  read -p "Where's your init script directory? (choose 1 or 2): " INIT_DIR
done

START_DIR=$(pwd)
mkdir br_tmp && cd br_tmp
wget http://www.brother.com/pub/bsc/linux/dlf/hl2270dwlpr-2.1.0-1.i386.rpm
wget http://www.brother.com/pub/bsc/linux/dlf/cupswrapperHL2270DW-2.0.4-2.i386.rpm

if [[ ! -f hl2270dwlpr-2.1.0-1.i386.rpm || ! -f cupswrapperHL2270DW-2.0.4-2.i386.rpm ]]; then
  echo -e "One or both files not found: \n  hl2270dwlpr-2.1.0-1.i386.rpm \n  cupswrapperHL2270DW-2.0.4-2.i386.rpm \n\n Was there a problem with the download?"
  exit 1;
fi

# extract and check directories exist
bsdtar -xf hl2270dwlpr-2.1.0-1.i386.rpm
bsdtar -xf cupswrapperHL2270DW-2.0.4-2.i386.rpm
HL_DIR=""$START_DIR"/br_tmp/usr/local/Brother/Printer/HL2270DW/inf/"
CUPS_DIR=""$START_DIR"/br_tmp/usr/local/Brother/Printer/HL2270DW/cupswrapper/"
if [[ ! -d "$HL_DIR" || ! -d "$CUPS_DIR" ]]; then
  echo "rpm extraction failed"
  exit 1
fi

# in-place edit files
cd "$HL_DIR"
perl -pi -e 's/printcap.local/printcap/g' setupPrintcap2
if [ "$INIT_DIR" == "2" ]; then
  cd "$CUPS_DIR"
  perl -pi -e 's/init.d/rc.d/g' cupswrapperHL2270DW-2.0.4
fi

# copy files to system and install cupswrapper
cd "$START_DIR"/br_tmp/
cp -ri usr/* /usr/
cp -ri var/* /var/
cd ../ && rm -rf br_tmp

echo -e "If I hang here, be patient....\n"
/usr/local/Brother/Printer/HL2270DW/cupswrapper/cupswrapperHL2270DW-2.0.4 || exit 1

echo -e "\nNext steps: "
echo "Make sure printer shows up in cups config @ http://127.0.0.1:631"
echo "Edit /etc/cups/printers.conf and change the DeviceURI from ‘usb:xxxxx’ to ‘file:///dev/usb/lp0′ (or usb/lp1 or whatever exists, no quotes)."
echo -e "Restart cups\n"

I have a blog post on how to install the printer for wireless wifi printing in Ubuntu 12.04 64 bit. Note my version is specific and only tested for the 64 bit version of Ubuntu. Brother does not include 64 bit drivers for the HL-2270DW drivers but I have patched the drivers to make them work with the 64 bit version. The patched drivers give access to ALL the features of the printer. The link is http://chadchenault.blogspot.com/2012/05/brother-hl-2270dw-printer-driver.html

Steps:

1. Download patched drivers to work with 64 bit ubuntu from the link above. You can also patch them yourselves using the command line and instructions from Brother's website.
2. Open a terminal window "ctrl + alt + t"
3. change into the directory to where the files where downloaded
4. Enter the following two commands from the terminal window.

sudo dpkg -i --force-all hl2270dwlpr-2.1.0-1a.i386.deb<code>  
sudo dpkg -i --force-all cupswrapperHL2270DW-2.0.4-2a.i386.deb<code>

USB printing should now work. If you want to configure wifi or ethernet printing, you will need to configure CUPS. I have instructions with pictures at my blog.


Eric Carvalho's answer worked fine, with one qualifier: the download location didn't work for me. Looks like maybe Brother reorganized their downloads. My first step was to manually download, starting from Brother's support site:

--go to brother.com (for me, this redirects to brother-usa.com) --click Support --enter HL-2270DW in the model number, then click Search --in Downloads and drivers, click on the 'downloads from our solutions center' --select the OS (linux) and the version (deb) --click on the Driver install tool --accept license agreement

This is a tiny file, so it'll take no noticeable time to download.

Now unzip and run the script as Mr. Carvalho indicated. Worked perfectly for me.


It's waiting for you to specify the Device URI?, and offering to let you pick from the 11 ways it knows a printer could be connected. It thinks you will want choice 11 (A): Auto. (usb://dev/usblp0), so it has pre-filled the field, and is waiting for you to either hit Enter to accept choice 11, or to specify a choice of your own, and press Enter. If your printer is connected via USB, 11 (A): Auto. (usb://dev/usblp0) is the choice you want.