From owner-freebsd-questions@FreeBSD.ORG Sat Feb 27 13:12:10 2010 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 E7014106566C for ; Sat, 27 Feb 2010 13:12:10 +0000 (UTC) (envelope-from btillman99@yahoo.com) Received: from web36506.mail.mud.yahoo.com (web36506.mail.mud.yahoo.com [209.191.85.6]) by mx1.freebsd.org (Postfix) with SMTP id A2B218FC0C for ; Sat, 27 Feb 2010 13:12:10 +0000 (UTC) Received: (qmail 24591 invoked by uid 60001); 27 Feb 2010 13:12:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1267276328; bh=JKSIMXpCBOconBSl7ODr/RvDppDzyfms0LfNpUTr69M=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=WKzep41UWP9ug5sGAODS9bbQLRm5DZoe67l1AAXQQJExpzFdnushPx6O/Po/KyJWLTDbvqrvlXqtXGLVUNcpl5Udm6LMf+DH8TgvrsjeYN8eI2F1TdpoXUB7ziZ3r6W2ReQpti+2l0mFpe0OebiaiQv1yWd4AbCSC057HmszSkw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=PacLMuFrCe+lxT41Ib3ZgVDqpyzLyy30y5jFd3OmIhLN665XI81AXz6wIJZ7kOECMEPj0uexw2hL1oB/PUC2ZqJ3ZZE4BNY7FmKA/QYDFsNTKtOwR74Fcpypgg7TwmQueGOcjFTUJKzZOuKzkU6HgKmAfyfqZoQzSGLyJvP2gdQ=; Message-ID: <250360.24168.qm@web36506.mail.mud.yahoo.com> X-YMail-OSG: NfrZNCAVM1n9tao2m4xUH9_.mV9QwVQ2OUFFgpdCr_V3zr1RXYxeAS97OAorj5y7zwelawSfCPQwTAfIVSs_8YrHqGlntgN2wI7ymsGqspiouODKZvBuJxnghHg1qtOXTweoA9xQIsBUKgc5L9ZhU_8OaHC4qpDXmzGvOjD3AdifA0TjwEnjRkZid4T9Pkkrj6FtggDZspOpTVM7hzstD41N_3bMGiYbThDvCMNeHesbbkXiNAanPxMRQKXH5k2kaHpv321LQdKkkSjifYSpyBTJXQNipvwlcEMmjwwA4yizKu4vAG7PHxi3vsXVUrzF7vs7 Received: from [98.242.237.166] by web36506.mail.mud.yahoo.com via HTTP; Sat, 27 Feb 2010 05:12:08 PST X-Mailer: YahooMailClassic/9.2.12 YahooMailWebService/0.8.100.260964 Date: Sat, 27 Feb 2010 05:12:08 -0800 (PST) From: Bill Tillman To: Robert Bonomi In-Reply-To: <201002270229.o1R2TDO2029973@mail.r-bonomi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Printing via USB Port 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: Sat, 27 Feb 2010 13:12:11 -0000 --- On Fri, 2/26/10, Robert Bonomi wrote: From: Robert Bonomi Subject: Re: Printing via USB Port To: btillman99@yahoo.com Date: Friday, February 26, 2010, 8:29 PM > From owner-freebsd-questions@freebsd.org=A0 Fri Feb 26 18:20:29 2010 > Date: Fri, 26 Feb 2010 16:19:40 -0800 (PST) > Cc: freebsd-questions@freebsd.org > Subject: Re: Printing via USB Port > > > > > > From: Warren Block > > Subject: Re: Printing via USB Port > > Date: Friday, February 26, 2010, 5:38 PM > > > > On Fri, 26 Feb 2010, Bill Tillman wrote: > > >=20 > > > Thanks again for your valuable input. I have set up lpd printing on m= y old=20 > > > FreeBSD server at least a dozen times and it became a simple routine = to do=20 > > > with apsfilter.Let me see if I can place all my cards in one place an= d=20 > > > perhaps we can find the bug. > > > > I think I found it. The HL-2040 is a GDI printer, aka winprinter (aka "= oh no, > > one of those", aka "I guess I didn't really want to print that after al= l"). > > It won't respond to PCL, unlike the one I looked up first, the HL-2060. > > > > Based on http://beej.us/hl2040/: > > > >=A0 % cd /usr/local/libexec > >=A0 % cp ps2pcl ps2hl1250 > > > > Change the line in ps2hl1250 to: > > > > /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=3Dhl1250 -sOutputFile= =3D- - > >=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0=A0=A0^^^^^^ > > And change the if=3D line in the printcap to refer to ps2hl1250. > > > > (And remember, buying winprinters just encourages them to make more.) > > > > -Warren Block * Rapid City, South Dakota USA > > Warren, > > Once again many thanks, but that is one of the first things I tried. By= =20 > checking ghostcript's drivers > > #gs -h | grep hl > > I found many drivers for the HL-12xx models. I have used this in my previ= ous=20 > setup with my old parallel server. I actually tried what you suggested an= d it > only worked when using the parallel cable, not the USB. For some reason t= he=20 > USB connection on this and any other FreeBSD server I connect to is DOA f= or > printing. I run mouse and keyboard via USB. But these print jobs are lini= ng=20 > up in the queue and just sit there no matter how many times I reconnect t= he=20 > printer, or reboot it or reboot the computer. And once again I'm seeing t= wo=20 > instances of lpd running when I only launched it from the command-line on= ce, > no entry in /etc/rc.conf. > > BigDell# ps -ax | grep lpd > 1311 ?? Is 0:00.00 lpd > 1329 ?? IE 0:00.00 lpd > > BigDell# lpq > no entries > > BigDell# lpc status all > lp: >=A0 queuing is enabled >=A0 printing is enabled >=A0 no entries in spool area >=A0 printer idle > > BigDell# > > This just don't make sense and I hope when we find it it's something we c= an >=A0 laugh about. > OK, it's time to try some _basics_.=A0=A0=A0Can you throw data _directly_ a= t the printer (i.e., *NOT* through lpr/lpd), and will it print? You can't use a simple=A0 'echo Hello, World! >/dev/lp' to find out, becaus= e its=20 a fscking 'winprinter'. power everything down, connect the USB cable only, power up the printer fir= st, then the computer. When it has come up, do you have a /dev/usb/lp0 device? Have you created a symlink at /dev/lp that points to /dev/usb/lp0? What happens if you do (as root) where 'testfile.ps' is a simple Postscript= doc]: =A0 =A0 # /usr/local/libexec/ps2hl1250 < testfile.ps >/dev/usb/lp0 how about:=20 =A0 =A0 # /usr/local/libexec/ps2hl1250 < testfile.ps >/dev/lp For that matter, what does "find /dev -name '*lp*' -ls" show? If any of the names show as symlinks, do an 'ls -l' on the symlink target. I'm guessing that /dev/lp is a 'character device' node, pointing to the=20 parallel port; and when lpd tries tyo print to _that_ -- with only the USB connection, --=A0 it *doesn't*work* (for what is now an 'obvious' reason :) =A0 Thanks for your reply. I hate to be such a noob about this but USB and Free= BSD don't ever seem to work right for me. =A0 I tried the echo method =A0 # echo Hello > /dev/lp /dev/lp: Operation not supported. =A0 So I then tried # echo Hello > /dev/ulpt0 =A0 and I got an empty prompt until I pressed Ctrl+c to exit. =A0 I disconnected everything except the keyboard which is PS2 and the monitor = and rebooted the printer and computer allowing the printer to come up first= . When I did a directory on the /dev/usb folder this is what shows up: =A0 BigDell# ll /dev/usb/ total 0 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 72 Feb 27 07:40 0.1.0 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 76 Feb 27 07:40 0.1.1 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 94 Feb 27 02:40 0.2.0 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 96 Feb 27 02:40 0.2.1 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 97 Feb 27 02:40 0.2.2 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 87 Feb 27 02:40 0.3.0 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 89 Feb 27 02:40 0.3.1 crw-------=A0 1 root=A0 operator=A0=A0=A0 0, 100 Feb 27 02:40 0.3.2 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 74 Feb 27 07:40 1.1.0 crw-------=A0 1 root=A0 operator=A0=A0=A0 0,=A0 77 Feb 27 07:40 1.1.1 =A0 I'm not so sure this is what we call a Windows printer. Maybe I'm off base = there but by that if you mean it's not a real printer and relies on Windows= to do most of it's work then I can't say. What I can say is that this prin= ter worked perfect under FreeBSD with the parallel connection and a simple = setup with apsfilter to use the HL-1250 drivers. And it did print a few thi= ngs yesterday from the command line using the parallel connection. I sent s= ome postscript files through the ifhp filter from the /usr/share/examples/p= rinting/ folder and just changed the device from the DJ500 to HL1250. BigDell# find /dev -name '*lp*' -ls =A0=A0=A0 45=A0=A0=A0=A0=A0=A0=A0 0 crw-------=A0=A0=A0 1 root=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 wheel=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0,=A0= 45 Feb 27 07:40 /dev/lpt0 =A0=A0=A0 46=A0=A0=A0=A0=A0=A0=A0 0 crw-------=A0=A0=A0 1 root=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 wheel=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0,=A0= 46 Feb 27 07:40 /dev/lpt0.ctl =A0=A0=A0 98=A0=A0=A0=A0=A0=A0=A0 0 crw-r--r--=A0=A0=A0 1 root=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 operator=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0,=A0 98 Fe= b 27 07:49 /dev/ulpt0 =A0=A0=A0 99=A0=A0=A0=A0=A0=A0=A0 0 crw-r--r--=A0=A0=A0 1 root=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 operator=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0,=A0 99 Fe= b 27 02:40 /dev/unlpt0 =A0 No symlinks found in this search. BigDell# /usr/local/libexec/ifhp < /tmp/ntpdate.ps > /dev/lp /dev/lp: Operation not supported. BigDell# /usr/local/libexec/ifhp < /tmp/ntpdate.ps > /dev/ulpt0 =A0 This last one gives me an empty prompt waiting for more input I guess until= I press Ctrl+c to exit. =A0 I wonder how this would play out on a 7.2-STABLE machine. I have one handy = and will test it out next. I've been told that USB was completely rebuilt f= rom 7.x to 8.x. =0A=0A=0A