Family Encyclopedia >> Electronics

How to Build a DIY Wireless Printer With a Raspberry Pi

If you have an old-school printer or just a printer without wireless connectivity, you don't need to upgrade. You can make a DIY wireless printer if you have a spare Raspberry Pi.

ContentsPreparing your Raspberry PiInstalling CUPSEnabling remote access to CUPSInstalling your printer and enabling network accessConnecting to your network printerDIY wireless printing with a Raspberry Pi

Here's everything you need to do to set up a Raspberry Pi wireless print server.

Prepare your Raspberry Pi

Setting up a DIY wireless printer requires a Raspberry Pi with an appropriate Linux distribution. One of the best Raspberry Pi Linux distributions is Raspbian, the flavor of Linux officially supported by the Raspberry Pi Foundation. The instructions in this guide will work for Raspbian and other Ubuntu or Debian-based distributions.

You'll need to choose a Raspberry Pi with available USB ports, so the Pi Zero isn't really a good fit here. You will also need to provide network access to your printer through your Pi.

To make things more portable, a wireless Raspberry Pi would be best here, but there's nothing stopping you from using an older Pi with a USB wireless adapter.

Installing CUPS

Before doing anything run sudo apt update and sudo apt upgrade in a terminal window or via an SSH connection to ensure that your Raspberry Pi is fully up to date.

Installing CUPS is your next step. CUPS, or Common UNIX Printing System, is a print server designed by Apple and widely used on Linux and Unix systems. You will also need to ensure that SAMBA, which you will need to print from Windows devices, is installed.

To install them both, type:

sudo apt install samba

and

sudo apt install cups

Once done, add your user account to the admin group for printing by typing:

sudo usermod -aG lpadmin pi

Replace pi with your username if you switched from the default.

Activation of remote access to CUPS

If your Raspberry Pi has a GUI and you are working on it directly using a keyboard, you can open a browser and visit 127.0.0.1:631. Alternatively, replace 127.0.0.1 with your Pi's network IP address to access it from your PC or other device, but you'll need to allow remote access to CUPS first.

Open your terminal and type the following:

cupsctl --remote-admin --remote-any --share-printers

If you see a "connection refused" error after that, restart your Pi.

Installing your printer and activating network access

You should be able to visit your CUPS administration page once you have enabled remote administration. Go to the "Administration" tab at the top and login with your Pi username and password when prompted.

How to Build a DIY Wireless Printer With a Raspberry Pi

Select your printer brand (e.g. "Samsung") from the next menu. You will then need to find and select your particular printer model - click 'Add Printer' once you are done. You can also select "Raw" as your printer's "make" to allow local devices to load their own drivers, but this may not work for all devices.

If you cannot find your printer in the list, find the corresponding PPD (PostScript Printer Definition) file on the OpenPrinting website.

Finally, click "Set Defaults" to complete the printer setup. You can select "Print Test Page" from the maintenance drop-down menu under your printer to check that everything is working properly.

Connecting to your network printer

The next step is to connect to your printer. In Windows 10, you can do this by going to "Settings", then "Printers &scanners" and clicking "Add a printer or scanner". To do this, you will need to be on the same network as your Raspberry Pi.

How to Build a DIY Wireless Printer With a Raspberry Pi

The scan should find the network printer quickly. Select it and click "Add Printer". After a few moments, your printer should be installed and ready to print. You can also set up your printer on Linux, or if you're an Apple user, you can add your network printer to your Mac.

You can also print on it using your iOS or Android device.

DIY wireless printing with a Raspberry Pi

It doesn't matter which side of the inkjet printer vs laser printer debate you're on – a Raspberry Pi can bring any type of printer into the modern era with wireless support. You can even use it to upgrade a new, cheaper USB-only printer and save money.

Thanks to CUPS, setting up a Raspberry Pi wireless print server in this way is easy to do. Let us know your own experiences in the comments below.

Image credit:Raspberry Pi logo via Wikimedia