Pinterest Stumbleupon Whatsapp
Ads by Google

Wireless technology is perhaps the best improvement to home printing for years. Fewer cables, flexibility about where you can put your printer – it’s win-win. Unless you have an older printer.

While it might be easy enough to buy a new printer for under $50, you might have spent enough on your last one, and be unable to justify the outlay. Additionally, your old printer might have a special function, or manage duplexing in a particularly satisfying way, to bother replacing it.

The solution, then, is to make it wireless. Several solutions are available, but one popular choice is to use your Raspberry Pi as a wireless print server.

Benefits Of Wireless Printing

If you haven’t already enjoyed the benefits of wireless printing, then this project is definitely the place to start. Got a big bulky printer taking up space in your office that you don’t use too often? Perhaps the cables get in the way?

muo-piprint-wireless-printing

With a wireless printer you can move your printing into a separate room (perhaps even your shed) and collect your print jobs when they’re complete. This way, the space taken up by the printer on your desk can be used in other ways. Using wireless technology, printing can also take place via any device you might have, whether it’s a laptop, smartphone or tablet.

Ads by Google

Wireless printing really is about making printing flexible rather than “locking” it to the desk. And the Raspberry Pi can help with this.

Preparing For Wireless Printing With The Raspberry Pi

For this project, you’ll need to ensure you have connected and setup a wireless USB dongle for your Raspberry Pi Setting Up Wireless Networking on Your Raspberry Pi Setting Up Wireless Networking on Your Raspberry Pi Virtually every Raspberry Pi project will require a network connection, and considerable flexibility can be gained by ignoring the Ethernet port in favour of a wireless USB dongle. Read More . You should also be using a USB printer. It’s possible to make this work with a parallel printer coupled to a parallel-to-USB adaptor, but you’ll need to research elsewhere if you run into any problems with that.

muo-raspi-wireless-dongle-close

You’ll also need a USB cable from your printer to your Raspberry Pi.

Finally, if you haven’t already done so, setup your Raspberry Pi with a preferred operating system, and ensure it is up to date (If you haven’t done this before, NOOBS is probably the best solution How NOOBS For Raspberry Pi Can Help First Time Users How NOOBS For Raspberry Pi Can Help First Time Users There is something about the Raspberry Pi that might just put people off: until now, setting it up has not been particularly user friendly. NOOBS aims to change that! Read More .).

To update, enter

sudo apt-get update

followed by

sudo apt-get upgrade

This tutorial was written based on a wireless print server running on Raspbian.

Configuring Your Raspberry Pi As A Print Server With CUPS

With the equipment connected and setup, the first thing to do is ensure that your USB printer is detected.

Open a command line (either on your Raspberry Pi directly or over SSH Setting Up Your Raspberry Pi For Headless Use With SSH Setting Up Your Raspberry Pi For Headless Use With SSH The Raspberry Pi can accept SSH commands when connected to a local network (either by Ethernet or Wi-Fi), enabling you to easily set it up. The benefits of SSH go beyond upsetting the daily screening... Read More ) and enter:

lsusb

A list of attached USB devices should appear. Check it, and identify your printer.

Following this, you’ll need to install Samba, the open source file sharing software. This can be done by entering the command.

sudo apt-get install samba

Follow any instructions that are displayed.

Next, it’s time to install CUPS, the Common Unix Printing System (note that you must install Samba first).

sudo apt-get install cups

CUPS provides drivers for your printer. Many manufacturers now provide Linux drivers, but in the event one isn’t available, use this.

You’re now ready to add the default user to the printer admin group.

sudo usermod –a –G lpadmin pi

Adding Your Printer

Next, you’ll need to setup your printer with your Raspberry Pi. Boot into the GUI with startx, launch your browser and go to 127.0.0.1:631 and switch to the Administration tab.

Select Add new printer, input your Raspbian credentials when requested and then select your printer from the displayed list. Proceed to the next screen, selecting the correct device from the list. In the following screen, confirm the details and assign a name, then check Share This Printer and click Continue.

muo-piprint-cups-share

Depending upon your device manufacturer, the next page may take a while to load. This is because a whole host of device driver names are being loaded up, so if you’ve connected a HP printer you may be in for a long wait. Once the list has downloaded, select the correct printer driver (which should be selected by default) and continue. Alternatively, click Select Another Make/Manufacturer and select Raw. You can let Windows handle the driver!

Click Add Printer, then Set Default Options. A few moments later the printer will be ready to start accepting jobs. To ensure it is working, click Maintenance and select Print Test Page.

Connecting To Your Raspberry Pi From Windows

With that all done, you need to ensure that access from Windows to your Raspberry Pi is enabled so that you can start printing.

