This Sheet describes the procedure I used to set-up my HP LaserJet 2100 on my FreeBSD machine. Once this setup is completed, FreeBSD can act as a print server (via Samba) for other computers on the local network.
# Parallel port LPT0 and LPT1 (on add-in card) controller ppbus0 controller ppbus1 device ppc0 at isa? port? tty irq 7 device ppc1 at isa? port? tty irq 9 device lpt0 at ppbus0 device lpt1 at ppbus1
See the Cheat Sheet Building a Custom Kernel for the steps needed to recompile your kernel.
# cd /dev
# ./MAKEDEV lpt0
# ./MAKEDEV lpt1
# lptest > /dev/lpt0
# cat test.prn > /dev/lpt0
With this test file, the printer should respond.
Pandora:
# HP LaserJet 2100 Series PCL 6
lp|lj|HP LaserJet 2100 Series PCL 6:\
:lp=/dev/lpt0:sd=/var/spool/output/hplj:\
:lf=/var/log/lpd-errs:sh:mx#0:\
:if=/usr/local/libexec/lpfilter:
Renata:
# HP DesignJet 600 on lpt0
plotter|HP DesignJet 1050C:\
:lp=/dev/lpt0:sd=/var/spool/output/plot:\
:lf=/var/log/lpd-errs:sh:mx#0:
# HP LaserJet 5 on lpt1
lp|lj|HP LaserJet 5:\
:lp=/dev/lpt1:sd=/var/spool/output/hplj:\
:lf=/var/log/lpd-errs:sh:mx#0:\
:if=/usr/local/libexec/lpfilter:
#!/bin/sh
printf "\033&k2G" && cat && printf "\033&l0H" && exit 0
exit 2
Be sure to make this file executable.
lpd_enable="YES" # Run the line printer daemon. lpd_program="/usr/sbin/lpd" # path to lpd, if you want a different one. lpd_flags="" # Flags to lpd (if enabled).
# /usr/sbin/lpd
# cat test.prn | lpr (Defaults to lp, may also use -Plp)
# lptest 40 20 | lpr