I've been trying to install a Brother HL-L2360DW. I managed to install
it at /etc/printcap and use it just fine with lpd. I installed as:
lp:Brother HL-L2360DW:\
:lp=9100@BRWB052162167A6:\
:if=/usr/local/libexec/lf2crlf:\
:sh:sd=/var/spool/output/brother:\
:lf=/var/log/lpd-errs:
The name BRWB052162167A6 is the hostname of the printer:
# ping BRWB052162167A6
PING BRWB052162167A6 (192.168.15.16): 56 data bytes
64 bytes from 192.168.15.16: icmp_seq=0 ttl=255 time=3.197 ms
64 bytes from 192.168.15.16: icmp_seq=1 ttl=255 time=2.978 ms
^C
--- BRWB052162167A6 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.978/3.087/3.197/0.110 ms
This way I can print ASCII documents. Even UTF-8 text documents won't
print out correctly. Apparently the printer is not a PostScript
printer, so we can't send PostScript to it. When I tried, I got
PostScript code out on paper. So I figured /etc/printcap wouldn't
suffice. I then tried CUPS.
The experience with CUPS was nice, but again I had to set the printer's driver to a raw thing and then I was able to get ASCII plain text out.
So I convinced myself that I needed a driver really. Looking at the
spec of the printer (URL and PDF below), I see it has PCL emulation. So
I tried CUPS' generic PCL driver. Testing, I got a print out saying
--8<-------------------------------------------------------->8---
%!
userdict dup(\004)cvn{}put (\004\004)cvn{}put
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% If you can read this, you are using the wrong driver for your printer. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--8<-------------------------------------------------------->8---
So then I convinced myself that I really need some kind of Brother
driver. Then I found drivers at
https://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=hll2360dw_us&os=128
But these are not for FreeBSD, so the hopes were not high. Looking at
the debian packages, I see some Perl scripts and a file with extension
PPD. I tried both
CUPSwrapper printer driver (deb package)
Generic CUPSwrapper printer driver (deb package)
Adding the PPD file which I found in data.tar.gz inside the debian
package, I end up getting the error of a missing file in
/usr/local/libexec/cups/filter
The missing file appears to be a Perl script, which I also found in the debian package, so I added the file to this directory, with permissions
0755 (as all others in the directory). I changed the Perl path in the
script from /usr/bin/perl to /usr/local/bin/perl to match the Perl I
have installed. Once again, I get
--8<-------------------------------------------------------->8---
%!
userdict dup(\004)cvn{}put (\004\004)cvn{}put
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% If you can read this, you are using the wrong driver for your printer. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--8<-------------------------------------------------------->8---
when I ask for a printer self test from the CUPS web interface.
Is there any hope of using a Brother HL-L2360DW with FreeBSD? My father
has a laptop running Windows 10 or 11. Perhaps I could somehow connect
the printer to his computer and then use CUPS to connect my FreeBSD to
his new shared printer? Any ideas? Thanks very much.
(*) Specs
The specifications for the printer can be found at
https://www.brother-usa.com/products/hll2360dw#specification
There's a PDF at
https://www.brother-usa.com/-/media/brother/product-catalog-media/documents/2020/04/28/14/44/hll2360dw_brochure_compact-laser-printer.pdf
Salvador Mirzo <smirzo@example.com> wrote:
I've been trying to install a Brother HL-L2360DW. I managed to install
The name BRWB052162167A6 is the hostname of the printer:
https://www.brother-usa.com/-/media/brother/product-catalog-media/documents/2020/04/28/14/44/hll2360dw_brochure_compact-laser-printer.pdf
No direct help, but IIRC part of the cups install process should have
forced you to specify what kind of printer you have. If that didn't
happen, I'd suggest de-installing all the print-related ports or
packages and simply starting over. Cups relies on Ghostscript, I
think, and ghostscript is responsible for generating the correct
printer control langauge. A web search for ghostscript and the
printer model might reveal something useful.
I've not tried to configure a printer on FreeBSD for a long time,
so don't take anything I say very seriously.
In article <vkketk$34iqu$1@dont-email.me>, <bp@www.zefox.net> wrote:
Salvador Mirzo <smirzo@example.com> wrote:
I've been trying to install a Brother HL-L2360DW. I managed to install
<URL:https://openprinting.github.io/printers/>
The name BRWB052162167A6 is the hostname of the printer:
https://www.brother-usa.com/-/media/brother/product-catalog-media/documents/2020/04/28/14/44/hll2360dw_brochure_compact-laser-printer.pdf
No direct help, but IIRC part of the cups install process should have >>forced you to specify what kind of printer you have. If that didn't
happen, I'd suggest de-installing all the print-related ports or
packages and simply starting over. Cups relies on Ghostscript, I
think, and ghostscript is responsible for generating the correct
printer control langauge. A web search for ghostscript and the
printer model might reveal something useful.
I've not tried to configure a printer on FreeBSD for a long time,
so don't take anything I say very seriously.
Possibly significantly easier than you remember, modulo bugs with
Brother's firmware and FreeBSD's CUPS: <URL:https://man.freebsd.org/cgi/man.cgi?query=lpadmin&apropos=0&sektion=0&manpath=FreeBSD+14.2-RELEASE+and+Ports&arch=default&format=html>
# lpadmin -x BRWB052162167A6
# lpadmin -p BRWB052162167A6 -E -v ipp://BRWB052162167A6/ipp/print -m everywhere
I've been trying to install a Brother HL-L2360DW. I managed to install
it at /etc/printcap and use it just fine with lpd. I installed as:
lp:Brother HL-L2360DW:\
:lp=9100@BRWB052162167A6:\
:if=/usr/local/libexec/lf2crlf:\
:sh:sd=/var/spool/output/brother:\
:lf=/var/log/lpd-errs:
The name BRWB052162167A6 is the hostname of the printer:
# ping BRWB052162167A6
PING BRWB052162167A6 (192.168.15.16): 56 data bytes
64 bytes from 192.168.15.16: icmp_seq=0 ttl=255 time=3.197 ms
64 bytes from 192.168.15.16: icmp_seq=1 ttl=255 time=2.978 ms
^C
--- BRWB052162167A6 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.978/3.087/3.197/0.110 ms
This way I can print ASCII documents. Even UTF-8 text documents won't
print out correctly. Apparently the printer is not a PostScript
printer, so we can't send PostScript to it. When I tried, I got
PostScript code out on paper. So I figured /etc/printcap wouldn't
suffice. I then tried CUPS.
This ist a PCL Printer.
see https://docs.freebsd.org/de/books/handbook/printing/#printing-lpd-filters-ps2pcl
Am 27.12.2024 um 15:55 schrieb Matthias Meyser:
This ist a PCL Printer.
see
https://docs.freebsd.org/de/books/handbook/printing/#printing-lpd-filters-ps2pcl
in english :)
https://docs.freebsd.org/en/books/handbook/printing/#printing-lpd-filters-ps2pcl
One program also metioned by the handbook is enscript. It converts text files to PostScript, so I can print text files. But my text files are usually UTF-8 and it seems enscript doesn't support UTF-8 as far as the manual says. So what I am now doing is using iconv to convert to latin1 before invoking enscript. If you'd like to share how you do it, I'd appreciate hearing about.
This installed the printer just fine in CUPS. However, when I try to
print something with it, it seems CUPS won't even send the job to the
printer and annonates an error message in /var/log/cups/access_log:
--8<-------------------------------------------------------->8---
localhost - - [27/Dec/2024:09:31:48 -0300] "POST
/printers/BRWB052162167A6 HTTP/1.1" 200 20810 Print-Job >client-error-document-format-not-supported >--8<-------------------------------------------------------->8---
In article <867c7lfetn.fsf@example.com>,
Salvador Mirzo <smirzo@example.com> wrote:
This installed the printer just fine in CUPS. However, when I try to
print something with it, it seems CUPS won't even send the job to the >>printer and annonates an error message in /var/log/cups/access_log:
--8<-------------------------------------------------------->8---
localhost - - [27/Dec/2024:09:31:48 -0300] "POST
/printers/BRWB052162167A6 HTTP/1.1" 200 20810 Print-Job >>client-error-document-format-not-supported >>--8<-------------------------------------------------------->8---
Looks to me like a bug in FreeBSD's CUPS port.
Rebuild CUPS with ipptool(1) on.
$ ipptool -tv ipp://BRWB052162167A6/ipp/print get-printer-attributes.test
Assuming Get-Printer-Attributes passes, what is document-format-supported?
Matthias Meyser <Meyser@xenet.de> writes:
Am 27.12.2024 um 15:55 schrieb Matthias Meyser:
This ist a PCL Printer.
see
https://docs.freebsd.org/de/books/handbook/printing/#printing-lpd-filters-ps2pcl
in english :)
https://docs.freebsd.org/en/books/handbook/printing/#printing-lpd-filters-ps2pcl
Thank you so much. That allows me to use lpd and it's working. The
handbook test was successful and I just asked Firefox to print a text document using /usr/bin/lpr (using my /etc/printcap entry). It worked!
I would still like to understand what's going on with CUPS, so I will continue the troubleshooting but I'm very happy that I can print just
fine with lpd.
But there's still one thing that I cannot do
that is to print on two sides of the paper using the flip on long edge option. I'm printing on both sides just fine, but no matter what I do
it always comes out with flip on short edge. I wonder if anyone knows anything I could do. My desire nearly 100% of the times is to print two-sided with flip-on-long-edge, so if I could somehow set the printer
to always do this, that'd be right nearly 100%.
*cupsBackSide: "Rotated"
*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
Hi, John! I was missing the package cups-filters-1.28.17_6. After I >installed it, that error vanished and I've been able to print with CUPS
just fine, minus an issue with two-sided print outs (they're all coming
out with the flip long edge option, no matter what I choose).
I have not installed CUPS from the Ports Collection. I pkg-installed
it. To try the ipptool, I think I'd need to compile it and reset up >everything. Maybe I will. Maybe I should be using IPP, but it's not
clear what I'd be gaining exactly.
In article <865xmz46mk.fsf@antartida.xyz>,
Salvador Mirzo <smirzo@example.com> wrote:
Hi, John! I was missing the package cups-filters-1.28.17_6. After I >>installed it, that error vanished and I've been able to print with CUPS >>just fine, minus an issue with two-sided print outs (they're all coming
out with the flip long edge option, no matter what I choose).
I'm fairly certain your printer should not require the CUPS filters and
you should be able to spew PostScript and PDF directly:
$ nc BRWB052162167A6 9100 < example.pdf
Looks to me like a bug in FreeBSD's CUPS port.
Rebuild CUPS with ipptool(1) on.
$ ipptool -tv ipp://BRWB052162167A6/ipp/print get-printer-attributes.test
Assuming Get-Printer-Attributes passes, what is document-format-supported?
I have not installed CUPS from the Ports Collection. I pkg-installed
it. To try the ipptool, I think I'd need to compile it and reset up >>everything. Maybe I will. Maybe I should be using IPP, but it's not
clear what I'd be gaining exactly.
The promise of modern CUPS and modern printers, is to automagically interrogate the printers capabilities and controls without loads of dependencies to create and spew vendor specific print control languages.
I'm curious what ipptool(1) returns for your Brother printer so if you
have bandwidth to download ports and rebuild print/cups package with
ipptool enabled, I would like to see where things have gone sideways.
The handbook walks you thru fetching the ports tree and configuring
and building port package: <URL:https://docs.freebsd.org/en/books/handbook/ports/#ports-using>
Salvador Mirzo <smirzo@example.com> writes:
But there's still one thing that I cannot do
that is to print on two sides of the paper using the flip on long edge
option. I'm printing on both sides just fine, but no matter what I do
it always comes out with flip on short edge. I wonder if anyone knows
anything I could do. My desire nearly 100% of the times is to print
two-sided with flip-on-long-edge, so if I could somehow set the printer
to always do this, that'd be right nearly 100%.
I'm mostly a spectator to this thread with no actual knowledge about the issue, but in perusing your previous article, these stood out:
*cupsBackSide: "Rotated"
*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
Some full-duplex printers print on both sides of the page, same paper
edge "up" for both sides (i.e., like pages in a book), when simply sent consecutive pages of text as if they were individual pages.
In article <865xmz46mk.fsf@antartida.xyz>,
Salvador Mirzo <smirzo@example.com> wrote:
Hi, John! I was missing the package cups-filters-1.28.17_6. After I >>installed it, that error vanished and I've been able to print with CUPS >>just fine, minus an issue with two-sided print outs (they're all coming
out with the flip long edge option, no matter what I choose).
I'm fairly certain your printer should not require the CUPS filters and
you should be able to spew PostScript and PDF directly:
$ nc BRWB052162167A6 9100 < example.pdf
I have not installed CUPS from the Ports Collection. I pkg-installed
it. To try the ipptool, I think I'd need to compile it and reset up >>everything. Maybe I will. Maybe I should be using IPP, but it's not
clear what I'd be gaining exactly.
The promise of modern CUPS and modern printers, is to automagically interrogate the printers capabilities and controls without loads of dependencies to create and spew vendor specific print control languages.
I'm curious what ipptool(1) returns for your Brother printer so if you
have bandwidth to download ports and rebuild print/cups package with
ipptool enabled, I would like to see where things have gone sideways.
The handbook walks you thru fetching the ports tree and configuring
and building port package: <URL:https://docs.freebsd.org/en/books/handbook/ports/#ports-using>
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.
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.
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.
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.
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.
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.
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>
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.
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 03:03:49 |
Calls: | 10,386 |
Calls today: | 1 |
Files: | 14,057 |
Messages: | 6,416,589 |