Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Canon CAPT printer driver installation by scratch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
niranjana_km
n00b
n00b


Joined: 15 Mar 2014
Posts: 14

PostPosted: Tue May 26, 2015 7:37 am    Post subject: Canon CAPT printer driver installation by scratch Reply with quote

After Gentoo's right decision (Gentoo News: 2015-03-28-true-multilib) to mask and remove all emul-linux-x86 packages and introducing a new use flag (abi_x86_32) for packages to let users to choose and build 32-bit libraries from source on multilib amd64 platforms, they removed cndrvcups-capt-2.00-r2 and cndrvcups-common-2.00-r2 packages from `calculate` overlay which we were all using. Now what next to install Canon CAPT printer driver and use the printer? Those who already installed the drivers can retain it, but each time portage warns about the masked emul-linux-x86-baselibs-20140508-r12 and emul-linux-x86-bjdeps-0.1-r3 packages which are dependencies of cndrvcups package on multilib amd64. Somebody has to create an ebuild for it. But I don't know how and as well don't have time now to learn it. The following is my successful attempt to install and use Canon LBP2900 printer on multilib amd64 Gentoo by scratch. This driver supports Canon LBP9100Cdn, LBP7210Cdn, LBP7200C series, LBP7018C/LBP7010C, LBP6310dn, LBP6300dn, 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 printers.

My gratitudes to all people of free software community who studied how these drivers work and got a way to handle them. You can see the following as summary of their efforts from nearly last 10 years. This driver was a daunting thing for me.

Before going further let me share one line from my experience, "Do not buy any printers without checking whether it is supported by either Foomatic or Gutenprint".

Installing Canon CAPT printer driver for LBP2900 by scratch:

Download Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz distributed by Canon Inc.
Unpack it to get RMP packages for 64-bit. In it they are located at Linux_CAPT_PrinterDriver_V260_uk_EN/64-bit_Driver/RPM/.
cd into the directory where the 64-bit RPMs are.

Install the CAPT printer driver module:
Code:
# rpm -ivh --nodeps cndrvcups-common-2.60-1.x86_64.rpm
# rpm -ivh --nodeps cndrvcups-capt-2.60-1.x86_64.rpm


In recent CUPS versions `backends` must be installed to /usr/libexec/cups/backend/ and `filters` must be installed to /usr/libexec/cups/filter/ directories. But Canon CAPT is not aware of it yet. Let us fix it.
Code:
# ln -s /usr/lib64/cups/backend/ccp /usr/libexec/cups/backend/ccp
# ln -s /usr/lib64/cups/filter/pstocapt /usr/libexec/cups/filter/pstocapt
# ln -s /usr/lib64/cups/filter/pstocapt2 /usr/libexec/cups/filter/pstocapt2
# ln -s /usr/lib64/cups/filter/pstocapt3 /usr/libexec/cups/filter/pstocapt3


Though Canon distributes it as 64-bit driver, not all binaries and libraries in it are 64-bit. Some are still 32-bit. They need some 32-bit libraries as dependencies. This I came to know about it from an ArchWiki discussion. If your Gentoo installation is `multilib`, it will install libc and some few libraries in both 64 and 32-bit version. This is a basic requirement. The other dependencies required by Canon CAPT can be found by running the following command on all CAPT installed stuffs. This can be done by first locally unpacking the above RPMs and running the following command in all its subdirectories recursively. This gives list of `not found` dependency libraries.
Code:
$ ldd * | grep -i 'not found'


The following are the `not found` dependencies for my Gentoo installation:
Along with I have also listed the Gentoo atoms which gives these libraries.

Quote:
* 64 bits: captstatusui (Canon printer status monitor ui) requires this following library,
libpangox-1.0.so.0 -- x11-libs/pangox-compat

* 32 bits: (To be installed with abi_x86_32 use flag enabled.)
libpopt.so.0 -- dev-libs/popt
libxml2.so.2 -- dev-libs/libxml2
libz.so.1 -- sys-libs/zlib


