Port for Brother printer drivers ?

FDreamer

Member

Reaction score: 4
Messages: 20

Hi guys,

I'm looking into making my Brother printer (HL-1110) works on FreeBSD by using the Linux drivers.
I managed to do it once but lost my config since.
There are some information here or on other sites (edited with [USER=57110]pinned[/USER] 's link)
- dcp-j772dw : https://forums.freebsd.org/threads/brother-dcp-j772dw-printer-and-freebsd.69677/
- dcp-j140w : https://forums.freebsd.org/threads/any-chance-of-getting-the-brother-dcp-j140w-to-work.38655/
- https://tdotc.eu/2007/06/02/using-the-brother-printer-drivers-with-freebsd/

Basically, we need to edit the installation file to change the paths.

Would it be worth it if I try to make a port for this driver ? As a side note, I've never done any port before.
Thanks,
 
Last edited:

Sevendogsbsd

Daemon

Reaction score: 571
Messages: 1,025

The Linux "driver" executable, which I think in the case of Brother printers is a wrapper, may have to be invoked via Linux emulation, in addition to modifying the paths. I thought I read a thread here a few years ago about that but not sure whether the poster had success.
 

Sevendogsbsd

Daemon

Reaction score: 571
Messages: 1,025

The problem with Brother printers is that Brother has pulled the printing functionality out of hardware and put it in software, which is proprietary. The "driver" is a Linux binary wrapper. Without this wrapper, or native driver in Windows, the printer is useless on FreeBSD unless you can somehow get Linux emulation to run the binary. Far easier, albeit not cheaper, is to only buy PCL/Postscript printers. Possibly not an option for OP, and I get that: you have hardware and would like to use it.

Another option might be to host the Brother printer on another machine running Linux or Windows and share it out so FeeBSD can see it. I have no experience in that though.

EDIT: sorry, to clarify terms: "port" means to re-write a piece of software for a given platform. In the case of the Brother driver, it is provided in binary form and is not port-able because no source code is available.
 
OP
F

FDreamer

Member

Reaction score: 4
Messages: 20

EDIT: sorry, to clarify terms: "port" means to re-write a piece of software for a given platform. In the case of the Brother driver, it is provided in binary form and is not port-able because no source code is available.

Oh, I was under the impression that there was some ports without source code. But https://www.freebsd.org/ports/ says indeed that
Each "port" listed here contains any patches necessary to make the original application source code compile and run on FreeBSD.
 

Sevendogsbsd

Daemon

Reaction score: 571
Messages: 1,025

You cannot "port" (re-write) software from one platform to another without the original source code. If you are referring to the FreeBSD ports, those are source code for applications that have been re-written for FreeBSD, or written only for FreeBSD, and require compilation in order to run. The terms aren't really related, at least to me. Hope I am not confusing the issue.
 
OP
F

FDreamer

Member

Reaction score: 4
Messages: 20

Yes, I was thinking about FreeBSD ports. Thanks for clarifying the issue.
So, if I manage to make it work, is there a central repository to put the FreeBSD-compatible install script ?
Otherwise, I could create a "How-to" thread to the forum and add it as an attachment. At the moment, there are already some threads there and there, but without any scripts.
 

Sevendogsbsd

Daemon

Reaction score: 571
Messages: 1,025

You can post the solution in the how to section I think, and include the code there. The problem you are going to run into is getting the Linux binary wrapper to run. Unless you can just use the printer ppd, but not sure that will work since most of the functionality is rolled up into that binary.
 

diizzy

Well-Known Member

Reaction score: 93
Messages: 355

The slightly roundabout way would be to use Airprint which at least the first model supports according to Brother.
 
OP
F

FDreamer

Member

Reaction score: 4
Messages: 20

Update: I managed to make the driver work (see below) but I've seen they give the source code for the executable. So it may be possible to have a FreeBSD port after all....

(Edit: removed the creation of a script named brprintconflsr3_HL1110 as it's useless)
How to install
Download here the CUPS and LPR drivers :

Then extract all files on / for both driver :
Code:
tar xvzf data.tar.gz -C /

Install psutils and linux_base-c7
Then run commands shown in the postinst script, modified for FreeBSD

Code:
sed -i.bak 's/chown lp/chown root/' /opt/brother/Printers/HL1110/inf/setupPrintcap
sed -i.bak 's/chgrp lp/chgrp daemon/' /opt/brother/Printers/HL1110/inf/setupPrintcap
/opt/brother/Printers/HL1110/inf/setupPrintcap HL1110 -i USB
/opt/brother/Printers/HL1110/inf/braddprinter -i HL1110
echo \[psconvert2\]   >>/opt/brother/Printers/HL1110/inf/brHL1110func
echo pstops=/usr/local/bin/pstops  >> /opt/brother/Printers/HL1110/inf/brHL1110func
ln -s /opt/brother/Printers/HL1110/inf/brHL1110rc       /etc/opt/brother/Printers/HL1110/inf/brHL1110rc



Because it complaints that
/usr/local/libexec/cups/filter/brother_ldwrapper_HL1110 does not exist :

Code:
ln -s /opt/brother/Printers/HL1110/cupswrapper/brother_lpdwrapper_HL1110  /usr/local/libexec/cups/filter


Finally, add the .ppd file in CUPS interface (this is supposed to be done with the postinst file...).
 
Top