This is done by editing the samba config file in /etc/samba/smb.conf – you can do this in the GUI as you should still be in there, although it is simple enough to launch it in bash with a text editor.

The following should be added:


# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
printing = cups
printcap name = cups
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /usr/share/cups/drivers
browseable = yes
read only = yes
guest ok = no

Next, press CTRL + W to search for “workgroup” and setup as follows (replacing your_workgroup_name as necessary – usually Workgroup):

workgroup = your_workgroup_name 
wins support = yes

With that saved, exit the GUI and restart samba:

sudo /etc/init.d/samba restart

Start Printing From Windows & Mac OS X

Once samba restarts – which shouldn’t take more than a few seconds – you can switch to your Windows PC and add a new printer. First check that the Raspberry Pi is visible by opening Windows Explorer > Network.

Go to Control Panel > Hardware and Sound > Devices and Printers > Advanced printer setup and wait for the system to scan. A quicker option is to expand your Raspberry Pi’s entry in Windows Explorer’s Network view, from which you can right-click on the printer, select Connect, select your Windows printer driver and start printing.

muo-piprint-output

Mac users, meanwhile, can add a new printer in the usual way.

Any administration of the print server that needs to be performed can be done by opening http://[RPI.IP.ADDRESS.HERE]:631, which will display the CUPS printer admin web interface on any networked computer.

muo-piprint-cups-admin

Have you given new, wireless life to an old printer with your Raspberry Pi? Let us know how it went!

