This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

Brother HL 2140 on FreeBSD / cups

brother cool
Added by about 3 years ago  »  Votes: 2/2

To sum up

To install brother HL 2140 on your freebsd8 system:

  1. Load ulpt module into your kernel (or rebuild kernel to support it)
  2. Rebuild CUPS 1.4.2 without libusb support (try make config from /usr/ports/print/cups-base). Remember to restart cups daemon.
  3. Install the following ports/packages: foomatic-db, foomatic-db-engine, foomatic-filters
  4. Generate a .ppd file that uses the hl1250: go to http://www.openprinting.org/driver/hl1250/ and select your model (HL 2140)
  5. Go to http://localhost:631/ to add your USB printer with that .ppd file
  6. Add user to the group cups by executing pw groupmod cups -m your_user_login
  7. Update /etc/rc.conf by adding cupsd_enable="YES"
  8. Update /etc/devfs.rules with the following contents. Then update /etc/rc.conf by adding devfs_system_ruleset="system"
# file: /etc/devfs.rules
[system=10]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*'  mode 0660 group cups
add path 'lpt*'   mode 0660 group cups

Story

Brother is a company of Japan, which is founded in 1908. It produces printers and many devices for your IT life. One of its good features is that it supports offically drivers for Linux stations. If you are using Linux, your Brother printer should work.

How about FreeBSD? Yah, here goes... If Brother has .ppd file, we can use it for CUPS; but if Brother provides cupswrapper or something similar (which are often Linux stuff only) you may have some challenges. In fact, it took me a day to install Brother HL 2140 on my freebsd system.

First, I used .ppd file from an offical page of OpenPrinting. This page mentions only Linux distributions, but it provides a .ppd which is based on the driver hpijs-pcl5e. This means that I have to install hpijs server. Without hpijs, you will get errors in /var/log/cups/error_log:

[Job 34] hpijs: not found
[Job 34] GPL Ghostscript 8.70: Can't start ijs server "hpijs" 
[Job 34] **** Unable to open the initial device, quitting.
[Job 34] renderer exited with status 1
[Job 34] Possible error on renderer command line or PostScript error. Check options.

The port hijis was broken on FreeBSD 8, so I tried hlip2 and/or hlip3. The building of those two ports took me many hours and I even patched the Makefile (with --disable-network-build). Both ports require many depedencies, and I really hate to use them. I don't want to make my system messy.

Fortunately, my friend (long) told me about the hl1250 driver. I don't really know that it is, but it goes here http://www.openprinting.org/driver/hl1250/. Using that link, I could generate a .ppd file for Brother 2140, and such .ppd uses the builtin functions of ghostscript (instead of the external server hpijs from HP).

My friend also told me that on Arch Linux, the cups 1.4.2 couldn't recognize the local USB printer. See Arch wiki for an example. The problem is that on Arch, usblp is a kernel module and it should be disabled when using cups. On FreeBSD, if you disable ulpt, I guess that we can't use USB printer anymore (but I amnot sure). Then I found that I could disable libusb support from cups. (As you know, since FreeBSD 8, usb backend was completely rewritten, and you are recommened to rebuild all ports that needs libusb.)

So, I tried to rebuild cups without libusb support, and use new .ppd file. You know... it worked so fine. Most options of the printer are supported. Cool. Brother is cool too :)

Today, I've found a guide for HL_2170/2140 from Arch wiki (link below). That guide tells me to use pxlmono driver (not hl1250). I will try it later.

Thank you

Special thanks to long who ended my disappointed day :)

Ref.: Brother: http://brother.com/
Ref.: Brother at wikipedia: http://en.wikipedia.org/wiki/Brother_Industries
Ref.: Arch guide for HL 2170/2140: http://wiki.archlinux.org/index.php/Brother_HL-2170W
Ref.: OpenPrinting guide for H L2140: http://www.openprinting.org/printer/Brother/Brother-HL-2140
Ref.: HL 1250 driver: http://www.openprinting.org/driver/hl1250/


Comments