Sending tray code to hp

John Sica john at chrismanncomputer.com
Tue Mar 2 11:49:03 PST 2010


I use the hp printer manager program to install the printer and choose
the HPLaserjet model.  I then copy the netcat script over script in
../interfaces that starts something like the small paste below.
======================
#!/bin/sh
YOUR_PRINTER_OR_IP="192.168.0.90"
PORT=9100
#
#       @(#) hpnp.model 62.2 97/03/03
#
======================
and contains these lines somewhere in the middle of the script
=======================
PERIPH=
if [ "$PERIPH" = "" ]
then
        PERIPH=$MODEL
fi
LOG=/tmp/$PERIPH.$$
HPNPF=/usr/bin/netcat
LPLOG=/tmp/hpnpf.$$
LOGTRIES=5

echo "$1\t$REALMODEL | $HPNPF -x $PERIPH" >> $LPLOG
========================
I assume this uses the model chosen which now resides in ../model.orig

I started using netcat several years ago to solve problems that I
couldn't fix by just removing and installing the same printer with the
hp printer manager program.

Netcat almost always works, except printing long files over the internet.

Thanks for responding,

John



Jean-Pierre A. Radley wrote:
> John Sica propounded (on Tue, Mar 02, 2010 at 07:14:23AM -0700):
> | I need to send a tray selection code to an HP printer for specific users 
> | (determined by login account).  The printer name is already set in a 
> | variable that filepro gets (GETENV) for PCs in this department, 
> | determined by IP address. 
> | 
> | The login needs to be able to change this printer destination again so 
> | that all jobs send the tray 2 code (which is not the default tray) 
> | before the jobs print.  
> | 
> | Every print job sends an overlay to the printer, then prints the job.  
> | Each job is 3 pages, and the overlay gets resent after each  page.  I 
> | know sending the overlay every page is extra work, but everything prints 
> | fast anyway.
> | 
> | My thought is to create a new printer who's interface program embeds the 
> | tray 2 code (^[&l1H) , then have this new printer set in the environment 
> | at login.
> | 
> | I don't know how to embed this code in the interface script, which now 
> | all use netcat in the interface script (sco unix 5.05).
> | 
> | My other thought is to use the new filepro printer name  (which is the 
> | same name as the unix printer name), to have the tray 3 code initialize 
> | it.  I'm not sure how to do this either.
> | 
> | A suggestion either way would be appreciated.
>
> What model script are you using?
>
>   




More information about the Filepro-list mailing list