Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Dec 1999 18:59:21 -0800
From:      "Ronald F. Guilmette" <rfg@monkeys.com>
To:        freebsd-questions@freebsd.org
Subject:   Help!  Simple printer problem becomes a major documentation beef.
Message-ID:  <3068.944708361@monkeys.com>

next in thread | raw e-mail | index | archive | help

Read this whole message.  It's not about what you think its about.

--------------------------------------

Here's my first-order problem:

My printer doesn't work.

I mean the printer *does* work.  I know cuz it works just find on Linux.
(The printer and the cable itself are just fine and dandy.)

I have two systems here... one running Linux and another running FreeBSD.
They are both dedicated to me and me alone.

Because they are dedicated, I never bother with niceties like using the
line printer spooler.  My past experience tell me that its just too much
of a hassle to THAT all get setup and configured properly, so I *never*
bother with it.  I just don't need it.  I only print documents on rare
occasions anyway.

So I have gotten in the habit (on my old Linux system) of simply cat'ing
whatever Postscript file I want to print to the parallel port device
file (i.e. /dev/lp0 on Linux or /dev/lpt0 on FreeBSD).  This *does* work
just fine on Linux, in part because my Printer happens to be an HP Laserjet
5MP, which speaks Postscript.  (If you want to print a Postscript file,
experience shows that it really helps a lot if you have a Postscript-
capable printer. :-)

But cat'ing Postscript files directly to /dev/lpt0 on FreeBSD 3.3 has
only worked for me intermittently, even at the best of times, and now
it doesn't seem to be working at all, period.

Earlier, a coupel fo weeks ago, I had convinced myself that I needed
to do `lptcontrol -e' in order to make my printer work (on FreeBSD)
but now, *even that* doesn't seem to do the trick, and now, when I cat
files to /dev/lpt0, the printer just sits and stares at me.  It doesn't
even give any indication that it is even receiving any characters.  No
blinkin' lights, no pages printed, no nuttin'.

Now granted, I've recently been diddling things inside that case of
this system, e.g. swapping drives, putting in a new and bigger fan, etc.,
and *maybe* I somehow knocked loose a connector related to the parallel
port or something, but that seems unlikely.  It seems far more likely
that I just don't know what the hell I'm doing when it comes to
properly setting up and configuring a standard sort of PeeCee parallel
port on FreeBSD.  (I sure as hell don't understand exactly what the
`lptcontrol -e' command actually does on, for example, the plain vanilla
PeeCee hardware that I have.)

OK, so the first thing I try to do is to educate myself, and I start
reading man pages.  That leads me to look closely at the config file
that I used to generate the kernel I am using now.  Specifically,
I'm lookup at the entries relating to the things called `ppbus' and
`ppc0' and `lpt0'.  And I'm reading whatever little documentation of
these things is present in the LINT file, which is to say not bloody
much.

So here is my first-order complaint:  Please excuse my abundant ignorance,
but just where the blazes are all of these extra little doo-dads that are
tacked onto the end of the `device' lines documented anyway?  I guess
that I can figure out `irq NN' and `iomem 0xNNNNN' and `port 0xNNN' for
myself, but what the heck is all of this other stuff?  What does the
`tty' modifer do?  What exactly does `isa?' mean?  What does the `disable'
modifier do?

(This stuff has always been rather opaque to me, but now, like it or not,
I have to start understanding ALL of the specifics of kernel config file
DEVICE lines.)

Also, in the specific case of `device ppc0' what the heck does the
`flags 0x40' modifier do??  The man page for `ppc' only describes
meanings for bit flags 0x1 0x2 0x4 and 0x8.  So where does the 0x40
come from and what the heck does it mean??

I scrounged around for awhile and tried to answer these questions for
myself, but all I found was a 6-year-old paper titled ``Building 4.4BSD
Kernels with Config' (which it would have been nice if the config(8) man
page had given me the URL for, rather than making me search for it).
Unfortunately, the kernel config file syntax that is described in that
document *clearly* doesn't agree at all with the *current* config file
syntax that is understood by the current FreeBSD kernel config(8) program.

OK, so where is the *current* (FreeBSD) config file syntax documented?

I know that I probably shouldn't but I just gotta say that this whole
thing really does kinda tick me off.  I mean I'm really not TRYING to
be ignorant.  I just am.  And the available documentation (including
the FreeBSD Handbook... which contains very little info about parallel
ports, and even less *up-to-date* info about kernel configuration for
parallel ports) isn't helping.

I mean geeezzz!  I only want to cat a bleedin' Postscript file to my
bleedin' Postscript printer fer cryin' out loud!  Why can't I just do
that?  Why does life have to be so complicated?  Why can Linux, straight-
out-of-the-box, do this but FreeBSD (with a mostly GENERIC kernel) can't?

This *shouldn't* require a degree in rocket-science.

P.S.  In the example of the `device ppc0' line shown in the kernel
LINT file, that line has the `tty' modifier on it, whereas in the
GENERIC kernel config file... which I based *my* kernel config file
on... that `tty' modifier is instead replaced with a `net' modifier.
If this is what is causing all of my parallel port problems (because
I have `net' rather than ``tty' on my ppc0 device line), then I gotta
say that whoever picked the default of `net' for the GENERIC kernel
maybe needs to think again about how parallel ports are most commonly
used, i.e. NOT as networking devices.

P.P.S.  Let's suppose, just for the sake of argument, that there _is_
something wrong with the parallel port stuff inside of the case of
this PeeCee... i.e. the one running FreeBSD.  Other than the fact that
I can't get stuff to print, how am I supposed to know that?  Can the
parallel port driver be configured to provide extra verbose kernel log
debugging info to help me get to the bottom of this?  Right now, it cer-
tainly seems to be keeping a lot of potentially useful information to
itself.  For example, the ppc(4) man page says that the driver supports
4 different types of parallel port chips, but the boot-time messages
it produces don't even say which type of parallel port chip it found
to be present in my system!  All it says at boot time is:

ppc0 at 0x378 irq 7 flags 0x40 on isa
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
lpt0: <generic printer> on ppbus 0
lpt0: Interrupt-driven port

Not very chatty, is it?

P.P.P.S.  The FreeBSD handbook (at www.freebsd.org) says that *bi-directional*
communication over the parallel port... which might be useful for debugging
problems, *especially* with a Postscript printer... isn't supported ``yet''.
Is that information still true?  If so, when will bi-directional communica-
tions over the parallel port be supported?

I *really* would like to see any error messages that my printer might be
trying to send back to the PeeCee.

I mean who knows?  Maybe the printer is sitting there desperately trying
to say ``buy toner'' or something simple like that (but I don't think
that it is).


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3068.944708361>