Wireless technology is arguably the best improvement in home printing in years. Less cables, flexibility in where you can place your printer — it’s a win-win. If you don’t have an old printer.

While it might be easy enough to buy a new printer for less than $50, you may have spent enough on your last one and couldn’t justify the expense. In addition, your old printer may have a special feature or handle duplex printing in a particularly satisfactory manner that you may bother to replace.

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

Benefits of Wireless Printing

If you haven’t yet taken advantage of wireless printing, then this project is definitely worth starting. Do you have a large, bulky printer taking up space in your office that you don’t use very often? Maybe the cables are in the way?

AI-piprint wireless printing

With a wireless printer, you can take your print to a private room (perhaps even your shed) and collect print jobs when they’re finished. Thus, the space taken up by the printer on your desk can be used in other ways. Using wireless technology, printing can also be done from any device, be it a laptop, smartphone or tablet.

Wireless printing is really about making the print flexible, not «fixing» it on the table. And the Raspberry Pi can help with that.

Preparing for Wireless Printing with Raspberry Pi

In this project, you need to make sure you have connected and configured the wireless USB dongle for your Raspberry Pi. You must also use a USB printer. This job can be done with a parallel printer connected to a parallel to USB adapter, but you’ll need to do some other research if you have any problems with this.

ai-raspi-wireless-dongle-close

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

Finally, if you haven’t already, set your Raspberry Pi to your preferred operating system and make sure it’s up to date (if you haven’t already, NOOBS is probably the best solution…).

To update enter

sudo apt-get update 

followed by

 sudo apt-get upgrade 

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

Setting up a Raspberry Pi as a print server with CUPS

With the hardware connected and configured, the first thing to do is to make sure your USB printer is detected.

Open a command prompt (either directly on your Raspberry Pi or via SSH. ) and type:

 lsusb 

A list of connected USB devices should appear. Check this and identify your printer.

After that, you need to install Samba, an open source file sharing software. This can be done by issuing a command.

 sudo apt-get install samba 

Follow the instructions that are displayed.

Then 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 drivers for Linux, but if they are not available, use them.

You are now ready to add the default user to the Printer Administrators group.

 sudo usermod –a –G lpadmin pi 

Adding Your Printer

Next, you need to set up the printer with your Raspberry Pi. Boot into the GUI with startx, launch a browser and navigate to 127.0.0.1:631 and go to the Administration tab.

Select Add new printer, enter your Raspbian credentials when prompted, and then select your printer from the displayed list. Proceed to the next screen by selecting the correct device from the list. On the next screen, confirm the details and assign a name, then select » Share this printer» and press » Proceed» .

Aya-piprint-cup-cher

Depending on the manufacturer of your device, the next page may take some time to load. This is because a whole range of device driver names are loaded, so if you have connected an HP printer, you may have to wait a very long time. Once the list is loaded, select the correct printer driver (which should be the default) and proceed. Or click » Choose another brand / manufacturer» and select » Raw materials» . You can let Windows handle the driver!

Click Add Printer, then set the default options. After a few seconds, the printer will be ready to start accepting jobs. To make sure it works, click » Service» and select » Printing a Test Page» .

Connecting to Raspberry Pi from Windows

After all this is done, you need to make sure Windows access to your Raspberry Pi is enabled so you can start printing.

This can be done by editing the samba config file in /etc/samba/smb.conf — you can do this in the GUI as you should, although it’s easy enough to run 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 

Then press CTRL+W to find «workgroup» and set it up like this (if necessary, replacing your_workgroup_name — usually with Workgroup ) :

 workgroup = your_workgroup_name wins support = yes 

After saving, exit the GUI and restart samba:

 sudo /etc/init.d/samba restart 

Start printing from Windows and Mac OS X

After restarting samba, which shouldn’t take more than a few seconds, you can switch to the Windows machine and add the new printer. First make sure your Raspberry Pi is visible by opening Windows Explorer > Network .

Go to Control Panel > Hardware and Sound > Devices and Printers > Advanced Printer Setup and wait while the system scans. A faster option is to expand the Raspberry Pi entry in Windows Explorer’s Browse window, from which you can right-click the printer, choose » To plug» select the Windows printer driver, and start printing.

aya-piprint-output

In the meantime, Mac users can add a new printer in the normal way.

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

aya-piprint-cup-admin

Have you given a 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

Похожие записи