Canon CAPT

From ArchWiki
Revision as of 22:59, 5 September 2014 by Aerion (talk | contribs) (Aerion moved page Canon LBP2900 to Canon CAPT: The installation steps are not unique to the LBP2900 model but apply to all models supported by the CAPT driver.)
Jump to navigation Jump to search

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.