From owner-freebsd-questions@freebsd.org Sun May 3 18:47:11 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E65AA2E536B for ; Sun, 3 May 2020 18:47:11 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49FZjC2CZmz4441 for ; Sun, 3 May 2020 18:47:10 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=8ofUUbiIBZAqTEvyP031E7gKKM2Xue1HCZrHfiQRzE4=; b=R4ZxexDm6Kr0Cxaf7rwmznDtjD aBzeUdpZ95qoRTvujXUIxu3+wi2cBih8zuH4TJ+XUX5/4BinRciu42ud9uBPS/zFJJPuy3z0YTvv7 NxOqJmf5ODC0Qies7qcO3SAPBVe4cvcf6W0TKDRhddlSjaLtk6w9AJPFersoI3qYtjj4=; Received: from vas by admin.sibptus.ru with local (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jVJdt-000F16-Qf; Mon, 04 May 2020 01:47:09 +0700 Date: Mon, 4 May 2020 01:47:09 +0700 From: Victor Sudakov To: Polytropon Cc: freebsd-questions@freebsd.org Subject: Re: Brother HL-L2340D printer and lpd? Message-ID: <20200503184709.GA52059@admin.sibptus.ru> References: <20200503171259.GA48627@admin.sibptus.ru> <20200503192444.2d700440.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: <20200503192444.2d700440.freebsd@edvax.de> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 X-Rspamd-Queue-Id: 49FZjC2CZmz4441 X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=R4ZxexDm; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-7.32 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[sibptus.ru:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-3.22)[ip: (-9.89), ipnet: 2001:19f0:5000::/38(-4.94), asn: 20473(-1.21), country: US(-0.05)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2020 18:47:12 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Polytropon wrote: > On Mon, 4 May 2020 00:12:59 +0700, Victor Sudakov wrote: > > Dear Colleagues, > >=20 > > I'm trying to use a Brother HL-L2340D printer as a simple networked > > line printer with lpd. I've successfully used HP and Canon printers like > > that with a simple printcap like this: > >=20 > > # by VAS > > lp|Brother HL-L2340D series:\ > > :sh:\ > > :rp=3DTEXT_P1:\ > > :rm=3D192.168.1.74:sd=3D/var/spool/output/lpd1:lf=3D/var/log/lp= d-errs: > >=20 > > but the story with Brother HL-L2340D is different. When fed some input= =20 > > with "lptest |lpr", it just spits out 3 empty pages. I've never seen > > anything like that before. >=20 > It's possible that your previous printers could understand > regular (unformatted) ASCII text, but the new one doesn't. I've never seen a network printserver (and I've seen a few) which would not understand plain ASCII text. I did not even imagine that such an abomination is at all possible. It's true, I've heard about GDI winprinters with LPT interfaces, but a networked printer?=20 >=20 > > I'm wondering if someone has this printer and made it work as a line > > printer. > >=20 > > From the specification at > > https://support.brother.com/g/b/spec.aspx?c=3Dus&lang=3Den&prod=3Dhll23= 40dw_us_eu_as > > it should support LPD. >=20 > It's not a matter of supporting LPD - it's the question which > printer language the printer can process. The default output > format for programs is PS. According to the above specification, > the printer does not understand PS. However, it supports PCL, > and tools like gs (GhostScript) should be able to convert PS > to PCL. This is what you need to send to the printer. Indeed, it probably does not understand PostScript, though it does have a PostScript queue for some reason. But what's the point of running an LPD server on port 515/tcp and not understanding ASCII text? LPD is an acronym of "Line Printer Daemon" BTW. The text queue is here: https://imgur.com/upHVJ2g.png >=20 > I assume you're not using CUPS? In this case, a PPD file for > this printer would probably be the easiest thing, but you can > get around using CUPS of course. No, I don't use CUPS, I think it's a monster. >=20 > Maybe this example can help: >=20 > First verify that the printer really understands PCL. You can > use nc (netcat) to send it some data directly. If it works, > instantiate a simple printer filter in /etc/printcap, for example: Could you please generate a small one-page PCL file for me so that I could test it? I suppose I should netcat it to the 9100 (raw) port, right? --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJerxGtAAoJEA2k8lmbXsY0WLMH/3tfUqdeOAWYi+h0nQEMMwxG X/DI2rq4BIiVPcgQDw33qLQwXj+0E4/x8prLf54gIzIFDwNRXI60Mu6XD/+T5Aa2 H/mvQ91578KO+bhIAM5KQnuHELhUSQFxCb4vf3cGfnNRTwfKm2d20vt+kRXmR2PD /2Zzotevr28AHQQ9HQOOeYe4deZk4xFoFTXPmjlHDST3Avdc/p2ykFo+GRnTvole b/2MVDVuGhLIDPuEVGtULmgyMHkMx+byx9G72sqPedYMC+wZAqTU8XXWVKpby/Vn Y9eY3N67EUkP4Lw0tGzg2ZJ8RTVn6egtXAZ/h41EtBgKN0fDBn9pGo/pXSdj7Vc= =Un6/ -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE--