Give new life to old printers and keep your Raspberry Pi listening for print jobs while idle.
All the modern printers are coming with integrated Wifi and/or Ethernet adapters.
Instead of buying a new printer, just create your own standalone network printer (wired and wireless) with a Raspberry Pi.
Installing CUPS
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install cups
sudo usermod -a -G lpadmin pi
sudo cupsctl ‐‐remote-any
sudo service cups restart
Go tho the browser on the Pi and type:
http://127.0.0.1:631 OR http://localhost:631
Or from any other computer in the same network:
http://192.168.2.40:631 (remember to put your Pi's IP)
Find out the IP address of your Raspberry Pi:
hostname -I
Click on ‘Administration‘ on the top menu:
Click on ‘Add Printer‘:
You will be required to switch to an encrypted connection:
If your browser asks for confirmation, as Chrome does, click in ‘Advanced‘ and then on the link at the bottom ‘Proceed to …‘
Click again on ‘Add Printer‘ and authenticate with the user ‘pi‘:
All the printers attached to your Pi and already recognized will be shown on ‘Local Printers‘, select the one you want to install, in my case is the ‘Samsung SCX-3200 Series‘, and ‘Continue‘:
Inform the location ‘pi‘, mark ‘Share This Printer‘, and ‘Continue‘:
If you find the driver to your printer model o series, great! If not, go online and check which generic driver is compatible with your printer (for the vast majority of the printer there is one compatible driver). Select ‘Another Make/Manufacturer‘
Select ‘Generic‘ and click ‘Continue‘:
For Samsung SCX-3200 the compatible driver is ‘Generic PCL 5e Printer‘, and click on ‘Add Printer‘:
There are several configurations, but for now just click in ‘Set Default Options‘:
Printer added!
In your Pi, open the text editor, and try to print something.
Installing SAMBA in Raspbian:
sudo apt-get install samba
sudo nano /etc/samba/samba.conf
Look for this configuration block. This will make all the CUPS printers available in the Windows network:
# CUPS printing.
[printers]
comment = All Printers
browseable = yes
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700
Make sure all the values are the same and the lines are not commented (remove anything from the beginning of the line).
Restart the Samba service:
sudo systemctl restart smbd
sudo systemctl status smbd
OR
sudo service smbd restart
sudo service smbd status
How to print from any other computers on the network?
- From another Linux Desktop
- The new network printer will be automatically detected and added, nothing has to be done, just print!
- From Windows
- Samba will allow the Pi to join the Windows network.
- Add the printer as using IPP (Internet Printing Protocol)
Adding printer using Samba in Windows 10:
Click ‘Start Menu‘ > ‘Settings‘ > ‘Devices‘ > ‘Printers & Scanners‘ > ‘Add Printer or Scanner‘.
Adding printer using IPP in Windows 10:
Click ‘Start Menu‘ > ‘Settings‘ > ‘Devices‘ > ‘Printers & Scanners‘ > ‘Add Printer or Scanner‘.
Click on ‘The printer that I want isn’t listed‘ > ‘Select a shared printer by name‘.
Type ‘http://192.168.2.40/printers/Samsung_SCX-3200_Series‘ where ‘192.168.2.40‘ must be replaced by the IP of your Pi and ‘Samsung_SCX-3200_Series‘ must be replaced by the name of your added printer:
In both cases, Samba or IPP it will require informing the Windows Driver of the printer.
How many printers can I share through the Pi?
You can connect several printers using USB hubs and all of them will be available at the same time, even multifunctional printers.
If my printer has a scanner, how can I scan?
The scanner will not be ‘shared’ over the network but it can be used through VNC and share the scanned documents on the network.
Enable VNC in the ‘Raspberry Pi Configuration‘:
Install the ‘Simple Scan‘:
sudo apt install simple-scan
Connect to your Pi via VNC:
Just click in ‘Scan‘ as many pages you want to add in the same PDF file, and then ‘Save‘ on a shared folder.
That simple!