[root tip] [How To] Basic networked printer setup

Basic networked printer setup

You have a, perhaps new, wireless printer to be connected to your network.

The problem is - the vendor’s setup utility is targeted Windows and therefore useless on Manjaro.

Locate your printer’s control panel - you will be able to setup the network connection using the panel.

Before you begin

Extract the necessary info using the terminal on your Manjaro system - run the command nmcli.

$ nmcli
eno1: connected to Wired connection 1
        "Intel I219-LM"
        ethernet (e1000e), 00:D8:61:XX:YY:ZZ, hw, mtu 1500
        ip4 default
        inet4 192.168.1.33/24
        route4 192.168.1.0/24 metric 100
        route4 default via 192.168.1.1 metric 100
        inet6 fe80::1d7:f8bf:3f34:cc75/64
        route6 fe80::/64 metric 1024

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
        servers: 192.168.1.1
        domains: router
        interface: eno1

Make notes of the following data

  • route4 default via 192.168.1.1 metric 100
    • this is the gateway IP 192.168.1.1
  • route4 192.168.1.0/24 metric 100
    • the netmask - in this example /24 which translates to 255.255.255.0
  • inet4 192.168.1.33/24
    • your Manjaro IP
    • in the example 192.168.1.33

Your printer needs to be assigned a static IP address and we don’t want to create address clash as this will create serious problems for your network.

In our example the Manjaro system has IP .33 so we can assume the DHCP range starts around .33 but let’s make sure the assumption is correct.

Install the package arp-scan as we will use this to locate what other devices has assigned IPs and which ones.

sudo pacman -Syu arp-scan

Scan your network

sudo arp-scan -l

Looking at the result we should see a pattern

  • usually the gateway is the first or among the last IPs on the network above .250
  • the lack of assigned addresses below or high above the computers IP address
  • a concentration of devices closely around the computers IP address

When we locate the pattern we can likely select an IP address without creating an address clash.

Configure the printer and connect

Use the panel to configure the printer’s network card corresponding to your notes

Note that some printers requires 4×3 digits

IP 4x3 digit rule
network address 192.168.1.30 192.168.001.030
subnet mask 255.255.255.0 255.255.255.000
gateway address 192.168.1.1 192.168.001.001

You also need the encryption used for your network and the encryptionkey. If you router provides a connection button - you will be able to connect without knowing the key. Use what comes easy in your case.

Verify the connection

Use the terminal to ping your printer

$ ping -c4 192.168.1.30
PING 192.168.1.30 (192.168.1.30) 56(84) bytes of data.
64 bytes from 192.168.1.30: icmp_seq=1 ttl=64 time=0.432 ms
64 bytes from 192.168.1.30: icmp_seq=2 ttl=64 time=0.512 ms
64 bytes from 192.168.1.30: icmp_seq=3 ttl=64 time=0.398 ms
64 bytes from 192.168.1.30: icmp_seq=4 ttl=64 time=0.363 ms

--- 192.168.1.30 ping statistics --- 
4 packets transmitted, 4 received, 0% packet loss, time 3027ms
rtt min/avg/max/mdev = 0.363/0.426/0.512/0.057 ms

You should get a result similar to above - if not start over.

Getting the device to print

Every printer requires the system initiating the print, to provide the print in a manner the printer can understand. This is commonly know as drivers, and it can sometimes be difficult to find the right definition to use on a Linux system. With the CUPS printing system these definitions is known as PPD (Postscript Printer Description) files and is usually provided by the printer vendor.

What precisely is needed for your printer is out of scope for this guide.

When you have installed and enabled the cups printing system - the printer can be added to the system using a dedicated web interface on [http://localhost:631/] or you may have opted to install the package system-config-printer (GTK) or print-manager (Plasma)- which provides a more familiar GUI to configure and control the printer.

Most printers supports one or more of below examples using either hostname or IP address

http://{hostname|ip}:631/ipp/
http://{hostname|ip}:631/ipp/port1

ipp://{hostname|ip}/ipp/
ipp://{hostname|ip}/ipp/port1

lpd://{hostname|ip}/queue

socket://{hostname|ip}
socket://{hostname|ip}:9100

If you cannot make it work - you are likely not the first to encounter the issue - so please search the forum for earlier references to your printer. Always check with the printer vendor - if they support Unix printing using CUPS. If they do it is likely the CUPS printing files has been made available as a custom package in the Arch User Repository.

If you cannot find any references you may create a new topic and please be specific about make and model.

4 Likes

notes and extras