Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 1996 15:28:24 -0700 (MST)
From:      Tony Apuzzo <apuzzo@alumni.cs.colorado.edu>
To:        Chris Warth <csw@well.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: printer and parallel port problems
Message-ID:  <Pine.SUN.3.91.960110140922.6202A-100000@alumni.cs.colorado.edu>
In-Reply-To: <199601090045.QAA23758@well.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Jan 1996, Chris Warth wrote:
> 
> Greetings, 
> 
> I have a HP LJ-5MP (HP Postscript printer) hooked up to my parallel
> port under FreebSD 2.0.5.  I haven't been able to get this thing to
> print anything but demo pages and I've never seen any response
> (flashing LEDs, etc) that indicates it is even receiving data over the
> parallel port.

I have an HP LJ-5MP myself, and it is working a-ok.  So it is possible

> I've rebooted while the printer is connected to the port, used
> lptcontrol to switch to polled mode (instead of interrupt).  Still
> nothing seems to help.

On my machine, the polled method is definately the way to go.  With
interrupt driven, the data LED on the printer flashes, but the data
rate is something like 1 character per second... not very practical.

> Can anyone suggest a simple test to see if the parallel port is even
> working?  In the meantime I'll try to load windows to see if that can
> talk nicely to the printer.

Look at the output from "dmesg" you should see some lines refering to
lpt0 and/or lpt1.  Verify in your machines CMOS configuration that
your parallel port(s) are enabled and at the correct IO ports and
IRQs.  Also verify that you don't have a sound card or ethernet card
trying to use IRQ 5 (or 7).

Verify that your FreeBSD kernel has lpt support compiled in.  You 
should be able to dump files to the device file (as root) to verify
printer connectivity "cat /etc/rc.local >/dev/lpt0"

If you boot to DOS, you should be able to print straight ASCII via
	"copy config.sys lpt1"

If you can't get the DOS printing to work, you'll be hard pressed to
get the FreeBSD working.

> Also, HP's documentation claims that the LJ-5MP will automatically
> work with either PCL or PostScript.  Does anyone know if that means
> the printer is ready to receive postscript at any time, or does it
> just mean that the drivers they supply for windows and macintosh put
> the printer into the right mode (through some undocumented PCL
> command) before printing?

The printer can take postscript, PCL, or HPGL at any time (actually at
the beginning of a job)

It figures out which is which by looking at the first few bytes of the
input stream.  For example:

The following ASCII text if sent to the printer will draw a box
in the lower left hand corner of the page (note, the actual file
sent to the printer must not have the initial leading spaces
that I introduced for readability):

	%!PS
	100 100 moveto
	200 100 lineto
	200 200 lineto
	100 200 lineto
	100 100 lineto
	stroke
	showpage

The "%!" at the start tells the printer to go into PostScript mode for
the remainder of the print job.

A vanilla ASCII file will "leave" the printer in PCL mode which by default
uses 80 columns by 66 lines courier font printout.

> 
> Thanks in advance for any suggestions.
> 
> -csw
> 
> 

FreeBSD does not have a bi-directional parallel port driver :-(  But I
think you still need a bidirectional cable to keep the printer happy.

I have not contacted HP to get a manual on how to program (configure)
the printer programmatically, so I've been booting to DOS if I need
to change the default resolution, memory status, page tray selection
preference, etc. settings.

If you get that information, please let me (and the rest of the BSD community)
know about it.

If you have not already done so, carefully read the Printing section
of the FreeBSD handbook (http://www.freebsd.org) it is a truly
useful document.  And I'm not just saying that because I'm friends
with the author.  Well, actually I am.

-Tony



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.960110140922.6202A-100000>