Wednesday, March 5, 2025

How to add a Brother printer in Linux

I keep forgetting how to setup a printer in Linux, thus I'm documenting the necessary steps here in the hope it will be also useful for others. In this example I'm using a Brother HL-1210WE but the steps could apply to other models or brands also. The Linux distribution that I'm using is Linux Mint but since we are using CUPS this should work on all major Linux distributions.

Contents

 

Using the printer over USB

This is the easiest method. For this particular printer model the drivers were automatically installed after the USB cable was plugged in. The installed printer can be found in Printers app.

Linux Mint Printers

Here you can see all installed printers, set a default printer indicated by the green check mark, modify printing settings....

Printer settings

In case Linux doesn't find drivers automatically, you can try and find them on the manufacturer website by searching your printer model: https://support.brother.com/g/b/downloadtop.aspx?c=eu_ot&lang=en&prod=hl1210we_eu.

Using the printer over WiFi

Connecting a wireless printer on Linux is not difficult provided you have Windows. What

Sometimes you just need Windows

The thing is you have to upload wifi credentials to the printer and most of the time the provided app by the manufacturer for doing this, is only available for Windows. I did run the installer in Wine but it fails to detect the USB printer. There are printers that initially create an wireless access point that you can connect to it using a phone and upload the wifi credentials using the phone. In my case the printer doesn't have that feature so we need Windows. I use VirtualBox from Oracle to run Windows in a virtual machine just for this kind of scenarios. There I can also use the Lexmark X1100 scanner with the original Windows application since it has some nice features. There are other options such as dual boot or using a laptop with a Windows OS, but using a virtual machine is much more convenient.

Tip: disable internet access on Windows that runs in a virtual machine, if you don't needed, since it will run much faster if Windows doesn't update. Since is a virtual machine, the OS doesn't need constant updates, especially if you keep the internet off.

Using Windows to upload WiFi credentials to printer

Once you have a working Windows OS, download the "Full driver & Software package" installer from the manufacturer webpage: https://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=hl1210we_eu&os=10013.

Tip: If you are using Virtual Box you can install the Guest Additions to copy the downloaded installer from Linux to Windows by drag-and-drop and the WiFi SSID and password with copy/paste instead of typing them.

Before following the instructions of the installer it is a good idea to reset the network settings of the printer if it was used with other WiFi credentials.

Reset the network settings to the factory default

For Brother printers you can use your machine's On/Off button to reset the print server to its default factory settings. This resets all information, such as the password and IP address.

  1. Make sure the power cord is plugged in, the top cover is closed and the machine is turned off.

  2. While holding down the power button, open and close the top cover (the one that you open to replace the cartridge).

  3. Release the power button. Make sure that all the LEDs turn off.

  4. Press the power button six times. The machine will restart.

Finding printer's IP

In order to add the printer we need to know on what IP address it is located. The LAN IP address is allocated by the 'router'. For example if you access the router web interface at 192.168.1.1 the printer could be assigned to 192.168.1.2, a phone to 192.168.1.3 and so on for other devices on your LAN (Local Area Network). To find the printer look somewhere under LAN » DHCP Clients List. This depends on your router. For a Brother printer the Hostname should start with BRW.

DHCP Clients List
This step is actually more useful to get the MAC address of the printer and not the IP since the IP can change next time the printer requests an IP address. For this reason you should create a static IP. How to do this depends on your router. On mine it was under Setting and LAN » DHCP Static Leases. There pick an address, for example 192.168.1.100. I chose 100 since is easy to remember. Then you use the MAC address so the router knows what IP should allocate to the printer when it sees that MAC.

Tip and warning: Brother decided to force updates on some models that breaks printing if the toner is not an original one. So they are using chips now unfortunately. To prevent an unwanted update, you can add a firewall rule in your router to block a device by MAC address to connect to the internet.

Adding the wireless printer in Linux using CUPS

CUPS (Common Unix Printing System) is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer. (Source: https://en.wikipedia.org/wiki/CUPS).

To access CUPS web interface type http://localhost:631 in a browser. The printer can also be added using the Printers app but I find the web interface easier. Under the Administration page click on Add printer but before that you will have to input the user name and password used in Linux.

CUPS web interface - Add printer
For the printing protocol IPP is preferred as it uses bidirectional communication which gives you more feedback and control. LPD is an old standard, IPP is newer. LPD/LPR is still commonly used and works quite well but it doesn't provide much control for users on the printer settings per print job. (Source: https://askubuntu.com/a/401169).

CUPS - Add printer - IPP
Not sure about the IPPS protocol. Maybe is more secure? Regardless, before choosing the protocol make sure your printer supports it. This can be done in two ways.

Find printer protocols using port scanning

First install nmap:

sudo apt install nmap

Then start the scan using the IP of the printer:

sudo nmap -sS 192.168.1.2

Scan printer protocols using Nmap

Here you can see that the IPP is supported at port 631. Port 515 is for LPR.

Source: https://superuser.com/a/854539/647265.

Find printer protocols using web interface

The printer has a web interface that can be accessed using the IP address of the printer in a browser. There login using the password initpass or the password located on the back or bottom of the machine preceded by "Pwd". For Brother HL-1210 the password was initpass. The supported protocols are listed under Network -> Protocols.

Brother HL-1210 web interface

Under General -> Status you can see the toner level since unfortunately this information is not available using CUPS.

Now that we know the IP of the printer and decided what printing protocol to use, it's time to add it in CUPS.

CUPS - Add printer - Connection

The Connection is the next step. Here the connection is formed by the printing protocol IPS, the IP of the printer and the port 631. Example: ips://192.168.1.2:631.

CUPS - Add printer - Description

In this step we add the printer description. The Name cannot contain spaces or it will trigger an error.

CUPS - Add printer - Brand

Next select the manufacturer which is Brother in this example.

CUPS - Add printer - Model
Finally, select the model which in this case is HL-1200 series. If everything worked correctly the printer can be found at the Printers tab. 

CUPS - Printers

AP isolation

There are cases when the printer connects to the router but a wired PC cannot see the printer. One reason can be the AP isolation of your router.

AP isolation, or Access Point isolation, is a security feature found in many wireless routers and access points. When enabled, it prevents clients connected to the same access point from communicating with each other. If there is no such setting in your router you need to ask your ISP to disable it.

No comments:

Post a Comment