Set up a network Epson printer/scanner on Arch Linux (CUPS, SANE, Avahi)
IPP printing with CUPS, AirScan scanning with SANE, Avahi discovery and .local resolution with nss-mdns.
This guide shows how to set up an Epson ET-3950 network printer/scanner on Arch Linux: printing with CUPS (IPP), scanning with SANE / AirScan, automatic discovery with Avahi, and .local name resolution with nss-mdns.
Required packages
| Package | Purpose |
|---|---|
cups, cups-filters |
print service and conversion filters (PDF, images) |
system-config-printer |
graphical printer configuration tool |
avahi |
local network discovery (mDNS / Bonjour) |
nss-mdns |
lets the system resolve .local names |
sane, sane-airscan |
scanner framework and eSCL / AirScan backend |
simple-scan |
simple graphical scanning application |
sudo pacman -S cups cups-filters system-config-printer avahi nss-mdns sane sane-airscan simple-scan
sudo systemctl enable --now cups
sudo systemctl enable --now avahi-daemon
Network diagnostics
In this order:
ping 192.0.2.10
avahi-browse -art | grep -i epson
avahi-resolve-host-name printer01.local
getent hosts printer01.local
The printer should advertise _uscan, _uscans, _scanner, Internet Printer and Secure Internet Printer. If avahi-resolve-host-name returns the IP but getent hosts returns nothing, Avahi works but the system does not query mDNS: nsswitch.conf needs fixing.
Fix .local name resolution
After installing nss-mdns, edit /etc/nsswitch.conf and replace the hosts: line (for example hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname) with:
hosts: files mdns_minimal [NOTFOUND=return] dns myhostname
To keep resolve:
hosts: files mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname
Then:
sudo systemctl restart avahi-daemon
getent hosts printer01.local
Configure the printer in CUPS
Adding the printer from the GUI (DNS-SD / IPPS) failed with CUPS server error: internal server error; configuring it with lpadmin works. The printer advertises rp=ipp/print, so the URI is ipp://<ip>:631/ipp/print.
sudo lpadmin -p EPSON_ET_3950 \
-E \
-v "ipp://192.0.2.10:631/ipp/print" \
-m everywhere
sudo lpoptions -d EPSON_ET_3950
| Option | Purpose |
|---|---|
-p |
local printer name in CUPS |
-E |
enable the printer |
-v |
network URI of the printer |
-m everywhere |
IPP Everywhere (driverless) model |
Once getent hosts works, the name can replace the IP (ipp://printer01.local:631/ipp/print).
Test printing
lpstat -t # CUPS status
lpstat -e # printers
lpstat -d # default printer
echo "Test Epson ET-3950 from Arch Linux" | lp
lp -d EPSON_ET_3950 file.pdf
lpq # queue
cancel -a EPSON_ET_3950 # cancel all jobs
Scanning
airscan-discover
scanimage -L
airscan-discover should list the URL http(s)://192.0.2.10:443/eSCL/. scanimage -L should show lines such as:
device `escl:https://192.0.2.10:443' is a Epson ET-3950 Series platen,adf scanner
device `airscan:e0:EPSON ET-3950 Series' is a eSCL EPSON ET-3950 Series ip=192.0.2.10
The v4l:/dev/video* entries are the built-in cameras, not the scanner. In simple-scan, pick airscan:e0:EPSON ET-3950 Series. From the command line:
scanimage -d "airscan:e0:EPSON ET-3950 Series" --format=png > scan.png
xdg-open scan.png
Notes
scanimage -Lmay print Epson HTML before the device list: a SANE backend queries the printer web interface at the wrong endpoint. It is harmless; use theairscan:device explicitly.- Configuring CUPS with the IP is fine as long as the printer address does not change (ideally reserve it on the router).