Difference between revisions of "Canon CAPT"

From ArchWiki
Jump to navigation Jump to search
m (→‎Installation: made the url unclickable)
(Revised the page to include systemd instructions, simplified installation via an AUR package and corrected configuration.)
Line 1: Line 1:
 
[[Category:Printers]]
 
[[Category:Printers]]
{{out of date}}
+
== Introduction ==
=Introduction=
+
The '''Canon i-Sensys''' series of laser printers are supported under CUPS by Canon's proprietary Canon Advanced Printing Technology (CAPT) backend.
This is a brief manual about how to make '''Canon i-sensys LBP2900''' (LBP2900) to work with arch. This manual can be also applied on folowing printer models:
 
LBP3010/LBP3018/LBP3050, LBP3100/LBP3108/LBP3150, LBP3250, LBP3310, LBP5100, LBP5300, LBP3500, LBP3300, LBP5000, LBP3210, LBP3000, LBP2900, LBP3200, LBP-1120, LBP-1210
 
  
'''Note: if you can find your printer model on the list use this manual, and switch [printer model] with your printer model'''
+
Supported models are: LBP9100C, LBP7210Cdn, LBP7200C series, LBP7200Cdn (network mode), LBP7018C, LBP7010C, LBP6310dn, LBP6300, LBP6300n, LBP6200, LBP6020, LBP6018, LBP6000, LBP5300, LBP5100, LBP5050 series, LBP5000, LBP3500, LBP3310, LBP3300, LBP3250, LBP3210, LBP3200, LBP3150, LBP3108, LBP3100, LBP3050, LBP3018, LBP3010, LBP3000, LBP2900, LBP-1210, LBP-1120, LBP-810
=Requirements=
 
*cups
 
*ghostscript
 
*gsfonts
 
*rpmextract.sh
 
*system-config-printer (system-config-printer-gnome/kdeadmin-system-config-printer-kde)
 
Install with:
 
# pacman -S cups ghostscript gsfonts rpmextract system-config-printer
 
  
== Additional requirements on Arch64 ==
+
Please note that I have only been able to test this driver with the LBP6310dn, which works perfectly. I have also attempted to use it with the LBP2900 (via SSH on a laptop based in a foreign country) but was unable to get a printout after an otherwise successful installation. Your mileage may vary with the other models.
  
*lib32-libcups
+
I will use the LBP6310dn as the example for the commands throughout this article.
*(old packages: lib32-cups)
 
*lib32-heimdal
 
*lib32-libxml2
 
