Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Dec 1999 12:36:09 -0500
From:      Christopher Michaels <ChrisMic@clientlogic.com>
To:        "'Ronald F. Guilmette'" <rfg@monkeys.com>, freebsd-questions@freebsd.org
Subject:   RE: Help!  Simple printer problem becomes a major documentation b eef.
Message-ID:  <6C37EE640B78D2118D2F00A0C90FCB4401105DF7@site2s1>

next in thread | raw e-mail | index | archive | help
> -----Original Message-----
> From:	Ronald F. Guilmette [SMTP:rfg@monkeys.com]
> Sent:	Wednesday, December 08, 1999 9:59 PM
> To:	freebsd-questions@freebsd.org
> Subject:	Help!  Simple printer problem becomes a major documentation
> beef.
> 
> 
> 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.)
> 
	man 8 lptcontrol

	It turns on 'extended mode'.  Isn't that obvious?!?  (note the
sarcasm).  In actuality I did some digging and couldn't find anything about
"extended mode".  The only thing I can think of is, it's refering to enabled
the extended features of an EPP parallel port as opposed to just using it as
an SPP standard parallel port.  but I'm just guessing.


> 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.
> 
	man 4 ppbus
	man 4 ppc
	man 4 lpt

	All the information you are looking for is in those man pages.
(Yes, I looked before saying this).

> 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?
> 
	look in the above referenced man pages.

> (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??
> 
	look in the above mentioned man pages.  :)

> 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?
> 
	Not sure what you're asking for here?  Different drivers have
different parameters and options.

> 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?
> 
	It should just work "out-of-the-box".  And to your own admission,
you haven't eliminated the possability that it is a hardware related
problem.

> This *shouldn't* require a degree in rocket-science.
> 
	It's doesn't, it requires a doctorate in computer science.  (more
sarcasm)  It really should be as simple as you ask, at least it has been in
my experience.

> 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:
> 
	Um.. you would need to troubleshoot that on your own.  If you know
the printer and the cable work, then that's out.  If you're unsure about the
OS, boot another OS that you are sure of and see if that works.  Verify all
the connections are in place, etc.. etc.. etc..  Just eliminate variable
until you narrow it down to one thing.

	Standard parallel ports are pretty dumb and aren't very verbose to
begin with.

> 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?
> 
	UGH.. you're obsessed with P.S.'s.  hehe.  No idea.  I would assume
that the man page is giving the current state of affairs.

> 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).
> 
	There's no display, or lights, or anthing that would reflect this
state?  (I don't have that specific printer).


	-Chris


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?6C37EE640B78D2118D2F00A0C90FCB4401105DF7>