Turn Any Printer Into a Wireless Printer With a Raspberry Pi

210,415

941

51

About: I'm an inactive K'nexer, I used to be one of the most active ones, but I have a lot of other things to do. I try to post a new instructables every few months, but sometimes it takes a while for me to think o...

Once you've bought a wireless printer, you never want to go back to the dark days of having to plug in all the time. But good wireless printers are expensive, and many routers that let you make network printers out of USB ones don't necessarily do all the driver-work for you.

With a $25 RPi Model A, a $2 power supply, a $5 SD card and a $5 USB Wifi dongle (be sure to find one supported in Raspbian or other OSes) you can turn any printer from the CUPS printer list into a wireless network printer. A lot of added functionality for under $40!

If you look for a laser printer from the early 2000s on that list, chances are it will be heavily supported and very efficient with toner, not to mention cheap.

Step 1: Step 1: Set Up Your OS

This is pretty simple stuff if you know anything about the RPi, so I won't tell you much about it, but if not the foundation has made an awesome instructional page.
Any OS should do, but make sure it has WICD for easy setup!

If you can't find it on your OS, here is a good guide to setting it up from scratch.

(Check out this guide to installing Raspbian if you need help.)

Step 2: Step 2: Setting Up CUPS to Print

CUPS is a printer driver to make Linux work more like Windows with printers.

To install it, type this into terminal:

sudo apt-get install cups

After that add yourself to the CUPS admin files, with

sudo usermod -a -G lpadmin username

Since CUPS doesn't have a standalone GUI, you connect to it with a web browser. Find your IP address by typing in

ip addr show

Then enter into a web browser your ip address followed by a colon then CUPS default port number of 631.

Click the "printers" tab and find the driver for your printer model. Install it, then print a test page.

Step 3: Step 3: Sharing the Printer

Once you have the printer working with test pages, you need to go to the printer's profile then under administration set it to sharing.

Step 4: Finished!

Your PiPrinter should be showing up from any other machine on the network as if it were a shared printer. (Note the @RaspberryPi)

Rename it and give it a location if you want! Use "Generic Postscript printer" on your connected machines since CUPS on the Pi is handling the printer-computer driver relations.

Share

Recommendations

  • Plastics Contest

    Plastics Contest
  • Make it Glow Contest 2018

    Make it Glow Contest 2018
  • Optics Contest

    Optics Contest

51 Discussions

0
None
hrushimehta

Question 8 months ago on Step 1

cant find the printer with IP address and port name !!

Please help !

0
None
jonTW

2 years ago

I tried to use CUPS (through Openmediavault) to act as a server for my Canon LBP6030W. Though it correctly identified the printer, there was no driver for it. I tried several different drivers but none worked.

I wonder if anyone could offer some suggestions that would help me run that printer though CUPs.

0
None
overseasr

2 years ago

well i have done all the step but i can not open localhost:631

1 reply
0
None
sudantoverseasr

Reply 2 years ago

If you have not figured out yet, try running the following commands to enable remote access to CUPS service and restart the cups service:

sudo cupsctl --remote-any
sudo /etc/init.d/cups restart

Now find the IP address of the RPi and access it from your browser as mentioned in the article (like 192.168.1.100:631).

0
None
vivek_chaudhary

2 years ago

Well u can't "Turn Any Printer into a wireless printer with a Raspberry Pi" but only those which drivers are available for Linux in ARM architecture. Trust me there are more non supported then supported printers.

1 reply
0
None
LouisC16vivek_chaudhary

Reply 2 years ago

Yes, my printer came only with i386 binary CUPS driver........ :(

0
None
Arnn

2 years ago

Thanks a lot, was really helpful

0
None
AbD6

2 years ago

So can i still use this method even if the printer driver is not supported by ny windows operating system

0
None
crgeary

2 years ago

You can use $(whoami) to automatically add your correct username.. Eg:

sudo usermod -a -G lpadmin $(whoami)

0
None
SwiftD1

2 years ago

...............................

0
None
SwiftD1

2 years ago

.........................

0
None
LierezT

2 years ago

Hi
What should i write in the "username" in the line 'sudo usermod....'?
Thank you

1 reply
0
None
LierezTLierezT

Reply 2 years ago

I wrote pi as username and i think i works. (i'm not getting any error).
But i cant find my xerox workcenter pe120.
I searched for other printers and didnt found anything.
Maybe it have some connection to the fact that i cant get into cup with the ip address?
I enter the cup with localhost:631
Thank you!

0
None
IanJ18

3 years ago

Got as far as the cups gui by using localhost:631 as ip option would not work. Tried finding drivers on the printer tab but there aren't any trying sesrching many different models but nothing showing? Then tried adding the printer using the default user and password but this is not accepted....Help

0
None
hitechqueenqueen

3 years ago

Hi, I find difficult to add myself to group "Ipadmin". When I try this "sudo usermod -a -G Ipadmin username", it returns "usermod: group 'Ipadmin' does not exist". I also try to get accessed to "Administration page" to add printers by browsing 127.0.0.1:631, after inputing my RaspberryPi's name and password, it returns "Add printer error - Unable to add printer - Forbidden, please help, thanks.

1 reply
0
None
AdityaG20hitechqueenqueen

Reply 3 years ago

In case you're still stuck, or someone else gets this problem, its lower case L and not an uper case i. Writing LPADMIN in lower case is what it required basically, i.e. lpadmin.

It's supposed to mean line printer I think.

ref: https://www.raspberrypi.org/forums/viewtopic.php?t=40705&p=332288

0
None
qubodup

3 years ago

I got fed up with the laser printer toner fumes and put the printer in the furthest part of my flat and used this guide to set it up with an RPI A with a stronge power source (wouldn't work with usb adaptor otherwise). Thanks!

I currently have an OKI B410 and a Brother HL-2030 connected. both work perfectly locally or from Windows or Mac but if I print from my 64bit Arch Linux, both print jobs fail:

OKI desktop-local message:

processing since Thu 22 Oct 2015 08:26:23 PM CEST "/usr/lib/cups/filter/foomatic-rip failed"

OKI rpi-local message:

stopped "/usr/lib/cups/filter/foomatic-rip failed"

Brother desktop local message:

processing since Thu 22 Oct 2015 08:32:46 PM CEST "Sending data to printer."

Brother rpi-local message:

stopped "/usr/lib/cups/filter/foomatic-rip failed"

I used Minibian-wifi https://sourceforge.net/projects/minibianwifi/ , so I could use a 2GB SD card. I just used the root user, so no dealing with permission...

0
None
hhrasmus

4 years ago on Introduction

Nice project. I have more or less the same setup.

Do you have any idea on how to add a relay so that the printer can automatically be turned on when there is a print job for it. The HW part if it is easy but how to make CUPS toggle the pin is not so obvious to me.

1 reply
0
None
quboduphhrasmus

Reply 3 years ago

You could probably have a script running all 5 seconds or so that uses a command-line tool to check if there's a print job in some list (just some kind of "if `lprmagiclistpending | wc -l` > 1 then")

There are commands on https://www-uxsup.csx.cam.ac.uk/pub/doc/suse/suse9...

You might want to share your solution :)