How-ToTutorials

Raspberry pi as print server

Making Raspberry pi as print server will help you in making your printer wireless.

What you need ?

Raspberry pi
USB wireless dongle.
USB Printer
I am assuming that you have already setup raspberry pi with suitable OS.  Make sure that is is updated to latest version. To do so follow the following commands.

sudo apt-get update
sudo apt-get upgrade

Configuring the Raspberry Pi

Step1: Make sure the the printer is detected  by Pi

To check all USB devices attached, use the following command

lsusb

Step 2: Install open source file sharing tool, Samba

sudo apt-get install samba

Follow the instructions

Step 3: Next its time to install CUPS ( Common Unix Printing System)

sudo apt-get install cups

CUPS provides drivers for your printer.

Step 4: Add default user to the printer admin group

sudo usermod –a –G lpadmin p

Adding Printer to Raspberry Pi

Boot Raspberry pi and launch the browser. Go to 127.0.0.1:631 and switch to administration tab.  Select Add new printer 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.

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.

Now you need to make sure that the access from your Windows/Mac to Raspberry Pi is enabled so that you can start printing.

To do this open the samba config file from /etc/samba/smb.conf and add following lines

# 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 required):

workgroup = your_workgroup_name 
wins support = yes

Once you save the confing restart samba using following command:

sudo /etc/init.d/samba restart

Now move to you windows PC  and add new printer.

Go to Control Panel > Hardware and Sound > Devices and Printers > Advanced printer setup and wait for the system to scan.

You are now done!

 

Leave a Reply