*lib32-popt [https://aur.archlinux.org/packages.php?ID=19535 from aur version 1.16-5]
 
  
Install with:
+
== Requirements ==
# pacman -S lib32-libcups lib32-heimdal lib32-libxml2
 
  
And build the aur package using [[ABS]].
+
Ensure you have installed the following packages from the [[official repositories]]:
  
=Driver=
+
*{{Pkg|cups}}
*http://gdlp01.c-wss.com/gds/4/0900007724/11/Linux_CAPT_PrinterDriver_V230_uk_EN.tar.gz
+
*{{Pkg|ghostscript}}
Also you can search in http://software.canon-europe.com/ for your printer driver, newest version is v260 at least for the lbp-3200 (november 2013).
+
*{{Pkg|gsfonts}}
  
For information about setting up cups, refer to [[CUPS]].
+
Optionally you may wish to install {{Pkg|system-config-printer}}
  
=Installation=
+
For information about installing and configuring CUPS, please refer to [[CUPS]].
 +
 
 +
 
 +
Please note that Arch 64 has the following additional requirements:
 +
 
 +
[[Official repositories#multilib|multilib]] packages
 +
 
 +
*{{Pkg|lib32-libcups}}
 +
*{{Pkg|lib32-libxml2}}
 +
 
 +
 
 +
[[AUR]] package
 +
*{{AUR|lib32-popt}}
 +
 
 +
== Installation ==
 +
Install {{AUR|capt-src}} from the [[AUR]] and restart CUPS
 +
 
 +
  # systemctl restart cups.service
 +
 
 +
== Configuration ==
 +
=== CUPS ===
 +
First the printer needs to be registered with CUPS using lpadmin:
 +
 
 +
# lpadmin -p ''printer_model'' -m ''printer_driver_file'' -v ccp://localhost:59787 -E
 +
 
 +
The printer driver file can be found in /usr/share/cups/model. For the printer model, use the ''ShortNickName'' found inside the PPD, or take it directly from the file name, for example CNCUPS'''LBP6310'''CAPTK.ppd
 +
 
 +
Alternatively you could check the table provided on the [https://help.ubuntu.com/community/CanonCaptDrv190 Ubuntu help page], which matches each supported printer with its corresponding PPD.
 +
 
 +
{{Note|<nowiki>Some models have multiple PPDs, where the last letter indicates the regional model (J = Japan, K = United Kingdom, S = United States)</nowiki>}}
 +
 
 +
For example, for the Canon LBP6310dn (UK model) you would enter
 +
 
 +
# lpadmin -p LBP6310 -m CNCUPSLBP6310CAPTK.ppd -v ccp://localhost:59787 -E
 +
 
 +
=== CAPT ===
 +
Next you'll need to register the printer with the CAPT driver itself via ccpdadmin:
 +
 
 +
==== USB printers ====
 +
 
 +
# ccpdadmin -p ''printer_model'' -o ''usb_port''
 +
 
 +
e.g.
 +
 
 +
# ccpdadmin -p LBP6310 -o /dev/usb/lp0
 +
 
 +
==== network printers ====
 +
 
 +
# ccpdadmin -p ''printer_model'' -o net:''ip_address''
 +
 
 +
e.g.
 +
 
 +
# ccpdadmin -p LBP6310 -o net:192.168.1.100
 +
 
 +
== systemd ==
 +
Enable and start the CAPT daemon
 +
 
 +
# systemctl enable ccpd.service
 +
# systemctl start ccpd.service
 +
 
 +
Verify the status, you should see two instances of the daemon
 +
 
 +
# systemctl status ccpd.service
 +
 
 +
  ccpd.service - Canon CAPT daemon
 +
  Loaded: loaded (/usr/lib/systemd/system/ccpd.service; enabled)
 +
  Active: active (running) since Thu 2014-09-04 18:15:19 BST; 1 day 4h ago
 +
  Process: 15506 ExecStart=/usr/bin/ccpd (code=exited, status=0/SUCCESS)
 +
Main PID: 15507 (ccpd)
 +
  CGroup: /system.slice/ccpd.service
 +
          ├─15507 /usr/bin/ccpd
 +
          ├─15508 /usr/bin/ccpd
 +
          └─15509 captmoncnabg --data-write-fd=3 --data-read-fd=10 --cmd-write-fd=11 --cmd-read-fd=14 --output-fd=-1 --input-fd=-1 --printer-uri=net:192.168.1.100
 +
 
 +
== Status Monitor ==
 +
The driver includes a status monitor which can be launched with
 +
 
 +
$ captstatusui -P ''printer_model''
 +
 
 +
e.g.
 +
 
 +
$ captstatusui -P LBP6310
 +
 
 +
If you only want the status monitor to pop up when a problem occurs, simply append the -e switch:
 +
 
 +
$ captstatusui -P LBP6310 -e
 +
 
 +
You may want to add this to your startup folder/script
 +
 
 +
{{Tip|If you are connecting your printer to a central CUPS print server, you may want to run the status monitor remotely using [[SSH#X11 forwarding|X11 forwarding]] and an [[SSH Keys#Choosing the key location and passphrase|SSH key without passprase]], [[Secure Shell#Restrict|restricted to running only this command]]}}
 +
 
 +
== Troubleshooting ==
 +
Some people have reported issues on 64 bit systems due to hard coded paths, however I have been unable to test this due to the fact that I have no way of testing this driver on a 64 bit system. See the discussion on the [https://aur.archlinux.org/packages/capt-src capt-src AUR page].
 +
 
 +
== Related Links/Additional Information ==
 +
[https://help.ubuntu.com/community/CanonCaptDrv190 Setting up CAPT printers on Ubuntu]
 +
 
 +
 
 +
{{Out of date|Since CAPT v2.6 the fifo0 method is obsolete and does not work. Also, the instructions are still based on the obsolete SysVinit. I'm leaving the information here for reference purposes as several other help pages on the internet still reference the fifo0 method; this will help avoid confusion over which method to follow.}}
 +
== Deprecated older wiki content ==
 +
=== Installation ===
 
Download the driver and extract it:
 
Download the driver and extract it:
 
  <nowiki># wget http://gdlp01.c-wss.com/gds/4/0900007724/11/Linux_CAPT_PrinterDriver_V230_uk_EN.tar.gz</nowiki>
 
  <nowiki># wget http://gdlp01.c-wss.com/gds/4/0900007724/11/Linux_CAPT_PrinterDriver_V230_uk_EN.tar.gz</nowiki>
Line 48: Line 133:
 
  # cp -var * /
 
  # cp -var * /
  
=Restart cups=
+
=== Restart cups ===
 
  # /etc/rc.d/cupsd restart
 
  # /etc/rc.d/cupsd restart
=Add cups daemon in '''/etc/rc.conf'''=
+
==== Add cups daemon in '''/etc/rc.conf''' ====
 
Open /etc/rc.conf with a text editor of your choice (e.g. nano), and put cups in the list of daemons:
 
Open /etc/rc.conf with a text editor of your choice (e.g. nano), and put cups in the list of daemons:
 
  DAEMONS=(... @bluetooth cupsd gdm)
 
  DAEMONS=(... @bluetooth cupsd gdm)
  
=Make folowing directories and fifo0=
+
=== Make following directories and fifo0 ===
 
  # mkdir /var/ccpd /var/captmon
 
  # mkdir /var/ccpd /var/captmon
 
  # mkfifo /var/ccpd/fifo0
 
  # mkfifo /var/ccpd/fifo0
Line 61: Line 146:
 
Change the owner of fifo0 into root:
 
Change the owner of fifo0 into root:
 
  # chown root /var/ccpd/fifo0
 
  # chown root /var/ccpd/fifo0
=Register printer=
+
 
 +
=== Register printer ===
 
Register the printer driver with the print spooler with the following command, replacing [printer model] with your printer model and [printer driver file] with your driver file:
 
Register the printer driver with the print spooler with the following command, replacing [printer model] with your printer model and [printer driver file] with your driver file:
 
  # /usr/sbin/lpadmin -p [printer model] -m [printer driver file] -v ccp://localhost:59787 -E
 
  # /usr/sbin/lpadmin -p [printer model] -m [printer driver file] -v ccp://localhost:59787 -E
Line 75: Line 161:
 
  # /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp0
 
  # /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp0
  
=Make udev rule for your printer=
+
=== Make udev rule for your printer ===
 
Create an udev rule so when you turn the printer on, printer daemon (ccpd) will start:
 
Create an udev rule so when you turn the printer on, printer daemon (ccpd) will start:
 
  # echo -e '#Own udev rule for Canon-CAPT\nSUBSYSTEM=="usb", KERNEL=="lp*", RUN+="/etc/rc.d/ccpd restart"' <no line break>
 
  # echo -e '#Own udev rule for Canon-CAPT\nSUBSYSTEM=="usb", KERNEL=="lp*", RUN+="/etc/rc.d/ccpd restart"' <no line break>
Line 83: Line 169:
 
More about udev rules you can see here: http://reactivated.net/writing_udev_rules.html
 
More about udev rules you can see here: http://reactivated.net/writing_udev_rules.html
  
=Start printer daemon and print=
+
=== Start printer daemon and print ===
 
  # /etc/rc.d/ccpd start
 
  # /etc/rc.d/ccpd start
The printer should now be installed. You could test it by pressing the Print Test Page button.  
+
The printer should now be installed. You could test it by pressing the Print Test Page button.
=Turboprint=
 
{{stub}}
 
=Related Links/Additional Information=
 
https://help.ubuntu.com/community/HardwareSupportComponentsPrinters/CanonPrinters/Canon_LBP_2900 - A guide for setting up the printer on ubuntu
 

Revision as of 22:56, 5 September 2014

Introduction

The Canon i-Sensys series of laser printers are supported under CUPS by Canon's proprietary Canon Advanced Printing Technology (CAPT) backend.

Supported models are: LBP9100C, LBP7210Cdn, LBP7200C series, LBP7200Cdn (network mode), LBP7018C, LBP7010C, LBP6310dn, LBP6300, LBP6300n, LBP6200, LBP6020, LBP6018, LBP6000, LBP5300, LBP5100, LBP5050 series, LBP5000, LBP3500, LBP3310, LBP3300, LBP3250, LBP3210, LBP3200, LBP3150, LBP3108, LBP3100, LBP3050, LBP3018, LBP3010, LBP3000, LBP2900, LBP-1210, LBP-1120, LBP-810

Please note that I have only been able to test this driver with the LBP6310dn, which works perfectly. I have also attempted to use it with the LBP2900 (via SSH on a laptop based in a foreign country) but was unable to get a printout after an otherwise successful installation. Your mileage may vary with the other models.

I will use the LBP6310dn as the example for the commands throughout this article.

Requirements

Ensure you have installed the following packages from the official repositories:

Optionally you may wish to install system-config-printer

For information about installing and configuring CUPS, please refer to CUPS.


Please note that Arch 64 has the following additional requirements:

multilib packages


AUR package

Installation

Install capt-srcAUR from the AUR and restart CUPS

 # systemctl restart cups.service

Configuration

CUPS

First the printer needs to be registered with CUPS using lpadmin:

# lpadmin -p printer_model -m printer_driver_file -v ccp://localhost:59787 -E

The printer driver file can be found in /usr/share/cups/model. For the printer model, use the ShortNickName found inside the PPD, or take it directly from the file name, for example CNCUPSLBP6310CAPTK.ppd

Alternatively you could check the table provided on the Ubuntu help page, which matches each supported printer with its corresponding PPD.

Note: Some models have multiple PPDs, where the last letter indicates the regional model (J = Japan, K = United Kingdom, S = United States)

For example, for the Canon LBP6310dn (UK model) you would enter

# lpadmin -p LBP6310 -m CNCUPSLBP6310CAPTK.ppd -v ccp://localhost:59787 -E

CAPT

Next you'll need to register the printer with the CAPT driver itself via ccpdadmin:

USB printers

# ccpdadmin -p printer_model -o usb_port

e.g.

# ccpdadmin -p LBP6310 -o /dev/usb/lp0

network printers

# ccpdadmin -p printer_model -o net:ip_address

e.g.

# ccpdadmin -p LBP6310 -o net:192.168.1.100

systemd

Enable and start the CAPT daemon

# systemctl enable ccpd.service
# systemctl start ccpd.service

Verify the status, you should see two instances of the daemon

# systemctl status ccpd.service
 ccpd.service - Canon CAPT daemon
  Loaded: loaded (/usr/lib/systemd/system/ccpd.service; enabled)
  Active: active (running) since Thu 2014-09-04 18:15:19 BST; 1 day 4h ago
 Process: 15506 ExecStart=/usr/bin/ccpd (code=exited, status=0/SUCCESS)
Main PID: 15507 (ccpd)
  CGroup: /system.slice/ccpd.service
          ├─15507 /usr/bin/ccpd
          ├─15508 /usr/bin/ccpd
          └─15509 captmoncnabg --data-write-fd=3 --data-read-fd=10 --cmd-write-fd=11 --cmd-read-fd=14 --output-fd=-1 --input-fd=-1 --printer-uri=net:192.168.1.100

Status Monitor

The driver includes a status monitor which can be launched with

$ captstatusui -P printer_model

e.g.

$ captstatusui -P LBP6310

If you only want the status monitor to pop up when a problem occurs, simply append the -e switch:

$ captstatusui -P LBP6310 -e

You may want to add this to your startup folder/script

Tip: If you are connecting your printer to a central CUPS print server, you may want to run the status monitor remotely using X11 forwarding and an SSH key without passprase, restricted to running only this command

Troubleshooting

Some people have reported issues on 64 bit systems due to hard coded paths, however I have been unable to test this due to the fact that I have no way of testing this driver on a 64 bit system. See the discussion on the capt-src AUR page.

Related Links/Additional Information

Setting up CAPT printers on Ubuntu


Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: Since CAPT v2.6 the fifo0 method is obsolete and does not work. Also, the instructions are still based on the obsolete SysVinit. I'm leaving the information here for reference purposes as several other help pages on the internet still reference the fifo0 method; this will help avoid confusion over which method to follow. (Discuss in Talk:Canon CAPT#)

Deprecated older wiki content

Installation

Download the driver and extract it:

# wget http://gdlp01.c-wss.com/gds/4/0900007724/11/Linux_CAPT_PrinterDriver_V230_uk_EN.tar.gz
# tar -xvf Linux_CAPT_PrinterDriver_V230_uk_EN.tar.gz
# cd Linux_CAPT_PrinterDriver_V230_uk_EN/32-bit_Driver/RPM
or: # cd Linux_CAPT_PrinterDriver_V230_uk_EN/64-bit_Driver/RPM (on Arch 64-bit)
# rpmextract.sh *

The last command above will extract all rpm-s and merge all directories that were stored in them. So basically you'll get two directories: etc and usr. Next thing you need to do is to open etc directory and change init.d to rc.d. You can also do it by command:

# mv etc/init.d etc/rc.d

Now you can remove rpm-s:

# rm *.rpm

and execute the next command which will merge etc and usr directories with appropriate ones in / directory:

# cp -var * /

Restart cups

# /etc/rc.d/cupsd restart

Add cups daemon in /etc/rc.conf

Open /etc/rc.conf with a text editor of your choice (e.g. nano), and put cups in the list of daemons:

DAEMONS=(... @bluetooth cupsd gdm)

Make following directories and fifo0

# mkdir /var/ccpd /var/captmon
# mkfifo /var/ccpd/fifo0

Make fifo0 accessable to everyone:

# chmod 777 /var/ccpd/fifo0

Change the owner of fifo0 into root:

# chown root /var/ccpd/fifo0

Register printer

Register the printer driver with the print spooler with the following command, replacing [printer model] with your printer model and [printer driver file] with your driver file:

# /usr/sbin/lpadmin -p [printer model] -m [printer driver file] -v ccp://localhost:59787 -E

(old method - now wrong: # /usr/sbin/lpadmin -p [printer model] -m [printer driver file] -v ccp:/var/ccpd/fifo0 -E)

for this manual it would be

# /usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp://localhost:59787 -E

(old method - now wrong: # /usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E)

Register the printer with ccpd daemon, once again replace [printer model] with your printer model:

# /usr/sbin/ccpdadmin -p [printer model] -o /dev/usb/lp0

in this case it is:

# /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp0

Make udev rule for your printer

Create an udev rule so when you turn the printer on, printer daemon (ccpd) will start:

# echo -e '#Own udev rule for Canon-CAPT\nSUBSYSTEM=="usb", KERNEL=="lp*", RUN+="/etc/rc.d/ccpd restart"' <no line break>
> /etc/udev/rules.d/85-canon-capt.rules

Reload Rules:

# udevadm control --reload-rules

More about udev rules you can see here: http://reactivated.net/writing_udev_rules.html

Start printer daemon and print

# /etc/rc.d/ccpd start

The printer should now be installed. You could test it by pressing the Print Test Page button.