Image Credit: Craig Berscheidt via Flickr, Wireless Printer via Shutterstock

  1. Ravi Dhoble
    November 23, 2016 at 2:23 pm

    Hello, I am a newbie to Raspberrypi and i want to do this project. This post mentioned NOOBS OS for Raspi but I am using Raspbian Jessei. So will it work? And I don't understood "Boot into the GUI with startx" Please tell me about it. Thank you.

    • Christian Cawley
      November 23, 2016 at 7:51 pm

      Hi Ravi

      If you already have Jessie running, then you won't need NOOBS.

      If you're using Raspbian from the command line, then you can boot into the GUI - graphical user interface, the standard mouse-driven desktop - by entering the startx command.

  2. Steve Martin
    November 21, 2016 at 11:21 am

    Thank You Sir! Works like a champ.

    • Christian Cawley
      November 23, 2016 at 7:51 pm

      Great news, thanks for letting us know, Steve!

  3. Wells
    August 4, 2016 at 4:37 pm

    I'm going to be trying this in my college dorm on the public wifi. Is it possible to add a password so that not just anyone can print to my printer?

  4. Alex
    July 10, 2016 at 8:08 pm

    Works an absolute treat, thanks.

  5. Richard W
    June 5, 2016 at 6:03 pm

    can i use hp software to wirelessly scan papers through the raspberry pi?

  6. Mark
    May 16, 2016 at 9:31 pm

    Unfortunately my HP deskjet f2180 isn't on the CUPs list of support from what I can see and I don't know which driver to choose :( would have been perfect otherwise as I can see it listed on my mac but obviously won't print if the driver isn't right!
    I guess I'll have to pay £30 for a wireless printer haha but it's a shame!

    • Christian Cawley
      May 17, 2016 at 10:27 am

      Well that's too bad. On the other hand, try it with a generic HP driver before giving up.

      • Mark Kelsall
        May 17, 2016 at 12:14 pm

        Definitely, would have been nice as my first little step into the PI world.
        I tried it with the generic HP deskjet one from the list and a few others that looked like they could have been close in model numbers.
        Would there be another that could be classed as a generic one that you could suggest?

        • Hunter
          June 15, 2016 at 7:25 pm

          You might want to look at the hplip package. It's specifically for supporting HP printers, and might have support for your printer...

    • Cameron
      July 22, 2016 at 4:15 pm

      Use the Raw driver in CUPS and then choose the right driver on client machines. Actually works better that way even if CUPS does have the right driver for your printer.

  7. Mats
    May 4, 2016 at 3:21 pm

    Ok, Mats here. I figured it out! My Pi is not listed in my Windows Network, but when I try "\\raspberrypi" in my Windows Explorer, I actually get my printer listed there. From there I can Connect to it. Problem solved! :)

    • Christian Cawley
      May 4, 2016 at 5:30 pm

      Good to see you got it sorted out!

  8. Mats
    May 4, 2016 at 2:35 pm

    Hi,

    Thank for the good article. I got everything working up until when I need to add the printer to my Windows 10. I don't see my raspberry pi listed in Windows Network, and when I search for a printer from my control panel I don't find any. I have installed samba following your article. What might have gone wrong?

    Thanks! /M

  9. Simon
    November 27, 2015 at 7:48 pm

    I am forbidden to add a new printer, I'm assuming this is because of the problem I have adding me to the printer admin group.

  10. Simon
    November 27, 2015 at 7:37 pm

    The sudo usermod –a –G lpadmin pi bit on mine just gives a list of other options... Is that right?

    • DrauagerVan
      December 7, 2015 at 9:16 pm

      Ecountered same problem. Use "sudo adduser ".

      • DrauagerVan
        December 7, 2015 at 9:18 pm

        "sudo adduser saned lpadmin" for add user "saned" in group "lpadmin" for example.

  11. Lierez Tzur
    November 25, 2015 at 7:11 pm

    hi
    i am trying to connect my xerox workcenter pe120 to a pi working with raspbian but when i wrote lsusb i cant recognize my printer. i just see the logitech usb and the lan connetion(it is not connected via usb)
    do you have any advice?

    thank you!

    • Christian Cawley
      November 26, 2015 at 12:01 am

      you need to have the printer connected to the Pi via USB if you're looking for it using lsusb, which lists USB devices.

      • Lierez Tzur
        November 26, 2015 at 6:57 am

        Yes i know.
        The printer is connected to the pi via the usb connection but the pi is not recognize it.
        There are any drivers that i need to download?

  12. Larry Fortna
    September 7, 2015 at 11:00 am

    I have a Brother MFC5980CN printer. I installed the drivers from the Brother support site.

    I successfully completed all of the steps in CUPS and it recognizes my printer but when I try to print anything the status says stopped and nothing prints.

    I am able to submit a print job from my iPhone as well, but again, nothing prints and jobs stay in the queue showing "stopped"

    When I select the Printers | Status page, I see idle - "File "/usr/lib/cups/filter/bripdwrappermfc5890cn" not available: No such file or directory.

    I am guessing it is driver problem since the drivers are for Linux Debian and maybe Raspian for the Raspberry Pi is different enough as to prevent it from working?

    Anyway, the tutorial was excellent, easy to follow. Just wish it worked with my printer.

  13. Marius
    August 4, 2015 at 12:29 pm

    I've followed the first few steps but I can't access the local webpage to set it up (127.0.0.1:631) It says the webpage is unavailable.

    • Tomasz
      January 6, 2016 at 7:47 pm

      It only works locally (localhost:631) with default setup. In trusted env (like home network) following should do the trick:
      sudo cupsctl --remote-any
      sudo /etc/init.d/cups restart

  14. Ivan Toft
    March 27, 2015 at 8:46 am

    I connected my HP LaserJet 1100 succesfully

    Raspberry Pi2 with raspian OS, noname USB netdevice

    Connected with and Centronics parallel to USB adapter, noname

    Printing from Windows 7 system

    Thanks for making this very helpfully page

  15. J. Lauer
    March 22, 2015 at 3:15 am

    Is there a way to uninstall this option if no longer using? Thank you.

    • Christian Cawley
      March 25, 2015 at 6:46 pm

      you should be able to remove the software with sudo apt-get remove

  16. Chris Kelly
    March 18, 2015 at 6:15 pm

    Thanks for the response! As to the Windows driver - I only have one (in fact, I have None - Win 8 doesn't support a Canon ip6600d - but the win7 drivers work fine, I've done it before). However, it's locking up even from the pi itself - printing a page from Xpdf on the pi freezes! It's driving me nuts.

    • Christian Cawley
      March 20, 2015 at 9:51 am

      That's weird. Are you using the Pi for any other server-related tasks?

    • Andro
      April 24, 2015 at 7:36 pm

      Was hoping to hear someone say they use a single Pi to serve DHCP, CUPS, and squid through a wireless broadband module plugged into the Pi's USB port all without issues. Would that really be too much to ask of a quad-core 1GB RAM Pi2 to offload my wee zyxel broadband modem/router/switch-in-one?

  17. Chris Kelly
    March 12, 2015 at 12:28 pm

    Set this up last night on a RPi2B and a Canon printer. Both Windows and Raspbian test pages worked fine. Easy and quick!

    Then I actually tried to print something. Quick print of Raspbian web browser locked up after about three printhead passes, never finished. Print of Xpdf page failed utterly, froze. Print of pdf page from windows, same problem.

    Any ideas on buffering/flow control problems? Maybe memory?
    Thanks,

    • Christian Cawley
      March 15, 2015 at 3:31 pm

      Have you tried switching to the alternative driver? You should see two options on the Pi to select in Windows, so select the alternate

  18. Steven F
    March 8, 2015 at 7:16 pm

    You may have to run this command for the CUPS admin page to work.

    sudo cupsctl --remote-admin

  19. Wes
    December 5, 2014 at 6:42 am

    After a lot of trial and error I kind of got it working. I was able to connect a windows 7 pc to the now networked printer and printed off the test page. However, when trying to connect with my macbook air I get an error message that says it can't connect to the raspberrypi server... I would have thought adding it on the mac would be the easy part...

  20. Per
    October 30, 2014 at 9:52 am

    Regardless of all possible ways the get a printer working wireless its still an interesting article for us that likes to tinker with stuff and try to learn more. Thanks for a good article.

  21. Andrey
    October 28, 2014 at 1:02 am

    Subject CUPS - not the most difficult. Poor disclosed subject configure AirPrint. Nothing is said about the printer you need to install your driver (HP). I'm not talking about that put CUPS - no problem practically no one, and here is how to configure MFU, especially any Epson with their epkowa - that's what excites me, and not only me ...

  22. Andrew Jordan
    October 25, 2014 at 9:14 am

    I picked up an HP wireless printer add on. Basically you plug the uSB into This and it broadcasts the printer on your network. Pick it and Windows will supply needed drivers and you have wireless printing. It works with other brands as well. Bought at surplus store or on line and it was cheap,

    • Fred
      October 26, 2014 at 12:46 pm

      the best and simplest solution.. and available in most computer stores :-)

      Also the Apple Airport units do this too :-)

  23. an advisor
    October 25, 2014 at 6:22 am

    why bother with dropbox when you can just send your legal documents directly to the NSA or Mossad.

    • rc primak
      October 26, 2014 at 4:23 am

      If you're worried about someone reading your Cloud Data, simply use SpiderOak. End to end strong encryption, starting with encrypting on your device, and Spider Oak does not hold your security keys. Even if they got your data by court order, there is no way anyone could get your keys except by getting an order to you to hand over the keys. Which requires a hearing or two.

  24. Terry Schneider
    October 25, 2014 at 4:33 am

    Chinmay S, Dropbox is cloud computing. Cloud computing only ads to more internet traffic. The internet is not capable of all the demands that are being put on it. Also Dropbox requires an internet connection where local WiFi to work only requires that the local network is up. It is a marketing scheme to get people to use the cloud and not your own home network for computing. The cloud should not be used for home computing only for communicating to computers and networks outside of your network.

    • Dan
      October 25, 2014 at 6:02 pm

      What a ridiculous comment. The Internet is working just fine with all the demands placed on it, but I would be very interested in seeing your supporting evidence.

      Dropbox supports LAN file syncing so no, it doesn't require an Internet connection. Cloud Print via Chrome would also work over a LAN once configured.

      Your final sentence regarding the uses of "the cloud" is so subjective that it comes off as satire, but given the lack of quality in the rest of your comment it clearly is not. How about you do whatever you want and let the rest of us do the same?

  25. Mark W.
    October 24, 2014 at 3:37 pm

    I agree with Stan & xord - there's lots of wireless routers that support attached storage and printers and doing this with a Raspberry-Pi device might be a little cheaper but not much. If it supported AirPrint natively that would be better.

    But without that - once you have you printer on your local WiFi there are cheap (sometimes free) apps that will work in place of AirPrint or whatever Android uses.

    In place of the Dropbox solution - could you use Google Cloud print using Christian's solution to provide access to the printer from anywhere?

    • GMF
      October 25, 2014 at 9:32 pm

      Yes you can use Google Print with Cristian's great suggestion and it works just fine.

  26. Stan
    October 24, 2014 at 7:42 am

    Is there any way to make it supports Android and iOS device (phone/table) ?

    • Christian C
      October 25, 2014 at 5:19 pm

      There is, and I'm going to be addressing it soon!

  27. Chinmay S
    October 24, 2014 at 5:07 am

    This is another myth that for wireless printing you need wireless printer. A wired printer is more than enough. All you need is Dropbox. You put a file inside a folder in Dropbox, a script on computer detects a new file in that folder and sends a print job to the wired printer.

    This amazing solution was developed by Amit Agarwal of labnol.org, you can download the VBS script from his site(there are also workarounds for Mac and Linux).

    • xord
      October 24, 2014 at 7:13 am

      This solution requiring a PC constantly on power to be able to read the change in the Dropbox. Plus there is other simple way to do that using Chrome. This article simply convert the printer to wireless printer with less power than a PC. Although there is other simple way, like using router with built in USB or USB to WiFi converter

    • Chinmay S
      October 24, 2014 at 3:03 pm

      But the method described in this article requires all devices to be connected to the same network. In the case of Dropbox printing, you can send print job from 1 corner of the world to another, you just don't need to mess with networks.

    • Edward Mann
      October 27, 2014 at 12:28 pm

      @Chinmay,
      Run the script on your PI and you have the same solution plus a wireless printer for when you are on the local network.

Leave a Reply

Your email address will not be published. Required fields are marked *