How to set up a Raspberry Pi as a print server and print from Android devices using ANY network or USB printer – CUPS server

Can’t print from your Android phone on your home printer? This article is for you. Well, only if you are willing to use Raspberry Pi 🙂

The procedure below let me set up my old OKI C810DN (duplex and network) A3 colour laser printer to print from any Android device, which so far was impossible, as the OKI printed does not support printing from Android. I have already tried some magic apps promising me printing from Android devices – but no success. The procedure below will let you know to print from ANY network printer connected to your home network or you even will be able to print from a old USB only device, however it needs to be connected to the USB port in your Raspberry Pi device! Of course, to make it very clear, you will be able to use your non-network printer for printing also from Windows devices – see the last picture at the end of this article!

Anyway, the software which actually let me print from Android devices is called CUP.

The procedure:

On a Raspberry Pi (even Pi Zero) with properly working operating system do the following commands:

sudo apt update

sudo apt upgrade (or even better sudo apt full-upgrade)

sudo apt install cups

sudo usermod -a -G lpadmin pi

sudo cupsctl –remote-any

sudo apt-get install printer-driver-foo2zjs-common

sudo systemctl restart cups (or sudo service cups restart ???)

Installing samba is optional:

sudo apt install samba

sudo nano /etc/samba/smb.conf

Make sure that sections below in smb.conf are as shown below:

[printers]

comment = All Printers

browseable = no

path = /var/spool/samba

printable = yes

guest ok = yes

read only = yes

create mask = 0700

[print$]

comment = Printer Drivers

path = /var/lib/samba/printers

browseable = yes

read only = no

guest ok = no

save the file and exit

hostname -I

http://192.168.1.xxx:631 (in browser)

Now add your printer:

And now install the CUPS in your phone with Android:

Now you can easily print from any app on your Android phone using function share and then print:

In case of any problems – watch logs:

sudo tail -n 100 -f /var/log/cups/error_log

tail -f /var/log/syslog

And of course in case you use non-network printer – you will be able to print also from Microsoft Windows systems:

2 thoughts on “How to set up a Raspberry Pi as a print server and print from Android devices using ANY network or USB printer – CUPS server

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA
Change the CAPTCHA codeSpeak the CAPTCHA code
 

This site uses Akismet to reduce spam. Learn how your comment data is processed.