# Brother HL-5370DW installation howto

## Joseph_sys

Here are the instructions on how to install Brother cupswrapper ppd driver for HL-5370DW

I've combined information from two sources + an additional info.

http://en.gentoo-wiki.com/wiki/Brother_HL-5150D

http://www.gentoo-wiki.info/Brother_MFC-3240C

You will find Brother drivers at:

http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#HL-5370DW

Note: Brother has a PPD driver based on: BR-Script3 (ppd file on their web-page)

This driver is of a poor quality (do not use it). 

It prints text OK, but if you have a text and graphics mixed on one page the font quality will be very poor (choppy); in addition if you try to print from a scanner through this driver the printer will only prints: 

```
ERROR NAME;

ioerror

COMMAND;

image

OPERAND STACK;
```

Better options is to use their cupswrapper driver.  Download two files: LPR driver  and cupswrapper driver

hl5370dwlpr-2.0.3-1.i386.rpm

cupswrapperHL5370DW-2.0.4-1.i386.rpm

Convert them to tar.gz

```

DO IT as ROOT!

rpm2targz ./hl5370dwlpr-2.0.3-1.i386.rpm

rpm2targz ./cupswrapperHL5370DW-2.0.4-1.i386.rpm
```

Extract the files:

```
# tar --keep-directory-symlink -zxvf ./hl5370dwlpr-2.0.3-1.i386.tar.gz -C /

./

./usr/

./usr/local/

./usr/local/Brother/

./usr/local/Brother/lpd/

./usr/local/Brother/lpd/psconvert2

./usr/local/Brother/lpd/filterHL5370DW

./usr/local/Brother/lpd/rawtobr2

./usr/local/Brother/inf/

./usr/local/Brother/inf/setupPrintcap

./usr/local/Brother/inf/paperinf

./usr/local/Brother/inf/brHL5370DWfunc

./usr/local/Brother/inf/braddprinter

./usr/local/Brother/inf/brHL5370DWrc

./usr/lib/

./usr/lib/libbrcomplpr2.so

./usr/bin/

./usr/bin/brprintconflsr2

./var/

./var/spool/

./var/spool/lpd/

./var/spool/lpd/HL5370DW/

# tar  --keep-directory-symlink -zxvf ./cupswrapperHL5370DW-2.0.4-1.i386.tar.gz -C /

./

./usr/

./usr/local/

./usr/local/Brother/

./usr/local/Brother/cupswrapper/

./usr/local/Brother/cupswrapper/brcupsconfig3

./usr/local/Brother/cupswrapper/cupswrapperHL5370DW-2.0.4
```

```
# cd /usr/local/Brother/cupswrapper

# mv cupswrapperHL5370DW-2.0.4 cupswrapperHL5370DW-2.0.4.bak
```

(Change all occurrences of /etc/init.d/cups to /etc/init.d/cupsd)

```
# /bin/sed 's/\/etc\/init.d\/cups\ restart/\/etc\/init.d\/cupsd\ restart/g' ./cupswrapperHL5370DW-2.0.4.bak > ./cupswrapperHL5370DW-2.0.4 
```

 (If you're on a 64bit system, change all occurrences of /usr/lib/ to /usr/lib32/ ) 

Can someone add "sed code  :Smile: "

In cupswrapperHL5370DW-2.0.4  change:

```
*DefaultOptionTrays: 1Trays

 (Change all occurances of "A4" to "Letter" - for North America) :

*DefaultPageSize: A4

*DefaultPageSize: A4

*DefaultPageRegion: A4

*DefaultImageableArea: A4

*DefaultPaperDimension: A4
```

```
# chmod 755 cupswrapperHL5370DW-2.0.4
```

```
nano -w cupswrapperHL5370DW-2.0.4 (change at the end line "port=usb:/dev/usb/lp0" )

to: 

port=lpd://10.0.0.106/BINARY_P1 

Substitute your Printer IP address
```

Modify the file below as listed below:

```
nano -w /usr/local/Brother/inf/brHL5370DWrc

[HL5370DW]

Language=LANG_USA

Resolution=600

PaperSource=AutoSelect

Duplex=ON

DuplexType=Long

PaperType=Letter

Media=PlainPaper

Copies=1

Sleep=PrinterDefault

TonerSaveMode=OFF
```

and the last, install the printer:

```
# ./cupswrapperHL5370DW-2.0.4 -i

(for amd64 link from .../lib32/...)

ln -s /usr/lib/cups/filter/brlpdwrapperHL5370DW /usr/libexec/cups/filter/brlpdwrapperHL5370DW

/etc/init.d/cupsd restart
```

Your printer should be up and running.Last edited by Joseph_sys on Wed May 03, 2017 7:07 pm; edited 2 times in total

----------

## SlashBeast

Looks like all brother drivers are crap, You may be interesed in the ebuild I did https://github.com/slashbeast/foo-overlay/blob/master/net-print/brother-dcp-j315w-drivers/brother-dcp-j315w-drivers-1.ebuild for the DCP-j315w.

Took me awhile time to find one that brother did not provided brlpdwrapperdcpj315w file which is needed by its drivers and I have to symlink it to filterdcpj315w.

----------

## Joseph_sys

 *SlashBeast wrote:*   

> Looks like all brother drivers are crap, You may be interesed in the ebuild I did https://github.com/slashbeast/foo-overlay/blob/master/net-print/brother-dcp-j315w-drivers/brother-dcp-j315w-drivers-1.ebuild for the DCP-j315w.
> 
> Took me awhile time to find one that brother did not provided brlpdwrapperdcpj315w file which is needed by its drivers and I have to symlink it to filterdcpj315w.

 

You took the words out of my mouth, yes Brother printer drivers are complete crap when it comes to Linux.

If one did not modify the file: /usr/local/Brother/inf/br..xxx..rc according to setting I provided the printer will not print Duplex nor you will be able to use front Manual Tray.

They are outdated and not maintained, installation instructions are a dog.

It took me a while to figure all these options.

While we are at it there is a good guide how to reset "toner gear" on Brother cartridges  (page 10 on this pdf), resetting the gear will give you few 100-pages more.

http://iwt.kiev.ua/files/BrotherTN550.pdf

----------

## SlashBeast

To modify the settings I think you should use brprintconf_*

----------

## Joseph_sys

 *SlashBeast wrote:*   

> To modify the settings I think you should use brprintconf_*

 

I modified this file using normal text editor "nano -w ..." restart the cuspd and everything almost worked except Duplexing.

----------

## bmadonna1401

Does anyone know what file I need to place into /usr/lib/cups/filter.  I tried using the brother RPMs with rpm with no luck so then I followed your guide for this other model printer but the problem is it never drops any file into /usr/lib/cups/filter so I tried making a copy of cups wrapper in /usr/lib/cups/filter and renaming it to brlpdwrapperhl4570cdw and cups claims I have print jobs completing but nothing every comes out of my printer still.  Any  help would be greatly appreciated.

----------

## Joseph_sys

 *bmadonna1401 wrote:*   

> Does anyone know what file I need to place into /usr/lib/cups/filter.  I tried using the brother RPMs with rpm with no luck so then I followed your guide for this other model printer but the problem is it never drops any file into /usr/lib/cups/filter so I tried making a copy of cups wrapper in /usr/lib/cups/filter and renaming it to brlpdwrapperhl4570cdw and cups claims I have print jobs completing but nothing every comes out of my printer still.  Any  help would be greatly appreciated.

 

I don't have any files in "/usr/lib/cups/" or "/usr/lib64/cups/" the directory don't even exist.

Why do you need any file in there?

Just convert rpm to tar.gz and the instruction above and follow the remaining instructions.

----------

## bmadonna1401

How would you have done the sys link if there wasn't something to syslink?  Also the printer shows that it is idle and the jobs vanish when I print it looks like the job printed and nothing prints. Could there be some sort of bug with cups perhaps? I vagey recall something like this happening a long time ago.

----------

## Joseph_sys

If you go to: http://localhost:631/printers/

do you see your printer?

----------

## bmadonna1401

Yes and it's idle I print a test page and the job disappears and nothing comes out.

----------

## Jimmy Jazz

 *Joseph_sys wrote:*   

> 
> 
> Note: Brother has a PPD driver based on: BR-Script3 (ppd file on their web-page)
> 
> 

 

I always thought BR-Script3 was another postscript compatible language.

Why not use cups/foomatic generic postscript driver instead ?

----------

## bmadonna1401

Not sure what I did but my printer is working now.  I read somewhere that you have to make a /user/lib64/cups/filterfolder first then install the RPMs.  I thought that what I did before seeing that lib and lib64 go to lbi64 but making the syslink to /usr/lib64/cups/filer after re-installing the RPMs again also seemed to make a difference.

----------

