Deutsch English Français Italiano |
<877c5vxo34.fsf@example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Salvador Mirzo <smirzo@example.com> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: unsuccessfully install of printer brother hl-l2360dw Date: Wed, 12 Feb 2025 10:57:35 -0300 Organization: A noiseless patient Spider Lines: 150 Message-ID: <877c5vxo34.fsf@example.com> References: <86ldw2gu39.fsf@example.com> <865xmz46mk.fsf@antartida.xyz> <ltl831Fdu1pU1@mid.individual.net> <87wmei6gyl.fsf@example.com> <lvlg48Frm7vU1@mid.individual.net> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Wed, 12 Feb 2025 14:57:39 +0100 (CET) Injection-Info: dont-email.me; posting-host="41b1bae619a6290ef4050ee353af0785"; logging-data="2486769"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Jju3Md4l5Ye7dcS8mZ049Zp19OLkfZ0g=" Cancel-Lock: sha1:Lc5MOSt2XUt1kC0kuS0xgxJRARE= sha1:8zHfvofFXUw1T3kzDs+L/lfWYgE= Bytes: 7751 groenveld@acm.org (John D Groenveld) writes: > In article <87wmei6gyl.fsf@example.com>, > Salvador Mirzo <smirzo@example.com> wrote: >>I could never make this work, but I believe you're right. Looking at my >>printer settings (which I printed out using the printer's menu) I >>see... On page 3/3, in network configuration, I see: >> >> <Active services> BRN3C2AF43F4D7C >> BINARY_P1 >> TEXT_P1 >> POSTSCRIPT_P1 >> PCL_P1 >> BRN3C2AF43F4D7C_AT >> >>I've seen in the CUPS administration that a URL mentions BINARY_P1, so >>it seems that CUPS was using this BINARY_P1 service. Perhaps if I were >>to change it to POSTSCRIPT_P1, it would then accept PostScript from the >>network. > > Spew a little PostScript to it. > ISTR ghostscript includes some samples or you can use enscript, a2ps > and friends to generate some. CUPS and the printer were installed from scratch using the IPP ``driver'' as you instructed me in this thread. I used a2ps to transform a text file into a PS one. I sent the document to the printer directly on port 9100 and I got out the PostScript code in plain text. Then I changed the printer's CUPS configuration to use the LPD protocol and I manually set the queue to POSTSCRIPT_P1, having chosen (as the driver) the Brother HL-L2360D series from the list installed by the /brsaler/ OpenBSD package. Then I used CUPS's lpr to send the document and I got out a nice looking PostScript document made by a2ps. This proves this printer indeed talks PostScript as you said. Then I went to try two-sided-long-edge. I began by trying to print with programs such as evince (a GTK PDF viewer), qpdfview (a QT PDF viewer) and Firefox (another GTK program) and I explicitly asked for two-sided-long-edge always getting two-sided-short-edge. I tried to ask for one-sided and I got a one-sided print out. In other words, things behave almost as one would expect; the only problem being that two-sided-long-edge always behaves like two-sided-short-edge. I then tried CUPS's lpr on the command line---below. >>But my experience with CUPS was not very good because I could never >>print two-sided-long-edge. It always printed two-sided-short-edge (or >>one-sided). Since I was able to make it always print >>two-sided-long-edge by not using CUPS at all, I gave up on CUPS. > > OpenBSD's ipptool(1) claims your printer supports short and long edge. > Try with cups-lpr(1) > <URL:https://openprinting.github.io/cups/doc/man-lpr.html> > | -o sides=two-sided-long-edge > | Prints on both sides of the paper for portrait output. > | -o sides=two-sided-short-edge > | Prints on both sides of the paper for landscape output. I used CUPS's lpr to print a two-page PostScript document in both options. They both came out two-sided-short-edge (that is, landscape). I said: $ /usr/local/bin/lpr -P BRWB052162167A6 -o sides=two-sided-long-edge manual.ps $ /usr/local/bin/lpr -P BRWB052162167A6 -o sides=two-sided-short-edge manual.ps I got two A4 papers out, both printed the same way, two-sided-short-edge. Finally, I said $ /usr/local/bin/lpr -P BRWB052162167A6 -o sides=one-sided manual.ps and two A4 papers out, one sided as expected. I wonder if there's a mistake or something that can be done in the PPD file of the printer. On OpenBSD, the PPD file is installed at /etc/cups/ppd/BRWB052162167A6.ppd Here are lines 119--125: *OpenUI *Duplex/2-Sided Printing: PickOne *OrderDependency: 10 AnySetup *Duplex *DefaultDuplex: None *Duplex None/Off (1-Sided): "<</Duplex false>>setpagedevice" *Duplex DuplexNoTumble/Long-Edge (Portrait): "<</Duplex true/Tumble false>>setpagedevice" *Duplex DuplexTumble/Short-Edge (Landscape): "<</Duplex true/Tumble true>>setpagedevice" *CloseUI: *Duplex It looks right, but I wish I knew more about this file. For instance, if I could somehow set it to always do two-sided-long-edge, I'd be nearly 100% happy. My imagination says that these values in quotes are PostScript code. I then changed the one that says /Tumble true/ to /Tumble false/. Like this: *Duplex DuplexNoTumble/Long-Edge (Portrait): "<</Duplex true/Tumble false>>setpagedevice" *Duplex DuplexTumble/Short-Edge (Landscape): "<</Duplex true/Tumble false>>setpagedevice" I restarted cupsd and said: $ /usr/local/bin/lpr -P BRWB052162167A6 -o sides=one-sided manual.ps $ /usr/local/bin/lpr -P BRWB052162167A6 -o sides=two-sided-long-edge manual.ps $ /usr/local/bin/lpr -P BRWB052162167A6 -o sides=two-sided-short-edge manual.ps The first came out one-sided, as expected; the next two came out two-sided-short-edge. Lol---my hack didn't work. By the way, I also tried landscape with two-sided-short-edge (using Firefox). It comes out right: landscape two-sided-short-edge. I'm out of ideas for now. But I still think there's a way to solve this because the printer is able to do PostScript; it can do two-sided including both long and short edge. My intuition says that what's going on is simply a mistake somewhere. I was very hopeful with my hack above, but it made no difference. Perhaps what I'm going to try next is to study a little bit of PostScript to be able to write a document myself that's very simple and that it instructs the printer directly to see if I can get two-sided-long-edge. My feeling is that these options in the PPD file are used to know what PostScript code to include in the document. Since I don't see the code that the printer actually gets in the end, that's a margin for confusion. >>You already know I switched to OpenBSD in the process of debugging this. >>FWIW, I was able to set up the printer to use IPP. I was able to print >>with it, but with the same two-sided-short-edge behavior as using the >>LPD:// URL in CUPS. >> >>All in all, CUPS worked, but it turns out my life has been better with >>just using /etc/printcap and lpr. >> >>I wanted to thank you for the help! >> >>If I find anything new, I'll post again. > > If you get OpenBSD's cups to work, that will point to a bug in FreeBSD's. At this point I don't think FreeBSD is at fault. > BTW my WAG is OpenBSD's vmm supports FreeBSD guests if you want test > FreeBSD without dual booting: > <URL:https://www.openbsd.org/faq/faq16.html#StartVm> Not for testing CUPS at the moment, since OpenBSD is behaving exactly as FreeBSD did. (For everything else, I have a headless FreeBSD server, but no printer attached to it.) Thanks very much for the help!