🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.sysadmin
Article #505

Attaching a Lino through ethernet.

#505
From: Fouad_Habboub
Date: Wed, 08 Apr 1992 21:49
123 lines
4367 bytes
A while ago I asked the net on how to attach a lino printer (Printer 60) though  
ethernet to a NeXT and still be able to access it through the print panel. Well  
I got it to work. Special thanks goes to Bernhard Nocker and Alan Marcum. 


The following instructions are specific to Lino Printer 60.

---------------Start here--------------------------
How to I attach a Linotype Printer 60 using TCP/IP and also have it come up in  
the printer panel?

First let seperate the problem into two part: attaching printer using TCP/IP  
and setup to appear in printer panel.

Attaching printer using TCP/IP

First select an IP address and set the printer IP  address to it.   Because I  
initially had the printer connect through the serial port, I simply used tip to  
download the following code:

	serverdict begin 0 exitserver
	statusdict begin
	(YOU.IP.ADDRESS.GOES.HERE) setinternetnumber
	end quit
	
By the way the printer 60 serial port comes setup w/ 9600bps, no parity, 8bit  
,1stop bit. So the tip configuration would be the following:

	lino|connect to lino printer on cua at 9600 baud:\
		:dv=/dev/cua:br#9600:hd:pa=none:el=^C^S^Q^U^D:ie=%$:oe=^D:
		

After you get the IP set, you need to define the printer as host on your  
network.  Using NetInfoManager create at the root domain add a new machine  
under the machine property. Call it  lino  if you will. Under lino you should  
have two properties  name with value lino and ip_address with value  
YOU.IP.ADDRESS.GOES.HERE.

Because the Printer 60 is a periepheral device and is not a host, it cannot  
tell the client its en_address.  Issuing the command arp -s lino  
e:ther:net:add:re:ss loads in the arp table the ethernet address of the Printer  
60.  Perhaps this command should be placed in rc.local. Check things out with  
ping and  tftp.  


Setup to appear in printer panel.


Load the following entry in Netinfo. niload printcap . < tmpfile

Content of tmpfile:
lino: \
	:note=Located In Computer Services Department.:ty=lino: \
	:sd=/usr/spool/lino:sharedTo=/:sharedAs=lino: \
	:lp=/dev/null:lf=/usr/adm/lpd-errs:af=/usr/adm/lp.acct:sf:sb: \
	:if=/usr/lib/transcript/psif: \
	:of=/usr/lib/transcript/ftp-printer/of: \
	:gf=/usr/lib/transcript/psgf:nf=/usr/lib/transcript/psnf: \
	:tf=/usr/lib/transcript/pstf:rf=/usr/lib/transcript/psrf: \
	:vf=/usr/lib/transcript/psvf:cf=/usr/lib/transcript/pscf: \
	:df=/usr/lib/transcript/psdf:

Create the following folder /usr/spool/lino.  Make sure you have the right  
ownership and permission. Check with a defined NeXT printer spooler file

Store the following shell script into /usr/lib/transcript/ftp-printer/of
The script basically gets a spooled file from /usr/spool/lino and tftp to the  
printer. It will try five times pausing 20 seconds between each attempt.  All  
error are redirected to the console.

#!/bin/sh

LIMIT=5
DELAY=20
TEMP=/tmp/.$$.lino

cd /usr/spool/lino
CFILE=`sed -e '1d' lock`
DFILE=`echo $CFILE | sed -e 's/^cf/df/'`

if [ -f "$DFILE" ]
then
 echo "Printing to lino..." > /dev/console
 CONTINUE=YES
 ATTEMPT=0
 while [ "$CONTINUE" = "YES" ]
 do
	ATTEMPT=`expr $ATTEMPT + 1`
	rm $TEMP > /dev/null 2>$1
	echo "put $DFILE
		quit" | tftp lino > $TEMP 2>$1
	if [ -n "`grep Error $TEMP`" ]
	then
	 echo "lino:($ATTEMPT): `cat $TEMP` \c" > /dev/console
	 if [ $ATTEMPT -gt $LIMIT ]
	 then
	   echo "Unable to print file `grep "^%%Title:" $DFILE`" > /dev/console 
	   CONTINUE=NO
	 fi
	 sleep $DELAY
	else
		CONTINUE=NO  
	fi  
done
fi
/bin/rm -rf $TEMP
echo "done printing to lino."
exit 0
#end


Thats all folks,


GOOD LUCK.
--------------------ends here-----------------------

-- 
--------------------------------------------------------
Fouad Habboub
WBGU-TV 27			   Internet: habboub@wbgu.bgsu.edu (NeXTMail)
Bowling Green, OH 43403 UUCP:   ...!osu-cis!bgsuvax!wbgu!habboub
Technical Details
Message-ID: <1992Apr8.214909.516@wbgu.bgsu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!uoft02.utoledo.edu!bgsuvax!wbgu!habboub

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!uoft02.utoledo.edu!bgsuvax!wbgu!habboub
Newsgroups: comp.sys.next.sysadmin
Subject: Attaching a Lino through ethernet.
Message-ID: <1992Apr8.214909.516@wbgu.bgsu.edu>
From: habboub@wbgu.bgsu.edu (Fouad_Habboub)
Date: 8 Apr 92 21:49:09 GMT
Sender: habboub@wbgu.bgsu.edu
Organization: WBGU-TV 27 Bowling Green, Ohio 43403
Keywords: lino
Lines: 123