Let us install the missing dependencies:
Code:
# emerge --ask x11-libs/pangox-compat
# echo "dev-libs/popt abi_x86_32" >>/etc/portage/package.use
# emerge --ask dev-libs/popt
# echo "dev-libs/libxml2 abi_x86_32" >>/etc/portage/package.use
# emerge --ask dev-libs/libxml2    ## <--  It also pulls sys-libs/zlib with abi_x86_32 use flag.


Now let us add and configure the printer:

Starting CUPS:
Code:
# /etc/init.d/cupsd start


Creating a fifo for the printer: (Necessary)
Code:
# mkdir /var/ccpd
# mkfifo /var/ccpd/fifo0
# chown lp:lp /var/ccpd/fifo0
# ls -l /var/ccpd/fifo0
# cat /etc/group | grep "lp"  ## <-- Don't forget that the user should be in 'lp' group. If not add him.
# gpasswd -a root lp  ## <-- Even you can add root to 'lp' group so that he can print.


Register the printer (PPD) with the print spooler:
Do not use ccp://localhost:59687 as the device URI as suggested by Canon CAPT installation guide. It will not work. Instead of it use the above created fifo in the following command. Use the appropriate ppd file name for your printer. They can be found in /usr/share/cups/model/.
Code:
# /usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E


Obtaining Printer Device Path:
It can be obtained by connecting the printer to your computer and issuing,
Code:
# ls /dev/usb
hiddev0  lp1

This shows the device node to which the printer is connected. Here it is lp1.

Now register the printer in the ccpd daemon setup file:
Code:
# /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp1


Now `ccpdadmin` should show something similar to the following:
Code:
# ccpdadmin

Usage:
ccpdadmin [-p Printer-name -o Printer-dev-path]
ccpdadmin [-x Remove-Printer-name]

CUPS_ConfigPath = /etc/cups/
LOG Path        = None
UI Port         = 59787

Entry Num  : Spooler    : Backend   : FIFO path       : Device Path     : Status
----------------------------------------------------------------------------
    [0]    : LBP2900    : ccp       : /var/ccpd/fifo0 : /dev/usb/lp1    :


Start the `ccpd` daemon:
Code:
# /etc/init.d/ccpd start


And now print and enjoy....!!


Quote:
Death is so terribly final, but Gentoo is full of possibilities.
Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Tue May 26, 2015 10:38 pm    Post subject: Reply with quote

Interesting day with both of us writing tutorials for stupid Canon printers.

I have also gotten sick of all problems with this printers and created ebuilds for 2.60 version. I'm compiling them from source and not using RPMs or DEBs, and having ebuild is much nicer - at least you can update, or even better delete them from system.

You have them as attachment in bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=130612#c127 (tar.gz file: https://bugs.gentoo.org/attachment.cgi?id=404004)
I have also created wiki page: https://wiki.gentoo.org/wiki/Canon_CAPT_Printer where we can collect information about setting this printers up.
I have already added your sentence "Do not buy any printers without checking whether it is supported by either Foomatic or Gutenprint". there as warning.

For creating them I have used previous ebuilds in that thread https://bugs.gentoo.org/show_bug.cgi?id=130612#c125 and net-print/cndrvcups-common-lb that are in portage.

I don't have amd64 so I have left that part of the code untouched, which probable means that it will not work without modification.
I know that I'm not including x11-libs/pangox-compat and sys-libs/zlib as dependencies, not "abi_x86_32" useflag for dev-libs/libxml2 and dev-libs/popt.

Their sources also might need some configuration options for amd64.

Drivers are really ugly and hard to make ebuild for them, but I think that I have ironed out most issues with x86, but I don't have amd64 gentoo in my vicinity, so it would be really nice if you could help me with trying them out and reporting errors I will try to fix them or help with them.

This ebuilds will need some work and testing to make them usable, but if few of us can get together I think we can have easy installation for a lot of people searching the web for help.
Back to top
View user's profile Send private message
niranjana_km
n00b
n00b


Joined: 15 Mar 2014
Posts: 14

PostPosted: Wed May 27, 2015 6:08 am    Post subject: Reply with quote

Sure.. I am all yours. I will try them and report any errors. Thanks for preparing ebuilds for it.

Previously, I too tried to compile and installed them on amd64 from source.
1. I got errors for cngplp and cpca in cndrvcups-common-2.60-1. So I commented these two in Makefile. Because cngplp GUI for printer settings is not a necessary item as we have CUPS for that. And from cndrvcups-common-2.60-1 the crucial thing needed was only buftool, which I could successfully compile and install.
2. Next, in cndrvcups-capt-2.60-1 I was getting errors in statusui and cngplp because of previous errors in cndrvcups-common-2.60-1. Since these two are also not necessary things I commented them in Makefile. Further I changed Makefile.am in backend, pstocapt, pstocapt2 and pstocapt3 to reflect /usr/libexec/cups/ directory used by new versions of CUPS for installing backends and filters.

I succeeded in compiling and installing these necessary things. But it was not the end, still ccpd, ccpdadmin, captfilter, captmon2, etc..... so many binaries and libraries necessary for these printers to work, for which Canon is not giving the source code, are to be copied to respective directories manually. In the end, we only have a small portion of source code of CAPT which we are compiling and istalling and remaining major portion is just copying the binaries cooked by Canon. Where is the spirit of Gentoo? So, I thought let me install them through RPMs and then insatall the remaining dependency libraries. Let this printer work first. I was tired by then.

Now I will try your ebuilds. Wish me good luck.. :) :)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed May 27, 2015 10:31 am    Post subject: Reply with quote

Good to see you linking up to collaborate. :)

In case you don't know it, #gentoo-dev-help on IRC: chat.freenode.net is the place to get live help and support with ebuild-writing.

Also all ebuilds are written in BASH, so #bash is essential too; ##workingset for help with build-systems (compilers, make, binutils, autoconf/automake, cmake etc.)

Good luck! :-)
Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Wed May 27, 2015 10:46 am    Post subject: Reply with quote

@niranjana_km

Yes I know off all those issues and compiling is pretty messy.
But I have addressed them all in my ebuild :)

Some stuff I have addressed in patches (you can find and check them out in ebuilds, where they were missing includes or had bad formating) and some in ebuilds directly (like missing libraries).

cngplp - is absolutely not needed, I we have use flag for it (disabled by default) and had multiple issues to be able to compile, biggest one was with libtool so I'm even calling "autoreconf --install --force" in ebuild to make it compile.

I'm also addressing needed changes and places for installed files. Most of the work has been done in older ebuilds, so I have made some changes to make it work correctly.


I have spend 2 whole days making those ebuilds work and I would really like that others get some benefit from them too.


Also, take note that, for some reason, https://bugs.gentoo.org are gziping my tar.gz archive. So you will need to gunzip it and than tar xzf... I still don't know how to avoid that.

Good luck!


@steveL
Thank you for invite, I will definitely come and ask some questions.
Back to top
View user's profile Send private message
niranjana_km
n00b
n00b


Joined: 15 Mar 2014
Posts: 14

PostPosted: Thu May 28, 2015 8:49 am    Post subject: Reply with quote

Your ebuilds are pulling >=app-emulation/emul-linux-x86-gtklibs-2.0 and >=app-emulation/emul-linux-x86-baselibs-10.0-r1 on amd64. As per the following Gentoo news,

https://www.gentoo.org/support/news-items/2015-03-28-true-multilib.html

Gentoo is masking the emul-linux-x86 package sets for removal. This may be the reason for removal of cndrvcups-common-2.00-r2 and cndrvcups-capt-2.00-r2 packages from calculate overlay. These ebuilds were working on amd64 and I was using them before. After their discontinue, I installed CAPT by scratch and that is the reason for my post in this forum. So, you have to write the ebuild by avoiding any emul-linux-x86* packages as dependencies so that the ebuilds sustain in the future.

