7

I'm trying to use my Raspberry Pi as an Air Print gateway to my Canon MX860 printer (I only care about printing functions, even though it's an all-in-one printer, it doesn't matter to me to get scanning and faxing working)

So, I have CUPs installed, and it appears to be working, but Canon drivers are going to be a problem.

I found the debian project cups-backend-bjnp that appears to be a community contribution to support Canon -- it is in test right now. http://packages.debian.org/sid/cups-backend-bjnp

However, I can't seem to get my Raspberry Pi to recognize the printer.

I installed the ARMHF version of the package with the debian package installer. I'm not sure what to do about the dependencies that are listed on the page.

However, when I go to the Cups web config page, my Canon printer simply is not listed on the page. (I am trying to connect with it via the ethernet connection, not USB)

Has anyone done this successfully? Any ideas of what I should do.

Tech Level:

I am a very senior Windows developer, but the Raspberry Pi is my Linux learning project. I'm good with writing code, and working at the command line (in Windows cmd or powershell), but the Linux shell is totally new to me, so I might need a little extra explanation in areas that concern Linux standards or conventions, or common tasks like package installation.

2
  • Printers were always a problem on Linux/ BSD/ Unix. I tried the same with an ancient HP laserjet, after donkeys hours messing around and compiling this and that... I just used the PC with Windows instead of Linux. Much easier to install and much easier for everybody at home to use with print sharing. I know that does not help solve the problem - But it might help save you pulling hair for hours...
    – Piotr Kula
    Commented Sep 23, 2013 at 14:37
  • try ARCH linux !! they have the last CUPS software, and explain in detail how to configure the printer and share it with windows : wiki.archlinux.org/index.php/CUPS. i known ARCH is a little bit different than debian but you are new so why not :) (ps: this solve my problem of brother printer on cups) Commented Sep 23, 2013 at 15:25

2 Answers 2

8

I too have a Canon MX860 that I was trying to set up with CUPS. As of September 2019 the bjnp files failed to compile because I was missing the package 'cups-devel' which is no longer available.

As you stated above, which was 5 years prior to the time of writing this, the cups-backend-bjnp exists and today it is in the repository:

sudo apt-get install cups-backend-bjnp

I installed it then restarted cups:

sudo service cups restart

Opening cups and navigating to add printer showed my MX860.

Cheers Evan

2
  • 1
    WOW Thanks! It worked for my Raspberry Pi 3B Raspbian Stretch. $ sudo apt-get install cups $ sudo usermod -a -G lpadmin pi $ sudo apt-get install cups-backend-bjnp $ sudo service cups restart browse to localhost:631 Advanced->Proceed (Bookmark) Administration->Add Printer sign in pi:xxxxx (pi password for the machine) Click on Discovered Network Printers: Canon_MX860 Continue Continue Model: Canon MX860 series - CUPS+Gutenprint v5.2.11 (en) Change Default Options: Duplex Print-LongEdge Click Set Default Options Printers->Print Test Page !!! ``` Commented May 17, 2020 at 13:28
  • Working perfectly with RPi4 and Canon MX470 Commented May 20, 2023 at 21:04
3

So I actually managed to get this working. The instructions here helped a bunch: http://redwallaus.com/2013/04/04/airprint-with-raspberry-pi/

Printing is very slow, but it works without a hitch!

EDIT

Per piers7's comments, I have pasted the content of the article into this post.

Prerequisites

For this guide I will assume that you have already setup your Pi with Raspbian.

  • Putty
  • Filezilla
  • MP620 Canon Printer (Thats what I'm using)

Download

  • download bjnp files

Install

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install avahi-daemon avahi-discover libnss-mdns cups cups-pdf gutenprint pycups avahi python2
sudo apt-get install cups
sudo apt-get install python-cups
sudo apt-get install avahi-daemon
sudo usermod -aG lpadmin pi
sudo /etc/init.d/cups start
sudo /etc/init.d/avahi-daemon start
sudo nano /etc/cups/cupsd.conf

Now edit the config file by commenting out the below line with a # and add Port 631 to the line below

#Listen localhost:631
Port 631

Under # Restrict access.. add Allow @Local as below

# Restrict access to the server...
Order allow,deny
Allow @Local

And add Allow @Local again under the following headings

# Restrict access to the server...
# Restrict access to the admin pages... 
# Restrict access to configuration files...

Restart cups: sudo /etc/init.d/cups restart

Copy the downloaded bjnp files to the Pi using filezilla

sudo apt-get install libcups2 libcups2-dev
tar zxf cups-bjnp-1.2.1.tar.gz
cd cups-bjnp-1.2.1/
./configure –prefix=/usr
make
sudo make install
sudo mkdir /opt/airprint
cd /opt/airprint
sudo wget -O airprint-generate.py –no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py
sudo chmod 755 airprint-generate.py
sudo ./airprint-generate.py -d /etc/avahi/services
sudo reboot

Type https://XXX.XXX.X.X:631/admin into your browser and enter.

Select add printer

Follow the prompts to add your printer for example a mp620’s ip might be bjnp://XXX.XXX.X.XX:8611

4
  • The link in the answer is dead.
    – Krishna
    Commented Mar 3, 2016 at 5:17
  • argh -- it looks like the whole site is gone. Unfortunately, I don't have any backup option or alternate location for them.
    – JMarsch
    Commented Mar 3, 2016 at 20:19
  • 2
    Content still available here: web.archive.org/web/20150904045817/http://redwallaus.com/2013/…
    – nwaltham
    Commented Mar 17, 2016 at 20:00
  • 1
    Answers in Stack Exchange should be complete on their own - for precisely this reason (ie linkrot). You should really copy the relevant bit of that article into your answer (you still link for attribution etc...)
    – piers7
    Commented Nov 21, 2016 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.