2

I am trying to configure my Raspberry Pi to connect to my printer and allow me to print wirelessly using the cups webserver. My Raspberry Pi 3b+ is running headless ubuntu:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

I have connected my Raspberry Pi to the router via an ethernet cable and have connected the printer via. the usb port to the Raspberry Pi.

I have installed ssh on the Raspberry Pi and I am accessing the Raspberry Pi via. a laptop connected on the same network using Wi-Fi for configuring cups.

I used these two references to try and setup cups on raspberry pi:

  1. https://www.tomshardware.com/how-to/raspberry-pi-print-server

  2. https://medium.com/swlh/setup-a-print-server-using-raspberry-pi-cups-part-1-c8f3d48af047 -> https://medium.com/@anirudhgupta281998/setup-a-print-server-using-raspberry-pi-cups-part-2-2d6d48ccdc32

After following this step by step and making sure that the service was up and running on systemctl and also ensuring that the ssh was enabled and webserver option was set to yes in the cups config. I am unable to access the cups webpage when I am accessing it via the edge browser.In this case the local ip address of the raspberry pi device is 192.168.1.15 so trying to access webpage http://192.168.1.15:631 (It shows took too long to respond on browser).

I am using a Canon G2010 series, I have not yet reached the step for installing the drivers.

The output for sudo netstat -pan| grep cupsd: output

5
  • Have you confirmed that CUPS is listening on that port on all interfaces i.e. what does sudo netstat -pan | grep cupsd show Commented Apr 26, 2023 at 4:10
  • 1
    out of the box, cupsd only listens on localhost, so is not accessible outside the pi itself Commented Apr 26, 2023 at 4:15
  • sudo netstat -pan | grep cupsd tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 1520/cupsd tcp6 0 0 :::631 :::* LISTEN 1520/cupsd unix 3 [ ] STREAM CONNECTED 24522 1520/cupsd unix 3 [ ] STREAM CONNECTED 24512 1520/cupsd
    – Seb
    Commented Apr 26, 2023 at 6:55
  • and you get a timeout, rather than anything at all? Is there a firewall on the pi? I've never used Ubuntu on a pi, so not aware of any default firewall (raspberry pi OS has no firewall in place by default) Commented Apr 26, 2023 at 7:12
  • I used the sudo ufw status to check status of firewall, firewall is inactive.
    – Seb
    Commented Apr 26, 2023 at 11:44

1 Answer 1

2

To anyone following, after fiddling with this for quite some time, I was eventually able to run the print server using raspberry-pi and my Canon Pixma G2012 printer.

First things first I ended up reinstalling the os on my raspberry pi from the headless ubuntu to headlesss raspi os(follow same steps for installing cups).This finally let me access the cups server but now there were almost no drivers available from the manufacturer. However, there was a third-party drivers available called Gutenprint, which supports a wide range of printers including Canon Pixma G2012.

You can install it on your Raspberry Pi by running the following command in the terminal:

sudo apt-get install printer-driver-gutenprint

Once you have installed the driver, you should be able to select your printer when adding it in CUPS and use as a network printer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .