Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Nov 2000 15:00:29 -1000
From:      Gary Dunn <gdunng@mac.com>
To:        Tim McMillen <timcm@umich.edu>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Help with printcap file
Message-ID:  <00110115430600.06143@shf102107.hi.pac.army.mil>
In-Reply-To: <Pine.SOL.4.10.10011010026430.24821-100000@gorf.gpcc.itd.umich.edu>
References:  <Pine.SOL.4.10.10011010026430.24821-100000@gorf.gpcc.itd.umich.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 31 Oct 2000, Tim McMillen wrote:
> Hello,
> 
> 	I'm trying to set up printing from my FreeBSD 4.1.1 Release box.
[snip]

> 	Currently the local address of the printer is 192.168.1.100.  By
> telneting to it I find:
> HP JetDirect
> Please type "?" for HELP, or "/" for current settings
> > /
>    ===JetDirect Telnet Configuration===
>         Firmware Rev.   : G.07.20
>         MAC Address     : 00:10:83:77:c1:17
>         Config By       : DHCP
>  
>         IP Address      : 192.168.1.100
>         Subnet Mask     : 255.255.255.0
>         Default Gateway : 192.168.1.1
>         Syslog Server   : Not Specified
>         Idle Timeout    : 90 Seconds
>         Set Cmnty Name  : Not Specified
>         Host Name       : NPI77C117
> 
> And here's what I tried in the printcap file:
> hplj2100:|text|hewlett packard laserjet 2100m:\
>         :lp=:rm=NPI77C117:rp=hplj2100:sd=/var/spool/output/lpd/hplj2100:
> 
> I know that's not right since:
> %lp -d hplj2100 ./foo
> (no output from printer, but I do see lights on the hub blink)
> 
> but is it in the spool?    Files do appear in the spool directory
> %lpq
> lpq: printer not found
> %lpq hplj2100
> lpq: printer not found
> %lpq text
> lpq: printer not found
> 
> Any help would be greatly appreciated.  I tried reading the termcap and
> printcap man pages but they were confusing too.  I bet this is really
> simple once you understand it but I'm pretty confused by the instructions
> because they mostly seem to apply to a printer attached to host computer.

It's a drill to get through, but it works great.

First, to name a printer use -P (capital p) as in lpr -Ptext and lpq -Ptext.
See man lpr.

I recommend static IPs for printers, but if DHCP is working for you then no need
to change it, and the fact that your printer has an IP address (I assume it is
sane) suggests that DHCP is working.

In printcap, put the name of the printer in the rm field and the queue in the rp
field. Originally rm (remote) was a computer and rp (remote printer) a printer
on the computer connected by a serial cable. Now, things have slid down a spot,
with laser printers acting like remote computers - who would have dreamed of
tcp/ip in a printer? So the queue is sort of fake, there is only "one" in the
printer. Different printers use different syntax. Tektronix uses different
queues to help differential text jobs from postscript. Whatever it is, it is
necessary. You must use the value specified in your printer's documentation.

I set up my printers real dumb. I make an entry in /etc/hosts and /etc/ethers.

Here are some entries from my system. I've fiddled a bit with them to make
things clear (heh). Notice the different values for rp.

from /etc/ethers:
00:10:83:57:33:50 masha
00:60:b0:73:17:34 p2003
00:60:b0:77:a1:f5 godzilla

from /etc/hosts (real IP address disguised):
xxx.yyy.zzz.225 godzilla
xxx.yyy.zzz.224 masha
xxx.yyy.zzz.223 p2003

When these are correct you can ping the printer by it's /etc/hosts name.

And here are the matching /etc/printcap entries:

masha|Tektronix 780-3:\
        :lp=:\
        :mx#0:\
        :rm=masha:\
        :rp=PS:\
        :sf:\
        :lf=/var/log/masha.log:\
        :sd=/var/spool/output/masha:
godzilla|HP DeskJet 755 Color Printer, raw mode:\
        :lp=:\
        :mx#0:\
        :rm=godzilla:\
        :rp=raw:\
        :sf:\
        :lf=/var/log/dj755_raw.log:\
        :sd=/var/spool/output/dj755_raw:
20031slj4si|p2003:\
        :lp=:\
        :mx#0:\
        :rm=p2003:\
        :rp=LPT1_PASSTHRU:\
        :sh:\
        :sf:\
        :lf=/var/log/p2003.log:\
        :sd=/var/spool/output/p2003:


-- 
 == Gary Dunn
 == Honolulu
 == Open Slate Project



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?00110115430600.06143>