A simple way of bringing your regular USB printer to modern standards without you having to shell out a fortune. In this article, I will be going through the steps on how to set up a Raspberry Pi wireless printer on a Windows 10 PC from scratch.
The actual process of getting the software installed is quite simple; however I've documented some of the additional steps that
needs to be completed in order for a Windows PC to discover and add this printer. Here is the finished product...
...nothing that a bit of scotch tape can't fix :)
* My equipment list:
I have assumed that you are starting from scratch. In case you already have Raspbian installed on your Raspberry Pi then please jump to Step 4.
1. Prepare the microSD card ready to use with your Raspberry Pi
2. Install Raspbian on the Raspberry Pi
3. Set the Raspberry Pi preferences
4. Backup the Raspberry Pi microSD card
5. Update the Raspberry Pi
$ sudo apt-get update
$ sudo apt-get upgrade --yes
$ sudo reboot
6. Install and start CUPS (Common Unix Printing System) on the Raspberry Pi
$ sudo apt-get install cups
$ sudo usermod -a -G lpadmin [pi]
$ sudo /etc/init.d/cups start
7. Configure CUPS and set permissions on the Raspberry Pi
$ sudo nano /etc/cups/cupsd.conf
# Only listen for connections from the local machine.
#Listen localhost:631
#CHANGED TO LISTEN TO LOCAL LAN
Port 631
# Restrict access to the server...
<Location />
Allow @Local
</Location>
# Restrict access to the admin pages...
<Location /admin>
Allow @Local
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
Allow @Local
</Location>
$ sudo service cups restart
$ sudo cupsctl -–remote-any
$ sudo /etc/init.d/cups restart
https://[myRaspberryPiHostname]:631/
8. CUPS - Add a printer
http://[myRaspberryPiHostname]:631/printers/[myPrinterName]
9. Adding the Raspberry Pi powered wireless print server to a PC
Steps 10 to 13 are applicable ONLY if you are using a Windows PC.
10. Enable SMB1 Sharing Protocol on Windows 10
11. Enable Internet Printing Protocol (IPP) printing on Windows 10
12. Setup and configure Samba on the Raspberry Pi
$ sudo apt-get install samba
$ sudo nano /etc/samba/smb.conf
# CUPS printing.
[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 = /var/lib/samba/printers
browseable = yes
read only = no
guest ok = no
$ sudo systemctl restart smbd
13. Add the newly created network printer on your Windows PC
http://[myRaspberryPiHostname]:631/printers/[myPrinterName]
Great Job
And there you go; you now have wireless network printer. Enjoy!!!
Addendum:
** 17 June 2020: Replaced my Raspberry Pi with a Raspberry Pi Zero WH