set up of hp laserjet 2200dn with Jetdirect 610N on network

Polytropon freebsd at edvax.de
Tue Dec 8 18:31:58 UTC 2009


On Tue, 8 Dec 2009 11:11:17 +0000, David Southwell <david at vizion2000.net> wrote:
> I really do not mind which facility to use provided I get the results!!! 
> <chuckles>. I do need to use as many of the printer features as possible.
> I have  enable the following:
>       IPP Printing     : Enabled
>       FTP Printing     : Enabled
>       LPD Printing     : Enabled
>       9100 Printing    : Enabled
>       SLP Config       : Enabled
>       EWS Config       : Enabled

If you already have LPD printing enabled in your printer,
your computer's LPD subsystem should be able to hand the
data over to the printer.

For example, you can configure APSFILTER (a printer filter,
similar to CUPS, but without the browser games and tons of
dependencies) to create output for your printer. This depends
on what your printer's language is. If it's already the
standard, which is PS (Postscript), you don't need a filter
at all, simply because PS is the default output format for
printing. If it is PCL, you can easily setup APSFILTER
(through its dialog driven install program) to output in
form of PCL. Instead of specifying a local connection for
the printer, you simply give its IP or name (if, for example,
you have it in /etc/hosts). It's quite easy. If you then
run lpr, lpq or lprm, inquiries and actions will be processed
on the printer (by his lpd implementation).

I'll share my working configuration for a HP Laserjet 4000
including duplexer.

I've setup the printer name "Laserjet" in /etc/csh.cshrc:

	setenv PRINTER Laserjet

Now all lp* command default to this printer name, instead
the need of specifying -P<printer> or using "lp", the default.

After installing apsfilter, I've run the setup program:

	# /usr/local/share/apsfilter/SETUP

and configured the printer as needed. Note that if you don't
find your specific model, you can choose a compatible one.

The file SETUP.cfg contains:

	INTERFACE='parallel'
	DEVICE='/dev/lpt0'

For your network printer, you would have different settings
here. As I mentioned, those can be interactively set by the
setup program. You will probably see something like

	rm='192.168.200.100'
	rp='raw'

in this file.

This created the directory /usr/local/etc/apsfilter/Laserjet
with a file apsfilterrc, which I modified to run the duplexer
by default. (If I really intend to NOT use it, I switch it
off with the printer's controls.)

GS_FEATURES='-q -dBATCH -dFIXEDMEDIA -dPARANOIDSAFER -dQUIET 
	-dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs 
	-sDeviceManufacturer="HEWLETT-PACKARD" 
	-sDeviceModel="HP LaserJet" 
	-dDuplex=true 
	-dIjsUseOutputFD -sPAPERSIZE=a4 -r600'
DUPLEX=duplex
BINDING=long

Keep in mind that those settings have to be on one line, I
just broke them up for better readability here.

You can, by the way, easily setup two printers, one for duplex
and one for no duplex, e. g. Laserjet and Laserjet-nodup. Both
have the same settings, but differ in the GS_FEATURES line,
e. g.

GS_FEATURES='-q -dBATCH -dFIXEDMEDIA -dPARANOIDSAFER -dQUIET 
	-dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs 
	-sDeviceManufacturer="HEWLETT-PACKARD" 
	-sDeviceModel="HP LaserJet" 
	-dIjsUseOutputFD -sPAPERSIZE=a4 -r600'

See the -dDuplex=true is missing, so no duplex here.

Finally, the APSFILTER setup program will adjust the system
file /etc/printcap, which now contains an entry for the new
printer called "Laserjet", e. g.

	Laserjet|ljet4d;r=600x600;q=high;c=full;p=a4;m=auto:\
	    :lp=/dev/lpt0:\
	    :if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\
	    :sd=/var/spool/lpd/Laserjet:\
	    :lf=/var/spool/lpd/Laserjet/log:\
	    :af=/var/spool/lpd/Laserjet/acct:\
	    :mx#0:\
	    :sh:

Again, for a network printer you would see rm= and rp= statements
in this file, but not the lp= statement.

If you've setup everything correctly, you should be able to:

	% lpq
	no entries
	% lpr /etc/rc.conf
	% lpq
	Laserjet is ready and printing
	Rank   Owner   Job   Files          Total Size
	1st    poly    483   /etc/rc.conf   2050 bytes
	% lprm -
	dfA483blahblah dequeued
	cfA483blahblah dequeued

Of course, you will be able to print from any application
now. Even piping to lpr is possible, e. g.

	% grep "bla" /some/files* | lpr

Note that programs like Gimp require you to setup the printer
again (in Gutenprint); you'll possibly have to set format and
duplex and other things.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list