Thursday 5 January 2017

Installing the Brother HL2130 printer driver on Linux

I recently upgraded to openSUSE Leap 42.2. Since I did a fresh install, one of the things I had to get working again was my Brother HL2130 laser printer. It's a very basic model but does what I want and is cheap to run. It connects to the host computer with USB.

Brother supplies drivers for Linux as both RPM and DEB packages, do a web search to find a download server. These are actually filters that convert Postscript to Brother printer language. They integrate with the CUPS or the old LPD spooler systems.

After I did the install, nothing would print. The log showed the printer connecting and disconnecting from the USB port.

I looked at the files installed by the Brother packages and found in the directory /usr/local/Brother/Printer/HL2130/cupswrapper/ the file cupswrapperHL2130-2.0.4 I ran this manually with sh -x cupswrapperHL2130-2.0.4 -i and noticed that it ran a lpinfo towards the end to get some information. I ran lpinfo manually and found that it didn't detect the printer. I switched on the printer and this time the printer was detected with the path: usb://Brother/HL-2130%20series?serial=XXXXXXXX I reran the install script and this time the installation worked. This time it had edited /etc/cups/printers.conf with the correct DeviceURI.

So the short solution is: Switch on the printer before installing the Brother driver packages so that detection and configuration of the printer can happen.

This probably also applies to other Brother printer models using USB connectivity.

Later on a search showed somebody with the same problem and a manual solution.

No comments:

Post a Comment