News Trending

How to Make Your Own Wireless Printer With a Raspberry Pi

ad+1

printer-tips

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 new printers are affordable, you might have spent enough on your last one that it’s not worth the outlay. Additionally, your old printer might have a special function, that replacing it might be too expensive.

The solution? Make your old printer wireless. Many 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. But why bother with wireless printing?

  • Your printer is no longer tied to your computer
  • Any device can print to it (laptop, smartphone or tablet)
  • No more endless cables
  • Wireless functionality on your existing wireless printer is faulty

Wireless printing really is about making printing flexible—an ideal project for the Raspberry Pi. The beauty of this solution is that it will work for Windows, macOS, and other Linux computers.

Preparing for Wireless Printing With the Raspberry Pi

To enable wireless printer on an old, wired device, you’ll need a Raspberry Pi with built-in Wi-Fi.

Wireless-enabled models are:

Raspberry Pi Zero W Raspberry Pi Zero W Buy Now On Amazon $24.99

With older devices, ensure you have connected a wireless USB dongle for your Raspberry Pi and connected the device to your network. The Pi should be running the latest version of Raspbian installed to the SD card.

You will also need:

  • A USB printer (a parallel printer coupled to a parallel-to-USB adaptor can work)
  • Printer’s power supply and USB cable
  • Credentials for your wireless network

Boot and Update Your Raspberry Pi for Printing

Start by connecting everything. Your printer should be connected to the Raspberry Pi and powered on. Access your Raspberry Pi either using a keyboard and display, or a remote connection using SSH, VNC, or RDP.

To update, open a terminal and enter:

sudo apt update && sudo apt upgrade -y

This checks for software updates, and upgrades as required. Follow the prompts on screen until this is completed.

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) 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 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 install cups

CUPS provides drivers for your printer. Many manufacturers 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

By default, CUPS will not enable access from another device. To fix this, configure CUPS to accept connections from, say, your PC browser and restart the service:

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

Adding Your Printer

Next, you’ll need to setup your printer with your Raspberry Pi. Switch to the Raspberry Pi desktop, launch your browser and go to 127.0.0.1:631 and switch to the Administration tab. Alternatively, browser direct to 127.0.0.1:631/admin/

Select Add new printer, input your Raspbian credentials when requested and then select your printer from the list. Proceed to the next screen, selecting the correct device from the list.

Configure a Raspberry Pi wireless printer server

Next, confirm the details and assign a name, then check Share This Printer and click Continue.

Share any printer on your network with a Raspberry Pi

Depending upon your device manufacturer, the next page may take a while to load as device driver names are loaded. Select the correct printer driver (which should be selected by default) and continue.

Alternatively, click Select Another Make/Manufacturer and select Raw. This means that the device you’re printing from will 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 Print Server

With that all done, you need to ensure access to your Raspberry Pi is enabled. For macOS, this is by default, but for Windows, some extra configuration is required. Once this is done, you can start printing.

Edit the samba config file in /etc/samba/smb.conf. There are two ways to do this:

  • Open the file on the desktop and make the changes in a text editor
  • Use sudo nano /etc/samba/smb.conf to edit the file in the terminal

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

workgroup = your_workgroup_name

wins support = yes

You’ll need to input the Windows “workgroup” name  replacing your_workgroup_name—this is usually Workgroup):

Press Ctrl + X to save and exit, then restart samba:

sudo systemctl restart smbd

Start Printing From Windows & macOS

Samba will take a few seconds to restart. You can now switch to your 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. Simply right-click on the printer, select Connect, select your Windows printer driver, and start printing.

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. This displays the CUPS printer admin web interface on any device on your network.

You Made a DIY Print Server With Raspberry Pi

If you’ve made it this far, your Raspberry Pi-powered print server should be up and running. You’ve just brought a non-wireless printer online, enabling wireless printing to it from any device.

This is just one of many awesome projects you can build with a Raspberry Pi computer.

Read the full article: How to Make Your Own Wireless Printer With a Raspberry Pi



from MakeUseOf https://ift.tt/1xA8TPC
via IFTTT

0 comments: