From owner-freebsd-questions@FreeBSD.ORG Sun Feb 26 01:42:13 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1210106566C for ; Sun, 26 Feb 2012 01:42:13 +0000 (UTC) (envelope-from jherman@dichotomia.fr) Received: from mail.dichotomia.fr (hydrogen.dichotomia.net [91.121.82.228]) by mx1.freebsd.org (Postfix) with ESMTP id 4D39B8FC17 for ; Sun, 26 Feb 2012 01:42:13 +0000 (UTC) Received: from [192.168.2.11] (unknown [109.190.13.180]) (Authenticated sender: kha@dichotomia.fr) by sslmail.dichotomia.fr (Postfix) with ESMTPSA id DBD003DD07C for ; Sun, 26 Feb 2012 02:41:43 +0100 (CET) Message-ID: <4F498DF0.5070504@dichotomia.fr> Date: Sun, 26 Feb 2012 02:42:08 +0100 From: Jerome Herman User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20120225221433.cba3d0dd.freebsd@edvax.de> In-Reply-To: <20120225221433.cba3d0dd.freebsd@edvax.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (sslmail.dichotomia.fr); Sun, 26 Feb 2012 02:41:44 +0100 (CET) Subject: Re: Installing Samsung CLX-2160 color laser printer on USB using CUPS X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2012 01:42:13 -0000 On 25/02/2012 22:14, Polytropon wrote: > I have a problem installing a Samsung CLX-2160 color > laser printer using CUPS. In the http://localhost:631 > web-based configuration, none of the methods that are > supposed to be used for installing a printer works. > > The "Add Printer" button leads to this: > > > > Add Printer > ----------- > Local Printers: > Discovered Network Printers: > Other Network Printers: o Internet Printing Protocol (http) > o Internet Printing Protocol (ipp) > o LPD/LPR Host or Printer > o AppSocket/HP JetDirect > [ Continue ] > > No local printers can be selected (even though the > printer is connected, switched on and woken up). > > > > And "Find New Printers" shows this: > > > > Available Printers > ------------------ > No printers found. > > > > Excellent auto detection. :-) > > > > The corresponding device for the printer is this: > > ulpt0: class 0/0, rev 2.00/1.00, addr 2> on usbus4 > ulpt0: using bi-directional mode > > ugen4.2: > at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON > > crw-rw---- 1 root cups 0, 142 Feb 25 21:42 /dev/ulpt0 > > I have installed all packages I can imagine: > > cups-1.4.6 > cups-base-1.4.6_6 > cups-client-1.4.6 > cups-image-1.4.6 > cups-pstoraster-8.15.4_6 > gutenprint-cups-5.2.4_2 > foo2zjs-20110609 > foomatic-db-20090530_2 > foomatic-db-engine-4.0.7,2 > gutenprint-foomatic-5.2.4_2 > foo2zjs-20110609 > > I also have the CLX-216xsplc.ppd PPD file available > which I think I'd like to hand over to CUPS somewhere. > > ALTERNATIVE: If someone could explain how it's easier > to make a lpr filter (for the system's printer service), > I'd also appreciate this. > > I've already tried this: > > # foo2xqx-wrapper cupstest.ps> cupstest.xqx > # cat cupstest.xqx> /dev/ulpt0 > > It causes the LED of the printer to blink, but nothing is > printed, even though the printer startes to make sounds > (involving the print mechanism, but not the sheet feeder). > > If I use > > # foo2qpdl-wrapper cupstest.ps> cupstest.xqx > # cat cupstest.xqx> /dev/ulpt0 > > the CUPS test page is printed, but not in color (only b/w). > After looking into the manpage, > > # foo2qpdl-wrapper -p 2 -c cupstest.ps> cupstest.xqx > # cat cupstest.xqx> /dev/ulpt0 > > makes the printer print properly. > > Okay, it works. > > How am I supposed to use a PPD file with CUPS when no > local printer is shown? > > I "need" CUPS (or at least my programs seem to think > that), how should it be done? > > Okay, I could make a simple printer filter. I could then > integrate that with /etc/printcap (as I do with my PCL > HP Laserjet 4000d). I think it should be possible to code > that similar to a parallel printer (with ulpt instead > of lpt device specification for the lp= parameter... > > What am I doing wrong? :-) You did nothing wrong, on the contrary. You now have a prefectly working printer. You just need to tell cups it exists. Since # foo2qpdl-wrapper -p 2 -c cupstest.ps> cupstest.xqx # cat cupstest.xqx> /dev/ulpt0 works, you should be able to create a new printer using a direct device. So go on as if you wanted to create a network printer, choose HPJetDirect (for example) when asked about the connection. Then when you have to input the uri remove the socket:// and type usb:///dev/ulpt0. (Yes triple / before dev) The you can process as usual for name, options and PPD. If it doesn't work try parallel:///dev/ulpt0 Normally one should work. Basically in cups choosing "network connection" allows you to input any URI you want, including file and raw (now defunct I think - it was mainly for debug anyway). I never tried this specific printer, but this trick worked well on a few HP and Canon. Tell us how it went. Jerome Herman