SUMMARY: Page accounting, Transcript and Network Printer Interfaces

From: janaka@ee.pdx.edu
Date: Sat May 28 1994 - 03:03:13 CDT


[As usual, the blindingly fast responses from sun-managers comes to the
rescue!]

The initial problem was:

> We are debating on putting HP JetDirect network cards on our HP LaserJet III
> laser printers which are currently running on serial ports on SunOS 4.1.3
> boxes.
>
> We charge for printing and use the accounting facility provided by
> Transcript, which currently controls access to our printers. (In
> looking through the sources, it seems that pscomm talks to the printer
> directly, through the serial port, and interrogates it to find out how
> many pages were printed.)
>
> We are trying to find out if the software package for SunOS that we
> have to purchase from HP (something called HP JetDirect Network Interface
> Software for Sun UNIX systems) provides the ability to do this stuff.
> The dealer rep I spoke to couldn't provide any information whatsoever.
>
> Are there any people out there currently using a configuration like
> this (printing to a networked printer) and doing page accounting? Any
> experience with this HP printing combo?
>
> Also, will this procedure migrate well to a Solaris 2 environment?
>
> Any answers would be greatly appreciated.
>

The Reader's Digest version of the responses looked like this.

o For 4.1.x, this was a definite can do. This was being used at
a few sites. There was a pty based filter (hpnptyd) which made
a pty emulate a serial port so that transcript's filter could
think it was still talking directly to the printer. (One person
cautioned that pscomm was dumping core and was waiting for a new
version of this filter.) This filter was provided by HP as part of
the software.

o Some confirmed that the software from HP didn't do any of the page
accounting.

o Some people weren't using the HP software but were using tcpf (ftp-ed
from ftp.cisco.com) to perform the same operation.

o One person said he liked the package but was disappointed in the
support of the product from HP and dealers (accessibility of help and sales
information). I was seeing this, too.

o One person showed at ftp site at HP where the software (which was
being offered to me for $175) was available freely. (Most cool!)

Thanks a bunch, folks! Text of the complete responses follow.

-janaka

::::::::::::::
Date: Fri, 27 May 1994 09:23:45 --100
From: Eckhard.Rueggeberg@ts.go.dlr.de (Eckhard Rueggeberg)
Subject: Re: Page accounting, Transcript and Network Printer Interfaces

I can't say anything about Solaris 2.X (except perhaps that the
printing stuff in general is my greatest objection against it,
everything else I can live with). But for 4.1.X, there is no
problem with the setup you plan : We have it for a year now.
Transcript does the filtering and accounting, and the Software
from HP sets up a pseudo tty (called ttyra) which you can enter
in the /etc/printcap entry. These are our printcap defs :

lw|lp|ps:\
        :lp=/dev/ttyra:sd=/var/spool/lw:\
        :lf=/var/spool/lw/lw-log:af=/var/adm/lw.acct:\
        :rw:fc#0000374:fs#0000003:xc#0:xs#0040040:mx#0:sf:sb:\
        :if=/usr/tran/sparc/lib/psif:\
        :of=/usr/tran/sparc/lib/psof:gf=/usr/tran/sparc/lib/psgf:\
        :nf=/usr/tran/sparc/lib/psnf:tf=/usr/tran/sparc/lib/pstf:\
        :rf=/usr/tran/sparc/lib/psrf:vf=/usr/tran/sparc/lib/psvf:\
        :cf=/usr/tran/sparc/lib/pscf:df=/usr/tran/sparc/lib/psdf:

The corresponding /etc/rc entry is

/usr/lib/hpnp/hpnptyd -m /dev/ptyra -x hp3si

where hp3si is the /etc/hosts name of the printer. But don't expect
tremendous speed-ups in communication : The JetDirect board we have
(1.5 yrs old now) can't feed the data much faster into the printer
than a parallel interface ...

