Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2013 08:17:16 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        Antonio Olivares <olivares14031@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: connect to a network printer to be able to print
Message-ID:  <alpine.BSF.2.00.1302280809010.95994@mail.fig.ol.no>
In-Reply-To: <CAJ5UdcP2WAapWAiGc7TarZfaJAa4juTZcXoRjgn2jsfyFLpJXw@mail.gmail.com>
References:  <CAJ5UdcP-7_7i8kN_S2i4dG-k6--jFdxPizZG07AuE5aRxwJmsA@mail.gmail.com> <alpine.BSF.2.00.1302271815060.95994@mail.fig.ol.no> <CAJ5UdcP2WAapWAiGc7TarZfaJAa4juTZcXoRjgn2jsfyFLpJXw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--2055831798-1227097059-1362035866=:95994
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT

On Wed, 27 Feb 2013 11:44-0600, Antonio Olivares wrote:

> On Wed, Feb 27, 2013 at 11:23 AM, Trond Endrestøl
> <Trond.Endrestol@fagskolen.gjovik.no> wrote:
> > On Wed, 27 Feb 2013 10:45-0600, Antonio Olivares wrote:
> >
> >> Dear folks,
> >>
> >> I am trying to connect a network printer to be able to print to it.  I
> >> know the make/model of the printer:
> >> HP Color LaserJet CP4520
> >> and the ip address it is on
> >> 10.155.135.3
> >>
> >> I want to use lpd/lpr to be able to print as is specified in
> >> http://www.wonkity.com/~wblock/docs/html/lpdprinting.html
> >>
> >> I read the instructions on the handbook, but it does not specify how
> >> to use the ip address or specify it to print to it.  How can I set
> >> this printer up?
> >> I have setup /etc/printcap with the following:
> >>
> >> lp:\
> >>         :lp=:\
> >>         :sh:\
> >>         :mx#0:\
> >>         :rm=HP_Color_LaserJet_CP4520:\
> >>         :rp=raw:\
> >>         :sd=/var/spool/lpd/lp:\
> >>         :lf=/var/log/lpd-errs:
> >>
> >> but there is no ip adress where the communication can exist.  How can
> >> I do this?  Do I setup the printer with CUPS?  or can it be done with
> >> lpr which is what I use with a local HP 1200 printer, but this one is
> >> a network printer.
> >>
> >> Thanks,
> >>
> >>
> >> Antonio
> >
> > Does the name HP_Color_LaserJet_CP4520 resolve to its IP address?
> 
> it seems it does not :(
> 
> grullahighschool# lpq
> Warning: unable to get address list for remote machine
> HP_Color_LaserJet_CP4520: hostname nor servname provided, or not known
> Warning: no daemon present
> Rank   Owner      Job  Files                                 Total Size
> 1st    olivares   0    (standard input)                      239208 bytes
> You have new mail.
> grullahighschool#
> 
> > What about using a FQDN?
> >
> > Does the name exist in your local DNS zone or does the name exist in
> > the local /etc/hosts file?
> >
> > Either make sure the name is resolvable, or specify the IP address in
> > the /etc/printcap file.
> 
> how do I do this?  any examples out there?
> 
> >
> > Your HP printer should be equipped with a JetDirect card, and you
> > should be able to print a configuration page revealing the current
> > settings.
> >
> > If the settings doesn't match your network, then you need to input the
> > desired settings. I guess this would be possible through the use of
> > the LCD display and the buttons nearby.
> >
> >
> > Best of luck,
> > Trond.
> 
> Dear Trond,
> 
> I have run a test using an example by W. Block on another site:
> 
> http://www.howtofixcomputers.com/forums/printers/printer-without-driver-266629-4.html
> 
> and I have sent data to the printer and it prints:
> 
> # printf "This is a test\r\n\f" | nc 10.155.135.3 9100
> 
> How do I set this up in /etc/printcap, so that this printer can be the one?
> 
> Thanks for your help.  I am close to get it to work.

The rm (remote machine) property in /etc/printcap should be changed to 
10.155.135.3, i.e.

	:rm=10.155.135.3:\

Then it's simply a matter of restarting lpd, i.e.
/etc/rc.d/lpd restart

If you're lucky, your first print job should appear as hardcopy.

Mind you, lpd uses the LPR/LPD protocol running on TCP port 515, not 
the HP JetDirect raw submission on TCP port 9100. Normally the LPD 
protocol would be enabled, but must be reenabled on the printer if 
this is not the case. The aforementioned configuration page should 
list such a setting.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
--2055831798-1227097059-1362035866=:95994--



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