Printing filePro with printer directly attached to FreeBSD server.

Walter Vaughan wvaughan at steelerubber.com
Tue May 3 11:54:27 PDT 2005


I thought that I had notes on this, but it took me a while to trace down all the 
steps needed to print from filePro to a HP LaserJet attached directly to the 
server with an onboard printer port. Perhaps this will help someone later.

OS: FreeBSD 5.4-RC3 ( steps will be identical probably for any 5.X and later)
LP Spooler: Stock LPR
Printer: HP LaserJet 1200 (has both USB and parallel ports)
App: FreeBSD filePro 5.*

While output from reports seemed to print okay, no matter what I did, I always 
seemed to get a extra page, and I kept getting [Interrupt storm detected on 
"irq7: lpt0"; throttling interrupt source] on the console. Changed cable, futzed 
with changing BIOS setting for the onboard port from normal to ECP and all the 
various incantations. Nothing seemed to work, and the console error messages 
were not comforting.

I tried using USB, and still kept getting extra page. Adding in codes to not 
print a burst page seem to not be working.

Part I addresses fixing the printing issue and Part II works on the error 
messages on the console.

I.
==============================================================================

 From the excellent documentation located at...
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/printing-troubleshooting.html

Create a the following file..
==============================
#!/bin/sh
#
# hpif - Simple text input filter for lpd for HP-PCL based printers
# Installed in /usr/local/libexec/hpif
#
# Simply copies stdin to stdout.  Ignores all filter arguments.
# Tells printer to treat LF as CR+LF.  Ejects the page when done.
printf "\033&k2G" && cat && printf "\033&l0H" && exit 0
exit 2
===============================

Since I have (and you might too) have the need to print from either USB or 
regular cable append or modify the following to your /etc/printcap file...
================================
	hp|:lp=/dev/lpt0:sh:sd=/var/spool/lpd/hp:\
		:mx#0:if=/usr/local/libexec/hpif:
	uhp|:lp=/dev/ulpt0:sh:sd=/var/spool/lpd/uhp:\
		:mx#0:if=/usr/local/libexec/hpif:
=================================

Then in filepro printer maintanance you could have the following...

--Name--  --Type--  -Destination Command-  ------------Comment------------
1 video   * nocodes * less                 * View using less
2 file    * nocodes * | cat > /tmp/fpfile$$* Send output to /tmp/fpfile$$
3 usbhp   * hplaser * lpr -Puhp            * USB printer port
4 hp      * hplaser * lpr -Php             * Parallel printer port

Print to your hearts content from filePro


II.
=======================================================================
To fix the irq flooding issue freeBSD 5.X  needs a little help.
One solution involves making changes to the device.hints file.
	1) Make a backup of the /boot/device.hints file.
	2) Make /boot/device.hints writeable (chmod 644 it)
	3) Edit /boot/device.hints as follows:
		search for 	hint.ppc.0.irq="7"
		below it insert hint.ppc.0.flags="0x20"
	4) Put /boot/device.hints back to read-only
That puts it in polling mode that "seems" to work much better with the next
reboot, and gets rid of the console messages.

--
Walter











More information about the Filepro-list mailing list