Eckhard Rüggeberg
eckhard@ts.go.dlr.de
::::::::::::::
Date: Fri, 27 May 94 08:39:13 BST
From: mel@maths.aberdeen.ac.uk
Subject: Re: Page accounting, Transcript and Network Printer Interfaces

I haven't got it to work with transcript yet - the pscomm process keeps core dumping.
Although I know it is working elsewhere on campus. I am hopeful that the new version
of the hpnp software (hpnpC02) will make things easier. HP also supply a sol2.3
version of the hpnp software.

 Andrew Mellanby, Computing Officer
 Dept. Math.Sciences and Dept. Geology & Petroleum Geology

::::::::::::::
Date: Fri, 27 May 1994 07:48:47 -0400
From: rob.e.allan@hydro.on.ca (Rob Allan)
Message-Id: <9405271148.AA12090@cliff.fp.nob.hydro.on.ca>
To: janaka@ee.pdx.edu
Subject: Re: Page accounting, Transcript and Network Printer Interfaces

We are using newsprint and it keeps track of this in an accounting file.

------
Rob Allan
Ontario Hydro
700 University Ave. H11 G26
Toronto, Ont. M5G 1X6
Tel. (416) 592 4195 Fax (416) 592 4966
EMail: Rob.E.Allan@hydro.on.ca
::::::::::::::
Date: Fri, 27 May 1994 08:40:58 +0500
From: dwg@rjrt.COM (David W. Griffith)
To: janaka@ee.pdx.edu
Subject: Re: Page accounting, Transcript and Network Printer Interfaces

We use the Jet Direct card and S/W for a HP1200C/PS printer. Don't know if
it does page counts. (We don't really care).

If you buy the CD, it does have versions for SUNOS and SOLARIS. We 're running
it on Solaris 2.3.

David Griffith (dwg@rjrt.com)
::::::::::::::
Date: Fri, 27 May 1994 09:13:37 +0600
From: feldt@phyast.nhn.uoknor.edu (Andy Feldt)
To: janaka@ee.pdx.edu
Subject: Re: Page accounting, Transcript and Network Printer Interfaces

Janaka,

   We are using the HP JetDirect cards and the software HP provides does
not provide any sort of page accounting. It is not a high priority here,
so I have not yet worked on a solution.

Good luck!

Andy Feldt
System Support Programmer
Department of Physics and Astronomy
The University of Oklahoma

::::::::::::::
Date: Fri, 27 May 94 10:32:02 -0400
To: janaka@ee.pdx.edu
Subject: Re: Page accounting, Transcript and Network Printer Interfaces
Cc: stuart@TO.Mobil.COM

> From: janaka@potrzebie.ee.pdx.edu
> To: sun-managers@eecs.nwu.edu
> Subject: Page accounting, Transcript and Network Printer Interfaces
> Date: Thu, 26 May 94 17:47:58 PDT

> We are debating on putting HP JetDirect network cards on our HP LaserJet III
> laser printers which are currently running on serial ports on SunOS 4.1.3
> boxes.

> We charge for printing and use the accounting facility provided by
> Transcript, which currently controls access to our printers. (In
> looking through the sources, it seems that pscomm talks to the printer
> directly, through the serial port, and interrogates it to find out how
> many pages were printed.)

> We are trying to find out if the software package for SunOS that we
> have to purchase from HP (something called HP JetDirect Network Interface
> Software for Sun UNIX systems) provides the ability to do this stuff.
> The dealer rep I spoke to couldn't provide any information whatsoever.

> Are there any people out there currently using a configuration like
> this (printing to a networked printer) and doing page accounting? Any
> experience with this HP printing combo?

> Also, will this procedure migrate well to a Solaris 2 environment?

> Any answers would be greatly appreciated.

> -janaka

We have an HP 1200C/PS ColorJet printer in for demo purposes. It
has a DirectJet network card and we hooked it up to the network.
(At least I think this thing has a JetDirect card - does HP have
other kinds of network cards that speak IP?)

The software for Suns was not included, since this is a demo. I
found that I didn't need it, though. I'm using a freeware program
called tcpf that I ftp-ed from ftp.cisco.com. This program takes
an IP address and TCP port number as arguments and establishes a
tcp connection. It then copies its standard input to the tcp
connection and any input from the tcp connection to its standard
output. I found that just sending Postscript with no special header
or trailer worked just fine for driving my model HP printer. I
wrote a shellscript that I use as an lpd input filter. It sends
a ^T at the end of the job to force the printer to respond; ^T
causes the printer to print its status. This could be modified to
request a page count if you know the proper postscript code to get
this value.

The hardest part was figuring out what TCP port the JetDirect card
was listening on. It was 9099. I figured this out by writing a
script that tried connecting to the printer at port 1, 2, 3, ...
until I got a successful connection.

Here's the lpd input filter I wrote for out deskjet color printer.
The nenscript -z converts text to postscript if the file doesn't
appear to be postscript already (it doesn't start with %!). This
program - I don't remember where I ftp-ed it from. The argument
parsing is included in the script but it currently doesn't use
its arguments for anything.

If you can't get tcpf yourself, let me know and I'll send you a copy.

-stuart

--
Stuart R. Pearlman                                 Stuart_Pearlman@rdr.com
RDR Inc.
On-Contract-To: Mobil Foreign Exchange Inc.        +1 703 846 7052
---------------------------------------------------------------------------
#!/bin/sh -
#
# djcprt - lpd input filter for Deskjet 1200C/PS printer w/ ethernet interface
#
# djcprt is an lpd filter for printing to a DeskJet 1200C/PS printer
# with an ethernet interface.  It handles both postscript or ascii
# input (although it doesn't make alot of sense to send ascii to a
# color printer).
#
# NOTE #1: This script contains control characters in the echo commands.
#          Be careful when editing that you don't delete them.
#
# @(#) $Header: /usr/local/src/sbin/djcprt/RCS/djcprt.sh,v 1.1 1994/04/22 21:42:58 stuart Exp $

PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/local/sbin ; export PATH

# # Substitute the desired hostname (or IP address) and port number below. # HOST=158.23.33.90 PORT=9099

# parse the command line arguments, they get ignored for now

while test $# != 0 do case "$1" in -c) ;; -w*) width=$1 ;; -l*) length=$1 ;; -i*) indent=$1 ;; -x*) width=$1 ;; -y*) length=$1 ;; -n) user=$2 ; shift ;; -n*) user=`expr $1 : '-.\(.*\)'` ;; -h) host=$2 ; shift ;; -h*) host=`expr $1 : '-.\(.*\)'` ;; -*) ;; *) afile=$1 ;; esac shift done

( nenscript -p- -B -Z ; echo -n "") | tcpf -t60 -e -w $HOST $PORT

exit 0 :::::::::::::: Date: Fri, 27 May 94 10:53:33 EST From: gyoung@ccmail.crc.com To: janaka@ee.pdx.edu Subject: Re: Page accounting, Transcript and Network Printer Interfac

Janaka, We are using the HP setup you are thinking about going to, and i havent seen the ability to do page queries to the printer in the package. In fact, i have been royally ticked at the lack of knowledge and general support that i have found from HP on this product. It took me almost 2 hours one day to get in contact with someone who actually KNEW what product i was talking about when i had a problem one day. Finding a reseller who deals in the product took another couple of hours!(Not all resellers deal with the Unix network printer software product line, it seems).

I do like the product, though. The software simply allows a sun to act as a print spooler to a bunch of HP's. The HP's get their boot info from the server. Ethernet transfer is MUCH faster than serial, and i would recommend it if your page count thing could be compromised.

Come to think of it, there is the ability within the HP software to be able to address the printer as a serial device, which would enable you to use transcript in the fashion you wish to. Here it is, i just found the below in a readme. There doesn't seem to be a copyright thing in the README.sun doc so i guess it is OK for me to reproduce this to you guys.

*********** THE FOLLOWING IS A README.sun FILE FROM HP

This file will show you how to set up your Hewlett-Packard Laserjet printer to work with TranScript 3.0 and NeWSprint 2.0 on a Sun SparcStation.

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

Transcript Setup

For the Laserjet II, IID, III, and IIID's

- Create a printcap entry using the TranScript 'mkprinter.sh' utility. The TTY parameter for this command should refer to the device file '/dev/null'

e.g. mkprinter.sh lp /dev/null

- Edit the psint.sh to add/change the following:

* Add the directory '/usr/lib/hpnp' to the PATH statement.

* Replace the statement

comm="$PSCOMM -P ... "

with

comm="hpnpf -x <printer name or IP addr>"

Note: Banner pages will not be generated under this solution.

For the Laserjet IIISi

- Create a printcap entry using the TranScript 'mkprinter.sh' utility. The TTY parameter for this command should point to a pseudo-tty device file.

e.g. mkprinter.sh lp /dev/ttyra

- Start up the pseudo-tty daemon program (hpnptyd). For more information about the hpnptyd program, Please refer to hpnptyd(8C) man page or the TCP/IP Ethernet Network Peripheral Interface Administrators Guide (HP Part No. C2850-90001)

e.g. hpnptyd -x <printer name or IP addr> -m /dev/ptyra -k

Note: The hpnptyd program will need to be started each time the system is powered on. You may want to add the hpnptyd startup command in your /etc/rc.local file.

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

NeWSprint Setup

For the Laserjet II, IID, III, IIID, and IIISi

- Start up the pseudo-tty daemon program (hpnptyd). For more information about the hpnptyd program, Please refer to hpnptyd(8C) man page or the TCP/IP Ethernet Network Peripheral Interface Administrators Guide (HP Part No. C2850-90001)

e.g. hpnptyd -x <printer name or IP addr> -m /dev/ptyra -k

Note: The hpnptyd program will need to be started each time the system is powered on. You may want to add the hpnptyd startup command in your /etc/rc.local file.

- Run the NeWSprint "add_np_printer" command (the information below applies when running add_np_printer on the system the printer is attached to).

Basically, configure the NeWSprint printer to be a "Serial (tty)" printer that uses the the pseudo-tty device suffix matching what the hpnptyd daemon is using. The detailed steps are as follows:

a) When prompted for the printer class, select "HP" if you are using a LaserJet printer WITHOUT PostScript, or select "PostScript" if you are using a LaserJet printer configured with PostScript as the default (or only) language.

b) When prompted if the printer is attached to the local machine, select "y".

c) When prompted for what kind of HP printer you are installing, select the appropriate model: (II/IID/III/IIID/IIISi).

d) When prompted for which of the supported device interfaces you are using, select "Serial (tty)".

e) When asked to confirm installation of "printer" on "Serial (tty) device interface", select "y".

f) When prompted to enter device suffix, enter the two character pseudo-tty device suffix (e.g. "ra" for ttyra) that matches the pseudo-tty device being used by the hpnptyd daemon program for that printer. Although the NeWSprint installation prompt shows a one character tty device suffix, NeWSprint will also accept the two character device suffix.

g) Respond with your selected information when prompted for your printer's printcap name, for whether the printer is the default printer, and for the spooling directory path name.

h) If you encounter font license availability problems consult your NeWSprint documentation.

i) Verify the configuration information and select "y" when prompted to install the NeWSprint printer. NOTE that this prompt does NOT show the actual tty device name being used (it only shows that device type "tty" is being used).

Note: when installing the printer as a "Serial (tty)" device interface, the resulting /etc/printcap entry will contain fields for setting the serial link parameters (i.e. "br", "xc", and "ms"). These printcap fields should not have any effect on the pseudo-tty device used by hpnptyd.

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

*********** END OF README.sun FILE FROM HP

Have Fun,

gyoung@ccmail.crc.com

