How to make an old USB printer supporting Apple AirPrint

OR How to Enable Apple AirPrint on Any USB Printer Using Raspberry Pi.

If you are our longtime readers, you will surely remember that in 2017 we reused a Brother laser printer and transformed it into a network printer (here is the article with the link to the tutorial, the CUPS configuration, and the specific PPD file for our Brother HL-2030 since the CUPS one does not work) thanks to the use of a small Raspberry Pi.

Well, now that we are also using Macintosh computers and their macOS system, it made us want to use new Apple technologies as well and then add AirPrint functionality to our network printer.

A Raspberry Pi (any model with USB and network connectivity)
A Raspberry Pi (any model with USB and network connectivity)

How to Enable Apple AirPrint on Any USB Printer Using Raspberry Pi 🖨️

Introduction

In today’s increasingly wireless world, having a network-enabled printer is almost essential, especially in environments using Apple devices. While newer printers come with AirPrint capabilities built-in, many reliable older USB printers lack this functionality. This guide will show you how to transform any USB printer into an AirPrint-capable device using a Raspberry Pi, making it accessible across your local network.

What is AirPrint?

AirPrint is Apple’s protocol that enables wireless printing without requiring specific printer drivers. As described by Apple, it allows for:

  • Direct printing from macOS, iOS, and iPadOS devices
  • Automatic printer discovery on the local network
  • Automatic media selection
  • Enterprise-class finishing options
  • Driver-free printing experience

Prerequisites

Before starting, you’ll need:

  • A Raspberry Pi (any model with USB and network connectivity)
  • SD card (8GB minimum recommended)
  • USB printer
  • USB cable
  • Power supply for Raspberry Pi
  • Network connection (Wi-Fi or Ethernet)

Support Our Work 🤝

By using our affiliate links for your purchases, you can support our work (like the How to Enable Apple AirPrint on Any USB Printer Using Raspberry Pi article) at no additional cost to you. Here’s how it works:

  • When you make a purchase through our affiliate links, we receive a small commission
  • The price you pay remains exactly the same
  • Your support helps us maintain the website, create new content, and improve your experience

If you need the products, please buy and support

This helps keep our content free and accessible to everyone. Thank you for supporting independent content creation! 🙏

Step-by-Step Setup Guide

1. Initial Raspberry Pi Setup

First, we need to prepare the Raspberry Pi:

  1. Download and install Raspbian on your SD card
  2. Enable headless operation:
   # Create ssh file in boot partition
   touch ssh

   # If using Wi-Fi, create wpa_supplicant.conf file
   nano wpa_supplicant.conf

Add the following to wpa_supplicant.conf:

   country=US
   ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
   update_config=1

   network={
       ssid="YOUR_WIFI_NAME"
       psk="YOUR_WIFI_PASSWORD"
       key_mgmt=WPA-PSK
   }

2. CUPS Installation and Configuration

Once your Raspberry Pi is running, connect via SSH and execute these commands:

# Update system
sudo apt-get update
sudo apt-get full-upgrade

# Install CUPS
sudo apt-get install cups

# Add pi user to printer admin group
sudo usermod -a -G lpadmin pi

# Enable remote access
sudo cupsctl --remote-any

# Restart CUPS service
sudo systemctl restart cups

3. Printer Setup in CUPS

  1. Access CUPS web interface at http://raspberrypi:631/admin
  2. Login with Raspberry Pi credentials
  3. Click “Add Printer”
  4. Select your USB printer
  5. Configure sharing settings:
  • Enable “Share This Printer”
  • Check “Allow Printing from the Internet”
  • Save changes

4. Enabling AirPrint Support

Install and configure Avahi daemon for AirPrint service discovery:

# Install Avahi daemon
sudo apt-get install avahi-daemon

# Restart the system
sudo reboot

Verification and Testing

After reboot, your printer should be discoverable on Apple devices:

  1. On iOS/iPadOS:
  • Go to any app with printing capability
  • Tap share icon → Print
  • Your printer should appear in the printer list
  1. On macOS:
  • Open System Preferences → Printers & Scanners
  • Click ‘+’ to add printer
  • The printer should appear automatically

Troubleshooting

If the printer isn’t appearing:

  1. Check CUPS service status:
   sudo systemctl status cups
  1. Verify Avahi daemon is running:
   sudo systemctl status avahi-daemon
  1. Ensure printer sharing is enabled in CUPS web interface
  2. Check firewall settings:
   sudo ufw status

💡 Allow ports 631 (CUPS) and 5353 (Avahi) if needed.

Advanced Configuration

Securing Your Print Server

  1. Change default CUPS admin password:
   sudo passwd pi
  1. Enable HTTPS for CUPS:
   sudo cupsctl --ssl

Optimizing Performance

  1. Adjust CUPS buffer size in /etc/cups/cupsd.conf:
   RequestRoot 8m
  1. Enable job compression:
   JobCompression yes

References and Further Reading

  1. Official Apple AirPrint Documentation
  2. Raspberry Pi Official Documentation
  3. CUPS Documentation

Updates and Maintenance

Remember to regularly update your Raspberry Pi system:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

This ensures you have the latest security patches and improvements.

Conclusion

By following this guide, you’ve transformed a standard USB printer into an AirPrint-capable device accessible to all Apple devices on your network. This setup provides a cost-effective way to extend the life of older printers while adding modern functionality.

Last updated: How to Enable Apple AirPrint on Any USB Printer Using Raspberry PiDecember 2024