Print out disappers on SCO System

I have setup a new printer via a jetdirect on a SCO system. I can ping the printer and see it on the network.
When I print a file using the lpr command the printer queue show up idle and not print out on the printer.
I need help.

Thanks Ashok

Did you set up the printer using the HP print manager, or did you set it up as a remote printer using lpr/lpd

Yes, I setup using the HP network Print Manager and added the printer to the spooler via option 6, "Add printer to spooler".

Ashok

Turn the printer off, and create a print job.
Does the print job show in the output of "lpstat -t"
Is the printer enabled and accepting print jobs, look in the output of "lpstat -t"
Is the jetdirect a single or three port device. TCP port numbers would be 9100, 9101 and 9102 for port 1 2 and 3 respectively.

Yes, I have gone thru that process and yes the job shows up when I do a lpstat -t when the printer is disabled and turned off.
Once enabled and turned on the job does get processes but nothing prints out and the job is gone from the queue.

The Jet Direct is a single port device and I have tested it by printing to it via a windows computer setup as a network printer.

If you are printing to a PCL5 printer, make sure you have carriage returns in your print file, or have ESC&k2G in the beginning of the print file.

It's an Epson LQ-680Pro dot matrix printer. Sorry for the next dumb question but how would I add the "ESC&k2G" into every report/file we print. I tested it with a file by adding "ESC&k2G" as it appears and same thing nothing prints.

A

That is an escape sequence to turn LF into CRLF otherwise a laser printer would print the entire report on the first line, and probably not eject the page, leaving you with the impression that nothing went to the printer.

You could try this for a printer interface.
Create a new printer, local using /dev/null for the device, and dumb for the interface.
Modify the /usr/spool/lp/admins/lp/interfaces/destination to look like the following.

: ${LOCALPATH:=${SPOOLDIR}/bin}          
                                         
F=`/bin/basename $1`                     
                                         
copies=$4                                
shift; shift; shift; shift; shift        
files="$*"                               
i=1                                      
while [ $i -le $copies ]                 
do                                       
        for file in $files               
        do                               
        echo "root\n" >/tmp/$F           
        echo "put $file LPT1" >>/tmp/$F  
        echo "quit" >>/tmp/$F            
        ftp office </tmp/$F              
        done                             
        rm /tmp/$F                       
        i=`expr $i + 1`                  
done                                     
                                         
                                         
exit 0                                   

Where 'office' is the IP/hostname of the printer, and LPT1 is the queue name of the jetdirect.

When I originally added the printer, it created the following files the
/usr/spool/lp/admins/lp/interfaces/corpitlbl

 
MODEL=`basename $0`
REALMODEL=`echo $0 | sed -e "s%$MODEL%model.orig/$MODEL%"`
#
# This name may be initialized when the script is
# installed in the spooler.  If not, use the name
# of this script ($MODEL) as the peripheral to contact.
#
PERIPH=
if [ "$PERIPH" = "" ]
then
 PERIPH=$MODEL
fi
LOG=/tmp/$PERIPH.$$
HPNPF=/usr/lib/hpnp/hpnpf
LPLOG=/tmp/hpnpf.$$
LOGTRIES=5
echo "$1\t$REALMODEL | $HPNPF -x $PERIPH" >> $LPLOG
#
# Remove the log file if job is cancelled
# or the scheduler is shutdown.
#
trap "rm -f $LOG $LPLOG; trap 15;kill -15 0;exit 0" 15
ERRORLOGS=0
while :
do
    #
    # Save the stderr messages in a temporary log file
    # and discard stdout which is the peripheral output.
    #
    rm -f $LOG
    if $REALMODEL "$@" | $HPNPF -x $PERIPH 2> $LOG > /dev/null
    then
 #
 # If the transfer is successful, remove
 # the log file and exit.
 #
 rm -f $LOG $LPLOG
 exit 0
    else
 #
 # Added the request ID to the stderr message
 # and store it in the lp log file.
 #
 # Only record the first $LOGTRIES errors.  If
 # the spooler gets in a loop retrying a job, the
 # disk won't fill up with spooler log error messages.
 #
 if test -s $LOG -a $ERRORLOGS -lt $LOGTRIES
 then
     echo "$1\t`cat $LOG`" >> $LPLOG
     ERRORLOGS=`expr $ERRORLOGS + 1`
 fi
 if test $ERRORLOGS -eq $LOGTRIES
 then
     echo "$1\t$LOGTRIES errors logged for $1; errors no longer logged" >> $LPLOG
     ERRORLOGS=`expr $ERRORLOGS + 1`
 fi
    fi
    if [ ! -s $LPLOG ]
    then
 rm -f $LPLOG
    fi
    sleep 10
done

/usr/spool/lp/admins/lp/interfaces/model.orig/corpitlbl

 
#ident "@(#)lp:model/dumb 1.3.1.2"
# lp interface for dumb line printer
#
x="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
#Set up some global variables.
: ${SPOOLDIR:=/usr/spool/lp}
: ${LOCALPATH:=${SPOOLDIR}/bin}
#Set up the default filter.
if [  -x "${LOCALPATH}/lp.cat" ]
then
 LPCAT="${LOCALPATH}/lp.cat 0"
else
 LPCAT="cat"
fi
#If we are not using a filter, use the default one.
if [ -z "${FILTER}" ]
then
 FILTER="${LPCAT}"
fi
if [ -x "${LOCALPATH}/drain.output" ]
then
 DRAIN="${LOCALPATH}/drain.output 1"
else
 DRAIN=
fi 
nobanner="no"
if [ -z "${BANNERS}" ]
then
 nhead=1
else
 nhead=${BANNERS}
fi
for i in $5
do
 case "${i}" in
 nobanner )
  nobanner="yes"
  ;;
 esac
done
if [ "no" = "${nobanner}" ]
then
 while [ $nhead -gt 0 ]
 do
  echo "\014\c"
  echo "$x\n$x\n$x\n$x\n"
  banner "$2"
  echo "\n"
  user=`grep "^$2:" /etc/passwd | line | cut -d: -f5`
  if [ -n "$user" ]
  then
   echo "User: $user\n"
  else
   echo "\n"
  fi
  echo "Request id: $1    Printer: `basename $0`\n"
  date
  echo "\n"
  if [ -n "$3" ]
  then
   banner $3
  fi
  nhead=`expr $nhead - 1`
 done
fi
copies=$4
echo "\014\c"
shift; shift; shift; shift; shift
files="$*"
i=1
while [ $i -le $copies ]
do
 for file in $files
 do
  0<${file} eval ${FILTER} 2>&1
  echo "\014\c"
 done
 i=`expr $i + 1`
done
if [ "no" = "${nobanner}" ]
then
 echo "$x\n$x\n$x\n$x\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
 echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n$x\n$x\n$x\n$x"
 echo "$x\n$x\n$x\n$x\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
 echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
 echo "$x\n$x\n$x\n$x\n$x\n$x\n$x\n$x\n"
fi
#Draining characters might be necessary.
${DRAIN}
exit 0

So I'm not sure which file to add to and where in the file.

Thanks for you help.

Just create a new local printer, not a HP network printer, then replace the portion of the interface file.

Will not be at the clients site until Tuesday, will try it then.

Thanks

hello
please
I have the same problem and I wonder if you already solved. How did you do?
thanks

Edgar,
Start a new thread and post some specifics about the hardware.

Jack