# Brother HL2270DW installation

## dylanthomasfan

I had my Brother HL2270DW printer working up until recently. I suspect a recent upgrade world did the printer configuration in. Here is what I have:

[*]Gentoo 2.6.39 on x86_64

[*]HL2270DW printer connected as a home network printer (i.e., using ethernet, not USB)

[*]Printer drivers installed from the Brother website, lpr driver and cupswrapper driver. With additional modifications mentioned in the site https://bbs.archlinux.org/viewtopic.php?id=113962&p=2, namely the modifications to the filter file 

[*]CUPS 1.5.2-r4 installed

[*]file-5.08 (downgraded from 5.09; see https://bbs.archlinux.org/viewtopic.php?id=113962&p=2)

[*]sys-libs/libstdc++ and virtual/libstdc++ installed

Here's what I observe. I can print to the same printer from other machines on the network with other OSs, and I can print test pages from my Gentoo box if I access the web interface to the printer itself. But I observe the following when I try to use cups to print:

[*]The printer does not show up as one of the Brother printers in the CUPS list when I try to add the printer (i.e., start with a fresh config of CUPS)

[*]When I do add the printer in cups (using the PPD file in /usr/share/cups/model/HL2270DW.ppd), and I try to print a printer self test, I get the printer message "You are using the wrong driver".

[*]When I try to print from lpr e.g., $ echo "test" | lpr, the printer turns on, but does not print anything, and the CUPS queue says "completed"

[*]I cannot print from any other application--chromium, emacs etc.

Any help is appreciated. The last forum post I checked out and adapted to my purposes is https://forums.gentoo.org/viewtopic-t-909052-highlight-brother+printer+2270dw.html

Thanks!

----------

## dylanthomasfan

Looks like I will have to answer my own question, but I am happy to!

This is a particularly thorny problem, because there were no logs indicating the nature of the error in /var/log/cups/error_log. The access_log actually just said "completed."

Anyway, after following the advice in this post (https://forums.gentoo.org/viewtopic-p-3832567.html#3832567), I decided to try catting a file directly to the printer filter. It initially threw me an error message complaining about libtiff.so.3 not being found (see below)

```

$ cat /tmp/file.txt | /usr/local/Brother/Printer/HL2270DW/lpd/filterHL2270DW

%-12345X@PJL

@PJL JOB NAME="Brother HL-XXX"

@PJL SET RAS1200MODE = OFF

@PJL SET RESOLUTION = 600

@PJL SET ECONOMODE = OFF

@PJL SET SOURCETRAY = TRAY1

@PJL SET MEDIATYPE = REGULAR

@PJL SET ORIENTATION = PORTRAIT

@PJL SET PAPER = LETTER

@PJL SET PAGEPROTECT = AUTO

@PJL ENTER LANGUAGE = PCL

/usr/bin/gs: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory

&u600D600R%-12345X@PJL EOJ NAME="Brother HL-XXX"

%-12345Xa2ps: received signal 13: Broken pipe

```

So I emerged media-libs/tiff, but that still did not get me the correct (libtiff.so.3) version of the *.so files. So I downgraded to media-libs/tiff-3.9.5-r2 (add a line in /etc/portage/package.mask ">media-libs/tiff-3.9.5-r2" see https://forums.gentoo.org/viewtopic-t-888720-start-0.html as well--same idea) and viola, the catting worked.

Once the catting worked, I was able to print to the printer. On hindsight, it appears like libtiff upgrade when I emerged world caused the problem. It should not do this anymore because of the fact that I added the package.mask entry. Hopefully something _else_ will break the next time around  :Wink: 

----------

## mrpdaemon

I've written e-builds for the drivers of this printer in case anyone is interested:

https://bugs.gentoo.org/show_bug.cgi?id=432166

----------

