How to get a networked Brother HL-5170DN working on SuSE 9.3

CUPS comes with a driver that works with the HL-5170DN, but it does not seem to handle double-sided printing. Fortunately, Brother supplies Linux drivers on their website, though I found the documentation to be somewhat disorganized. This HOW-TO will describe exactly how to get it working under SuSE 9.3 Pro.

1) First you must obtain the LPR driver. I wound up downloading hl5170dnlpr-1.1.2-1.i386.rpm from here.

2) Second, you need the CUPS wrapper driver. I wound up downloading cupswrapperHL5170DN-1.0.2-1.i386.rpm from here.

3) Now install the drivers. According to the helpful folks I emailed at Brother, the errors can be ignored. Note that you need --nodeps on that second command.

uranus:~ # rpm -ivh hl5170dnlpr-1.1.2-1.i386.rpm
Preparing... ########################################### [100%]
1:hl5170dnlpr ########################################### [100%]
/var/tmp/rpm-tmp.12440: line 2: /etc/init.d/lpd: No such file or directory
error: %post(hl5170dnlpr-1.1.2-1) scriptlet failed, exit status 127
uranus:~ # rpm -ivh --nodeps cupswrapperHL5170DN-1.0.2-1.i386.rpm
Preparing... ########################################### [100%]
1:cupswrapperHL5170DN ########################################### [100%]
rm -f /usr/lib/cups/filter/brlpdwrapperHL5170DN
Shutting down cupsd done
Starting cupsd

4) Now the driver is installed so we need to get CUPS to see the printer. Do NOT use the KDE printer manager utility and do NOT use Yast2. I tried setting things up with those and ran into problems. Perhaps I was doing something wrong, or got confused, but in the end I got the printer to work using the CUPS admin interface. To use the interface, you need to make an admin user for CUPS. Here is how I did it:

uranus:~ # lppasswd -a root
Enter password:
Enter password again:

This will create an account with username root having the password you specified. If you’re curious, CUPS stores this user information in /etc/cups/passwd.md5

5) Now point your browser at http://localhost:631/ and you’ll see the CUPS admin interface. You will be prompted for a username/password at some point, at which time you will enter the username/password that you created in the previous step.

6) Click “Manage Printers”.

7) Now you probably want to delete the “HL5170DN” printer that Brother’s driver RPMs added. Their printer config is not set up for the network, and I felt that starting from a clean slate would be the safest course of action. Click “Delete Printer” to get rid of it.

8) Once the printer is deleted, click the “Printers” button, then click “Add Printer”.

9) Type “HL5170DN” for the Name, whatever for the Location, and “Brother HL-5170DN” for the Description. You don’t have to type those words exactly – these fields are more for descriptive purposes. Click “Continue” when done.

10) For the Device, I selected “Internet Printing Protocol (http)” because my printer is attached to the network. Obviously you’ll need to select whatever is appropriate for your setup. Click “Continue” when done.

11) For the Device URI, I entered “http://bro5170.example.org” because I have dhcp/named set up to give the printer that name (though “example.org” is obviously just an example for the purposes of this HOW-TO). Click “Continue” when done.

12) Choose “Brother” for the Make and then hit “Continue”.

13) For the driver, scroll down and choose this exact driver: “Brother HL-5170DN for CUPS (en).” Then hit “Continue”.

14) You’ll be told that your printer was successfully added. Following the HL5170DN link and you’ll see your printer. Click the “Configure Printer” button.

15) Under Duplex, change the option to “DuplexTumble”. You may also need to change “Media Size” to whatever is appropriate (“Letter” in my case).

16) Click “Continue”, then go back to the HL5170DN page. Now click “Print Test Page” to make sure that everything is working. Note that this does not test duplex printing.

17) The last thing is that for some reason KDE does not seem to realize that “Letter” is the default media size, despite having set it in the CUPS admin. I wound up going into the KDE printer manager and changing the default from “A4” to “US Letter”. All this does is create /etc/cups/lpoptions with some specialized options. Here is the entirety of the file:

uranus:~ # cat /etc/cups/lpoptions
Dest HL5170DN _kde-filters media=Letter,Normal,Upper sides=one-sided
Special Advanced%20Faxing%20Tool%20(ksendfax)
Special Mail%20PDF%20File
Special Print%20to%20File%20(PDF)
Special Print%20to%20File%20(PostScript)
Special Send%20to%20Fax

Congratulations, now the printer should Just WorkTM.

This entry was posted in HOW-TOs, Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *