cups and a Brother HL-L2340DW

Tijl Coosemans tijl at
Sat Jul 15 12:50:16 UTC 2017

On Fri, 14 Jul 2017 18:38:05 -0700 "Russell L. Carter" <rcarter at> wrote:
> So this printer is the current recommendation
> for best cheap laser printer.  After introducing it to dhcpd
> so that the IP address is fixed, I was ready to introduce it
> to cups.
> Add Printer -> Discovered Network Printers
>              -> select Brother HL-L2340D series...  
> (next screen) Connection: 	lpd://BRWD80F9967A5AB/BINARY_P1
> (hit Continue)
> Or Provide a PPD file: Browse... brother-HLL2340D-cups-en.ppd
> 	    -> Add Printer  
> -> Set Default Options  
> Which gives me, after some screen changes:
> Brother_HL-L2340D_series (Idle, Accepting Jobs, Not Shared)
> Description:	Brother HL-L2340D series
> Location:	
> Driver:	Brother HL-L2340D for CUPS (grayscale, 2-sided printing)
> Connection:	lpd://BRWD80F9967A5AB/BINARY_P1
> Defaults:	job-sheets={job_sheets_default} media=iso_a4_210x297mm 
> sides=one-sided
> I hit ^P, the print dialog comes up, I select this printer, and all
> looks good, except if I go look at jobs, I see:
> ID	Name	User	Size	Pages	State	Control
> Brother_HL-L2340D_series-124  	Unknown  	Withheld  	1k  	Unknown 
> canceled at
> Fri Jul 14 18:08:00 2017  	
> What gives?
> I am on the verge of installing linux on a box to deal with this.

I suspect you need to use the official Linux driver from Brother.  It
should be possible to get this working on FreeBSD using Linux emulation
but it'll require some tinkering.

Install emulators/linux_base-c6 and print/ghostscript9-agpl-base.

Download both the LPR printer driver and CUPSwrapper printer driver here:

Unpack the rpm packages using tar(1).  They contain an /opt directory
that you can move to /compat/linux/opt.  Inside the directory are some
Perl scripts (brother_lpdwrapper_HLL2340D, paperconfigml1 and
filter_HLL2340D) where you have to change /usr/bin/perl on the first
line into /usr/local/bin/perl.

Edit brother_lpdwrapper_HLL2340D to replace line 87 from

$PRINTER =~ s/^\/opt\/.*\/Printers\///g;


$PRINTER =~ s/^.*\/Printers\///g;

Then create these symbolic links:

ln -s /compat/linux/opt/brother/Printers/HLL2340D/cupswrapper/brother_lpdwrapper_HLL2340D /usr/local/libexec/cups/filter/
ln -s /compat/linux/opt/brother/Printers/HLL2340D/cupswrapper/brother-HLL2340D-cups-en.ppd /usr/local/share/cups/model/

More changes may be needed, but this should get you a bit further.  The
scripts seem to create log files in /tmp so you may want to look there
for clues.  Also in /var/log/cups.

More information about the freebsd-questions mailing list