As per this news, for 32-bit libraries, Gentoo introduced a new use flag `abi_x86_32` (In Gentoo's spirit, this I think is a right decision they made) for packages, which enables the libraries to be built in 32-bit version also.

Thats why they are changing or dropping the packages which requires emul-linux-x86*.

For Canon capt on amd-64, we need 32 bit dev-libs/popt, dev-libs/libxml2 and sys-libs/zlib (of course libxml2 pulls zlib). If we want captstatusui to function we need 64-bit x11-libs/pangox-compat (which is a small package).

And in configuring the filter, your ebuild gives info stating the following command,
# /usr/sbin/lpadmin -p LBP3010 -m CNCUPSLBP3050CAPTK.ppd -v ccp://localhost:59687 -E
Does this ccp://localhost:59687 works? Because for me it did not. So I created /var/ccpd/fifo0 as suggested by other unfortunates like me over the net. The ebuilds which calculate overlay was giving was also creating this fifo.
Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Thu May 28, 2015 2:53 pm    Post subject: Reply with quote

Thank you for testing and explanation.

I have updated ebuilds and got advice to put them on github, so you can get updated versions here: https://github.com/homoludens/canoncapt-euilds

I have another question about amd64, this was in an old ebuild:

Code:
 
if use amd64; then
    dosbin libs64/ccpd libs64/ccpdadmin
else
     dosbin libs/ccpd libs/ccpdadmin
fi



I don't see any libs64/ directory when compiling, so those two files might be in libs/ folder and missing from final installation.


Quote:
# /usr/sbin/lpadmin -p LBP3010 -m CNCUPSLBP3050CAPTK.ppd -v ccp://localhost:59687 -E


Yes, that is working for me. What error message are you getting?
If it is something like:
Code:
 lpadmin: Bad device-uri scheme "ccp".
check if ccp binary is in /usr/libexec/cups/backend/ and not in/usr/lib/cups/backend/ (Gentoo is using /usr/libexec/cups/backend/ and not default one. I have addressed this in ebuild.
Back to top
View user's profile Send private message
niranjana_km
n00b
n00b


Joined: 15 Mar 2014
Posts: 14

PostPosted: Thu May 28, 2015 3:53 pm    Post subject: Reply with quote

1. In the copy of Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz, which I had earlier downloaded from Canon site, I do have Src/cndrvcups-capt-2.60-1/libs64 folder. This contains 64-bit versions of ccpd and ccpdadmin. Also I have Src/cndrvcups-capt-2.60-1/libs folder which contains 32-bit versions of ccpd and ccpdadmin; both of which depends on 32-bit libcups. But those which are in libs64 depends on 64-bit cups. Hence installing those in libs64 directory will be good for amd64 as we can avoid depending on 32-bit libcups. And hence it reduces to only depending on libpopt, libxml2 and libz among 32-bit libraries only.

2. You can see in my first post above about change in location of filter and backends from /usr/lib64/cups to /usr/libexec/cups/ in recent versions of CUPS. For this, you can see some `ln -s` linking commands above in it. I too faced with - lpadmin: Bad device-uri scheme "ccp" - error earlier which then revealed this location change while on search for it. Not this problem I am talking about, in my case using ccp://localhost:59687 will not give any errors, but simply will not give any print also. Only with a fifo I could print. The following are my use flags for cups. It may be helpful. Compare it with your use flags for cups.

Code:
amt@MATHEMATICS ~ $ equery uses net-print/cups
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for net-print/cups-2.0.2-r1:
 U I
 + + X                        : Add support for X11
 - - abi_x86_32               : 32-bit (x86) libraries
 + + acl                      : Add support for Access Control Lists
 + + dbus                     : Enable dbus support for anything that needs it
                                (gpsd, gnomemeeting, etc)
 - - debug                    : Enable extra debug codepaths, like asserts and
                                extra output. If you want to get meaningful
                                backtraces see
                                http://www.gentoo.org/proj/en/qa/backtraces.xml
 - - java                     : Add support for the Java interpeter in the web
                                server CGIs.
 - - kerberos                 : Add kerberos support
 + + linguas_ca               : Catalan locale
 + + linguas_cs               : Czech locale
 + + linguas_de               : German locale
 + + linguas_es               : Spanish locale
 + + linguas_fr               : French locale
 + + linguas_it               : Italian locale
 + + linguas_ja               : Japanese locale
 + + linguas_pt_BR            : Portuguese locale for Brasil
 + + linguas_ru               : Russian locale
 - - lprng-compat             : Do not install lp... binaries so cups and lprng
                                can coexist.
 + + pam                      : Add support for PAM (Pluggable Authentication
                                Modules) - DANGEROUS to arbitrarily flip
 - - python                   : Add support for the Python interpeter in the
                                web server CGIs.
 + + python_targets_python2_7 : Build with Python 2.7
 + + ssl                      : Add support for Secure Socket Layer connections
 - - static-libs              : Build static versions of dynamic libraries as
                                well
 - - systemd                  : Enable use of systemd-specific libraries and
                                features like socket activation or session
                                tracking
 + + threads                  : Add threads support for various packages.
                                Usually pthreads
 - - usb                      : Add USB support to applications that have
                                optional USB support (e.g. cups)
 - - xinetd                   : Add support for the xinetd super-server
 - - zeroconf                 : Support for DNS Service Discovery (DNS-SD)
Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Fri May 29, 2015 12:10 pm    Post subject: Reply with quote

Here are my USE flags for CUPS, we have few differences, and different versions. I have downgraded when I had some idea that Canon drivers are using functions deprecated in CUPS 2. So I will upgrade CUPS and test after that.

I have added info about wiki page in message after installing and have also added this options to that page https://wiki.gentoo.org/wiki/Canon_CAPT_Printer, so that others can find all info we have on it.

Updated ebuilds are on https://github.com/homoludens/canoncapt-euilds

Code:

equery uses net-print/cups-1.7.5                                                                                                   
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for net-print/cups-1.7.5:
 U I
 + + X                        : Add support for X11
 + + acl                      : Add support for Access Control Lists
 + + dbus                     : Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
 - - debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
                                http://www.gentoo.org/proj/en/qa/backtraces.xml
 + + gnutls                   : Add support for net-libs/gnutls (TLS 1.0 and SSL 3.0 support)
 + + java                     : Add support for the Java interpeter in the web server CGIs.
 - - kerberos                 : Add kerberos support
 - - linguas_ca               : Catalan locale
 - - linguas_es               : Spanish locale
 - - linguas_fr               : French locale
 - - linguas_it               : Italian locale
 - - linguas_ja               : Japanese locale
 - - linguas_pt_BR            : Portuguese locale for Brasil
 - - linguas_ru               : Russian locale
 - - lprng-compat             : Do not install lp... binaries so cups and lprng can coexist.
 + + pam                      : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 + + python                   : Add support for the Python interpeter in the web server CGIs.
 + + python_targets_python2_7 : Build with Python 2.7
 + + ssl                      : Add support for Secure Socket Layer connections
 - - static-libs              : Build static versions of dynamic libraries as well
 - - systemd                  : Enable use of systemd-specific libraries and features like socket activation or session tracking
 + + threads                  : Add threads support for various packages. Usually pthreads
 + - usb                      : Add USB support to applications that have optional USB support (e.g. cups)
 - - xinetd                   : Add support for the xinetd super-server
 + + zeroconf                 : Support for DNS Service Discovery (DNS-SD)

Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Fri May 29, 2015 12:50 pm    Post subject: Reply with quote

Also, check your /etc/ccpd.conf you should have:

Code:
<Ports>
# Status monitoring socket port.
#  Default 59787
UI_Port  59787
PDATA_Port  59687
</Ports>


and after starting ccpd deamon, you should have it listening on those ports:

Code:

$ netstat -lpn|grep ccpd                                                                                                                     
tcp        0      0 0.0.0.0:59687           0.0.0.0:*               LISTEN      25250/ccpd         
tcp        0      0 0.0.0.0:59787           0.0.0.0:*               LISTEN      25250/ccpd
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Fri May 29, 2015 1:25 pm    Post subject: Reply with quote

homoludens wrote:
I have also created wiki page: https://wiki.gentoo.org/wiki/Canon_CAPT_Printer where we can collect information about setting this printers up.
I have already added your sentence "Do not buy any printers without checking whether it is supported by either Foomatic or Gutenprint". there as warning.

This wiki article recommends
https://wiki.gentoo.org/wiki/Canon_CAPT_Printer#Installing_the_drivers wrote:
If you are using USB printer you will need usblp kernel module which is by default blacklisted by net-print/cups, easiest way around this is recompiling cups with USE="-usb". usbplp module is creating /dev/usb/lp0 device used for communicating with printer.

Is there any way for using the standard setup without usblp kernel module so that one could use this driver along with other printer drivers like Brother BrGenML1 that need cups with USE="usb" enabled?
Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Fri May 29, 2015 4:51 pm    Post subject: Reply with quote

Quote:


Is there any way for using the standard setup without usblp kernel module so that one could use this driver along with other printer drivers like Brother BrGenML1 that need cups with USE="usb" enabled?


I couldn't find another way for USB printers to work unless they have device path /dev/usb/lp0 which you get from usblp module, which I tried since using usblp module is deprecated .[/quote]
If CUPS is handling usb printers - is it creating some device that we could give to ccpdadmin? Any suggestion would be appreciated.

If it is a network printer you can use it without ubslp module:

Code:

ccpdadmin -p printer_model -o net:ip_address
Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Fri May 29, 2015 5:00 pm    Post subject: Reply with quote

On the other hand, Arch Wiki is stating that you don't have to blacklist usblp module any more: https://wiki.archlinux.org/index.php/CUPS#USB_printers
So it should be possible to compile cups with +usb, but you should also check if usblp module is loaded and working, since cups ebuild is suggesting disabling it in kernel when complied (I would guess that reason for this was this bug: http://cups.org/str.php?L4128 - which is now resolved).

If you are able to confirm this - we should remove that part from the gentoo wiki page.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Sat May 30, 2015 8:56 am    Post subject: Reply with quote

homoludens wrote:
On the other hand, Arch Wiki is stating that you don't have to blacklist usblp module any more: https://wiki.archlinux.org/index.php/CUPS#USB_printers

Interesting news, I wasn't aware of that.

Re-reading https://wiki.gentoo.org/wiki/Printing I cannot find any mention of CONFIG_USB_PRINTER or USB Printer support aka usblp. Guess that article needs an overhaul.

homoludens wrote:
So it should be possible to compile cups with +usb, but you should also check if usblp module is loaded and working, since cups ebuild is suggesting disabling it in kernel when complied (I would guess that reason for this was this bug: http://cups.org/str.php?L4128 - which is now resolved).

If you are able to confirm this - we should remove that part from the gentoo wiki page.

https://bugs.gentoo.org/show_bug.cgi?id=501122 So what is (what was?) the benefit of having cups with the usb USE flag enabled instead of the kernel option?
Back to top
View user's profile Send private message
niranjana_km
n00b
n00b


Joined: 15 Mar 2014
Posts: 14

PostPosted: Sun May 31, 2015 4:30 pm    Post subject: Reply with quote

Hi homoludens,
Nice weekend. I tried your ebuilds. They worked fine on my amd64 installation. I could print, but still only with a fifo. The following are some points I want to make.

1. Minor: In the message for emerge of your ebuilds, it gives a short description to configure the printers. People may copy the commands in it and paste on their terminals. In the line
* /usr/sbin/lpadmin -p LBP3010 -m CNCUPSLBP3050CAPTK.ppd -v ccp://localhost:59687 –E
please change the long hyphen character – (–E) with a normal one - (-E).

2. I tried to configure with ccp://localhost:59687, but no success. I tried your suggestions. It's all fine.
Code:
# cat /etc/ccpd.conf

<Ports>
# Status monitoring socket port.
#  Default 59787
UI_Port  59787
PDATA_Port  59687
</Ports>


Code:
# netstat -lpn | grep ccpd
tcp        0      0 0.0.0.0:59687           0.0.0.0:*               LISTEN      6178/ccpd           
tcp        0      0 0.0.0.0:59787           0.0.0.0:*               LISTEN      6178/ccpd


The port exists and is listening also. But CUPS says printing successful but no errors no print too.

We have two choices to make. Either fix it so that it can print with ccp://localhost:59687 as suggested by the end message of emerge of your ebuild, or change the message itself so that it gives procedure to make this fifo in /var/ccpd. Or let the ebuild itself create this fifo and change the command into
Code:
/usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E

I think that this fifo thing works for everyone.

The following is the emerge message which Canon CAPT printer driver ebuild from `calculate` overlay was printing. It may be helpful for you.
Code:
* 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 #136199
Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Sun May 31, 2015 6:04 pm    Post subject: Reply with quote

@charles17

I have just tried compiling net-print/cups with USE="usb" and Canon drivers are working without a problem, so I have removed USE='-usb' as dependency for this ebuilds. The question remains if other printers that work with libusb will continue to work if usblp is loaded in kernel. We should wait for someone to confirm that.

Quote:
https://bugs.gentoo.org/show_bug.cgi?id=501122 So what is (what was?) the benefit of having cups with the usb USE flag enabled instead of the kernel option?


For some time CUPS had some issues with usblp, but that's not the case since CUPS 1.6. I have even tried using libusb path (ex. usb://Canon/LASER%20SHOT%20LBP-1120?serial=03488Anv) inseted of /dev/usb/lp0, but it isn't working for me (thou usblp is compiled in my kernel, not module so that could be an issue).




@niranjana_km

I was nice weekend for me :) and thank you for testing ebuilds.

1. Thank you for that change, I have fixed it (I have probably just copied that line from somewhere.

2. I have changed that line for explanation and added fifo path as default explanation, since that really has more probability to work for more users.
Also I'm creating fifo file in ebuild, to make it easier for others. Github repo is updated.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon Jun 01, 2015 7:00 am    Post subject: Reply with quote

homoludens wrote:
@charles17

I have just tried compiling net-print/cups with USE="usb" and Canon drivers are working without a problem, so I have removed USE='-usb' as dependency for this ebuilds. The question remains if other printers that work with libusb will continue to work if usblp is loaded in kernel. We should wait for someone to confirm that.

The Brother_BrGenML1 still works with both CONFIG_USB_PRINTER=y and net-print/cups[usb] enabled. I have tested with printer plugged in usb and network off. Not tested with CONFIG_USB_PRINTER=m.

homoludens wrote:

Quote:
https://bugs.gentoo.org/show_bug.cgi?id=501122 So what is (what was?) the benefit of having cups with the usb USE flag enabled instead of the kernel option?


For some time CUPS had some issues with usblp, but that's not the case since CUPS 1.6. I have even tried using libusb path (ex. usb://Canon/LASER%20SHOT%20LBP-1120?serial=03488Anv) inseted of /dev/usb/lp0, but it isn't working for me (thou usblp is compiled in my kernel, not module so that could be an issue).

Maybe a test with CONFIG_USB_PRINTER=m would be helpful?
Back to top
View user's profile Send private message
homoludens
n00b
n00b


Joined: 14 Jun 2009
Posts: 11

PostPosted: Mon Jun 01, 2015 9:06 am    Post subject: Reply with quote

Quote:
Maybe a test with CONFIG_USB_PRINTER=m would be helpful?


I would guess that CONFIG_USB_PRINTER=m would also work, but if you can test it - it's better to have that confirmed.
I have updated https://bugs.gentoo.org/show_bug.cgi?id=501122 to get some attention for removing comment in cups ebuild, so it doesn't scare off users.


Have you tried my ebuilds? Are they working for you?


Next step is converting ebuilds to EAPI=5 (they are now EAPI=2), retest them and check to which overlay we should add this ebuilds.

Do you have some suggestion?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue Jun 02, 2015 8:39 am    Post subject: Reply with quote

homoludens wrote:
Quote:
Maybe a test with CONFIG_USB_PRINTER=m would be helpful?


I would guess that CONFIG_USB_PRINTER=m would also work, but if you can test it -

Sorry, but I don't have a Canon printer @home.

BTW:
Maybe you could enable your ebuilds for easier integration with repos.conf, similar to https://wiki.gentoo.org/wiki//etc/portage/repos.conf/brother-overlay.conf?
Back to top
View user's profile Send private message
cz0
Apprentice
Apprentice


Joined: 13 Jun 2005
Posts: 280
Location: /earth/russia/moscow

PostPosted: Sat Dec 17, 2016 10:32 pm    Post subject: Reply with quote

I'm running amd64 Gentoo and I tested kernel with CONFIG_USB_PRINTER compiled both as module and builtin with CUPS usb option enabled and disabled. Seem to work in any combination of.
The only thing to notice, in my case
Code:

lpadmin -p LBP810 -m CNCUPSLBP1120CAPTK.ppd -v ccp:/var/ccpd/fifo0 -E

work well, while the 'localhost:59687' variant tend to fail intermittent. As CAPT gives exactly zero logs, I was not able to investigate the non-working variant.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum