RPI: Make a Printer Wireless
Im a diy’er with my hand on the RPI.just tried to do something useful with it apart from using it a well connected media box .
You can search web for the multiple sites that does the same thing..This post also documents the issues I faced after installation ..
The first thing in every RPI tutorial is update just to avoide any conflict
sudo apt-get update
Along with this couple of other packages are needed like
sudo apt-get install avahi-daemon sudo apt-get install avahi-discover sudo apt-get install libnss-mdns sudo apt-get install cups sudo apt-get install cups-pdf sudo apt-get install python-cups
Adding the username to CUPS
sudo usermod -aG lpadmin pi
Validate the installation by starting the CUPS and AVAHI services
sudo /etc/init.d/cups startsudo /etc/init.d/avahi-daemon start
Edits in CUPS Config
Open the config file using
sudo nano /etc/cups/cupsd.conf
And comment out line “Listen localhost:631”. Add “Port 631”. It should look like
#Listen localhost:631 Port 631
The config file will also need to be edited to control access to the server by adding “Allow @Local” in several places e.g.:
# Restrict access to the server... Order allow,deny Allow @Local
You need to include it in these areas of the config file:
# Restrict access to the server... # Restrict access to the admin pages... # Restrict access to configuration files...
Save the config file and restart the CUPS service:
sudo /etc/init.d/cups restart
Navigate to the CUPS configuration page by typing the IP address you just retrieved and the port number CUPS uses (so it’ll be an address like <RPI IP Addr>:631). A security exception message may pop up but that’s ok. Continue onwards!
Install Samba on the Raspberry Pi which allows cross-platform file/printer sharing (basically allows Linux and Windows file systems to connect to each other)
sudo apt-get install samba
Navigate to the samba config file which can be found at- /etc/samba/smb.conf. Ensure it contains the following data:
# 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
Addons for Specific Printers
I have tried this for Epson and HP printers though this settles the basic installation to get the printing done there are more steps to be added like installing the specific drivers
For Epson
For Epson to run with CUPS you need to install Gutenprint drivers using
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install printer-driver-gutenprint
For HP
You can follow the Driver Installation page for the latest drivers and instructions.
Issues Faced
I have faced the issue of Error messages during boot after CUPS installation.
the cups-filters.conf
file contained the references to the modules that were throwing errors:
# Parallel printer driver modules loading for cups
# LOAD_LP_MODULE was 'yes' in /etc/default/cups
lp
ppdev
parport_pc
Making the message disappear
Since RPI doesn’t come with parallel ports, I don’t need those modules. In any case, they couldn’t be loaded as they were not in /lib/modules/$(uname -r)
I commented out those three lines (putting #
at the start of the line in front of the module name for each one) and the error message disappeared.
- Parallel printer driver modules loading for cups
- LOAD_LP_MODULE was ‘yes’ in /etc/default/cups
#lp
#ppdev
#parport_pc
Reply