:::::::::::::: Date: Thu, 26 May 1994 19:51:31 -0500 To: janaka@ee.pdx.edu, sun-managers@eecs.nwu.edu From: Ronald.C.Russell@ag.auburn.edu (Ron.Russell) Subject: Re: Page accounting, Transcript and Network Printer Interfaces Cc: trouble@ee.pdx.edu

HOWDY my overworked peers,

In case you did not see this circulate in January, whilst I was gripping about HP policy to support anything but an OS, here it goes again.

As I understand the current HP policy:

They distribute the software freely via an anonymous ftp site. Furthermore, they used to charge poor sods like myself $199.00 for this gee-whiz=bang SW. after much grumbling over the cost, they finally"SAW the LIGHT" to posting it via anonymous ftp, see below.

Of course they paid for the anon-ftp site by draining mine and other pockets of those who needed this technology early.

EDITORIAL COMMENT: HP distributes this for a fee for all platforms except ms-dos, mac system n, hp-ux, novell, and any other wannabee OS's, except SUNOS. Yeah I am kinda ticked that I had to pay $ 199.00 but they were nice enough to give my university a site-license for the stuff. :-| (read -> sneer, jibe) In defense/defence of HP, the software works well, and I don't mind paying for stuff that works, butttt.........

So if you use this stuff and you find it useful, send 1(one) Internet Dollar to gomers@hp.com and another to dearabby@ag.auburn.edu :)

Of course if you do not have Internet access then you must pay for a tape/cd, but then again, you probably can't see this tip :).

Enjoy,

ron russell network engineer auburn university auburn al 36849

ronald.c.russell@ag.auburn.edu

from an HP executive: > >Ron, > >Some time ago we had a discussion about Hewlett Packard Software for JetDirect >cards not being available from an anonymous ftp site. I explained that it was >something that I have been trying to get accomplished. I wanted to let you know >that we now have this ftp site available and we have a new version of our >JetDirect Software for UNIX available on the ftp site. > >The ftp site is ftp-boi.external.hp.com at ip address 192.6.71.2. It is in the >/pub/printers/laserjet directory, under a directory for the supported >environment (hpux, sunos, solaris22_23). Please feel free to pass this >information on to all the individuals that said they were looking for this. In >addition, please let me know what you think of the new software. This software >is supported by our Customer Support Center at (208) 323-2551. >

---------------- posting as marked to sun-managers----------------------------------------- At 05:47 PM 5/26/94 PDT, janaka@potrzebie.ee.pdx.edu wrote: >We are debating on putting HP JetDirect network cards on our HP LaserJet III >laser printers which are currently running on serial ports on SunOS 4.1.3 >boxes. > >We charge for printing and use the accounting facility provided by >Transcript, which currently controls access to our printers. (In >looking through the sources, it seems that pscomm talks to the printer >directly, through the serial port, and interrogates it to find out how >many pages were printed.) > >We are trying to find out if the software package for SunOS that we >have to purchase from HP (something called HP JetDirect Network Interface >Software for Sun UNIX systems) provides the ability to do this stuff. >The dealer rep I spoke to couldn't provide any information whatsoever. > >Are there any people out there currently using a configuration like >this (printing to a networked printer) and doing page accounting? Any >experience with this HP printing combo? > >Also, will this procedure migrate well to a Solaris 2 environment? > >Any answers would be greatly appreciated. > >-janaka > > Janaka Jayawardena >LOCAL: janaka Systems Manager - Electrical Engineering >INTERNET:janaka@ee.pdx.edu (503)-725-5410 >USNAIL: Portland State University (EE), P.O.Box 751, Portland, OR 97207 >============================================================================= > >



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:02 CDT