Code: Select all
# ln -s /usr/lib64/cups/backend/ccp /usr/libexec/cups/backend/ccp
# /etc/init.d/cupsd restart
# lpinfo -vCode: Select all
# ln -s /usr/lib64/cups/filter/pstocapt3 /usr/libexec/cups/filter/pstocapt3Code: Select all
# /usr/sbin/lpadmin -p test -m /usr/share/cups/model/CNCUPSLBPxxxxCAPTK.ppd -v ccp://localhost:59687 -ECode: Select all
# /usr/sbin/ccpdadmin -p test -o /dev/usb/lp1
CUPS_ConfigPath = /etc/cups/
LOG Path = None
UI Port = 59787
Entry Num : Spooler : Backend : FIFO path : Device Path : Status
----------------------------------------------------------------------------
[0] : test : ccp : //localhost:59687 : /dev/usb/lp1 : New!!Code: Select all
# /etc/init.d/ccpd start
# /etc/init.d/ccpd status
/usr/sbin/ccpd: PID1 PID2Code: Select all
# captstatusui -P testCode: Select all
# /usr/sbin/ccpdCode: Select all
# /usr/local/bin/captstatusui -P testCode: Select all
CONFIG_USB_MON:
│ │
│ If you select this option, a component which captures the USB traffic │
│ between peripheral-specific drivers and HC drivers will be built. │
│ For more information, see <file:Documentation/usb/usbmon.txt>. │
│ │
│ If unsure, say Y, if allowed, otherwise M. │
│ │
│ Symbol: USB_MON [=n] │
│ Type : tristate │
│ Prompt: USB Monitor │
│ Defined at drivers/usb/mon/Kconfig:5 │
│ Depends on: USB_SUPPORT [=y] && USB [=m] │
│ Location: │
│ -> Device Drivers │
│ -> USB support (USB_SUPPORT [=y])Code: Select all
CONFIG_USB_PRINTER=nCode: Select all
rine50 linux # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 004: ID 17ef:1005 Lenovo
Bus 001 Device 005: ID 04b8:0017 Seiko Epson Corp.
Bus 001 Device 006: ID 04a9:26f1 Canon, Inc.
Bus 001 Device 007: ID 0557:7000 ATEN International Co., Ltd Hub
Bus 001 Device 008: ID 04b3:3108 IBM Corp. 800dpi Optical Mouse w/ Scroll Point
Bus 001 Device 009: ID 04b3:3025 IBM Corp.
Code: Select all
rine50 linux # ls -la /dev/bus/usb/001/006
crw-rw-r-- 1 root lp 189, 5 2月 28 2012 /dev/bus/usb/001/006
Code: Select all
rine50 linux # ccpdadmin
Usage:
ccpdadmin [-p Printer-name -o Printer-dev-path]
ccpdadmin [-x Remove-Printer-name]
CUPS_ConfigPath = /etc/cups/
LOG Path = /var/log/CCPD/
UI Port = 59787
Entry Num : Spooler : Backend : FIFO path : Device Path : Status
----------------------------------------------------------------------------
[0] : test : ccp : //localhost:59687 : /dev/bus/usb/001/006 :
Code: Select all
<Printer test>
DevicePath /dev/usblp1
</Printer>
<Ports>
# Status monitoring socket port.
# Default 59787
UI_Port 59787
PDATA_Port 59687
</Ports>
Code: Select all
# strace -ff /usr/bin/ccpd
[ Process PID=5150 runs in 32 bit mode. ]
[pid 5150] time(NULL) = 1331181753
[pid 5150] time(NULL) = 1331181753
[pid 5150] time(NULL) = 1331181753
[pid 5150] select(13, [12], [], NULL, {1, 0} <unfinished ...>
[pid 5149] <... setuid resumed> ) = 0
[ Process PID=5149 runs in 64 bit mode. ]
Code: Select all
tcp 0 0 0.0.0.0:59687 0.0.0.0:* LISTEN 4458/ccpd
tcp 0 0 0.0.0.0:59787 0.0.0.0:* LISTEN 4458/ccpd Code: Select all
Entry Num : Spooler : Backend : FIFO path : Device Path : Status
----------------------------------------------------------------------------
[0] : canon : ccp : //localhost:59687 : net:10.254.128.78 : Code: Select all
...
D [15/May/2012:14:51:04 +0200] [Job 61] Wrote 1 pages...
D [15/May/2012:14:51:04 +0200] [Job 61] PID 4807 (pstops) exited with no errors.
D [15/May/2012:14:51:04 +0200] [Job 61] PID 4806 (pdftops) exited with no errors.
D [15/May/2012:14:51:04 +0200] [Job 61] opvpOpenPrinter(463)
D [15/May/2012:14:51:04 +0200] [Job 61] CStubOpenPrinter(397)
D [15/May/2012:14:51:04 +0200] [Job 61] opvpOpenPrinter(463)
D [15/May/2012:14:51:04 +0200] [Job 61] CStubOpenPrinter(397)
D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=2, SeqNo=3,opvpErrorNo=-2
D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=5, SeqNo=4,opvpErrorNo=-2
D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=7, SeqNo=153,opvpErrorNo=-2
D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=8, SeqNo=8006,opvpErrorNo=-2
D [15/May/2012:14:51:04 +0200] [Job 61] GPL Ghostscript 9.04: Unrecoverable error, exit code 1
D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=6, SeqNo=8007,opvpErrorNo=-2
D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=3, SeqNo=8008,opvpErrorNo=-2
D [15/May/2012:14:51:04 +0200] [Job 61] Set job-printer-state-message to "ccp send_data error, exit", current level=ERROR
D [15/May/2012:14:51:04 +0200] [Job 61] Backend returned status 1 (failed)
D [15/May/2012:14:51:04 +0200] [Job 61] Printer stopped due to backend errors; please consult the error_log file for details.
D [15/May/2012:14:51:04 +0200] [Job 61] End of messages
D [15/May/2012:14:51:04 +0200] [Job 61] printer-state=5(stopped)
D [15/May/2012:14:51:04 +0200] [Job 61] printer-state-message="ccp send_data error, exit"
D [15/May/2012:14:51:04 +0200] [Job 61] printer-state-reasons=paused
As indicated in the above message, have you checked the error_log of CUPS ( /var/log/cups/error_log )? From the very last message ( printer-state-reasons=paused ) it seems that the printer was "paused" when CUPS tried to send the data to the CCPD backend.quezak wrote:Code: Select all
... D [15/May/2012:14:51:04 +0200] [Job 61] Wrote 1 pages... D [15/May/2012:14:51:04 +0200] [Job 61] PID 4807 (pstops) exited with no errors. D [15/May/2012:14:51:04 +0200] [Job 61] PID 4806 (pdftops) exited with no errors. D [15/May/2012:14:51:04 +0200] [Job 61] opvpOpenPrinter(463) D [15/May/2012:14:51:04 +0200] [Job 61] CStubOpenPrinter(397) D [15/May/2012:14:51:04 +0200] [Job 61] opvpOpenPrinter(463) D [15/May/2012:14:51:04 +0200] [Job 61] CStubOpenPrinter(397) D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=2, SeqNo=3,opvpErrorNo=-2 D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=5, SeqNo=4,opvpErrorNo=-2 D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=7, SeqNo=153,opvpErrorNo=-2 D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=8, SeqNo=8006,opvpErrorNo=-2 D [15/May/2012:14:51:04 +0200] [Job 61] GPL Ghostscript 9.04: Unrecoverable error, exit code 1 D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=6, SeqNo=8007,opvpErrorNo=-2 D [15/May/2012:14:51:04 +0200] [Job 61] Error Response:ReqNo=3, SeqNo=8008,opvpErrorNo=-2 D [15/May/2012:14:51:04 +0200] [Job 61] Set job-printer-state-message to "ccp send_data error, exit", current level=ERROR D [15/May/2012:14:51:04 +0200] [Job 61] Backend returned status 1 (failed) D [15/May/2012:14:51:04 +0200] [Job 61] Printer stopped due to backend errors; please consult the error_log file for details. D [15/May/2012:14:51:04 +0200] [Job 61] End of messages D [15/May/2012:14:51:04 +0200] [Job 61] printer-state=5(stopped) D [15/May/2012:14:51:04 +0200] [Job 61] printer-state-message="ccp send_data error, exit" D [15/May/2012:14:51:04 +0200] [Job 61] printer-state-reasons=paused
I had to install something called the gs-esp transitional package:erik@workstationubuntu:~$ cat /var/log/cups/error_log | grep "21170"
I [26/May/2012:00:02:13 +0200] [Job 59] Started filter /usr/lib/cups/filter/pstocapt3 (PID 21170)
D [26/May/2012:00:02:14 +0200] PID 21170 (/usr/lib/cups/filter/pstocapt3) did not catch or ignore signal 13.
the code I pasted IS a part of /var/log/cups/error_logWvR wrote:As indicated in the above message, have you checked the error_log of CUPS ( /var/log/cups/error_log )?
The package "gs-esp" contains only some changelogs and a preinst script, which does only this:thecopy wrote:edit: Note that I'm not using Gentoo but Ubuntu, but the process should be the same i guess -- it was a long time since i last tried out Gentoo
Code: Select all
# Do away with update-alternative for /usr/bin/gs, we have one
# grand unified Ghostscript now!
if dpkg --compare-versions "$2" lt-nl "8.63.dfsg.1-1"; then
update-alternatives --remove-all gs || true
update-alternatives --remove-all gs.1 || true
fi
Code: Select all
=net-print/cndrvcups-capt-2.00-r2
=net-print/cndrvcups-common-2.00-r2Code: Select all
* To get your printer working you need to restart cupsd
*
* /etc/init.d/cupsd restart
*
* Now you can add your printer with either the webinterface or lpadmin
*
* /usr/sbin/lpadmin -p LBP3010 -m CNCUPSLBP3050CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E
*
* Replace 3050 with either on of the following printers:
* 1120 1210 2900 3000 3050 3200 3210 3300 5000
*
* Now you must register the printer in ccpd, if connected with usb
*
* /usr/sbin/ccpdadmin -p LBP3010 -o /dev/usb/lp0
*
* Notice that you can't use LPT port with this driver.
* If you have a network connection to your printer use -o net:<IP OF PRINTER>
* instead of -o /dev/usb/lp0
* See manual for more information, guide-capt-1.3xE.tar.gz at
* http://software.canon-europe.com/software/0023675.asp
*
* Now you can go ahead and start the ccpd daemon
*
* /etc/init.d/ccpd start
*
* If you have more then one printer just create more fifos in
* /var/ccpd/ , increase the fifo number for more printers
*
* mkfifo -m 600 /var/ccpd/fifo1; chown lp:lp /var/ccpd/fifo1
*
* If you reinstall make sure the fifo is created in /var/ccpd, if not
* just reinstall again. This is due to bug #136199Code: Select all
KERNEL=="lp*", SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="04a9", RUN+="/bin/bash /etc/init.d/ccpd start"
KERNEL=="lp*", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/bin/bash /etc/init.d/ccpd stop"