TITLE : Howto configure a SpiderPort and RS6000 for telnet Printing OS LEVEL : AIX 4.x DATE : 15/02/99 VERSION : 1.0 ---------------------------------------------------------------------------- The below example is using an SpiderPort Atom running firmware version v1.2. Configure the spider as follows:- PHYSICAL LINE CHARACTERISTICS Line Line Baud Flow Control BPC/ Trans- Modem Number Type Rate Parity parency Control --------------------------------------------------------------- 7 Slave 9600 NONE XOFF 8/NONE OFF OFF SLAVE LINE CHARACTERISTICS Line Line Modem DTR Idle Port Number Type Control Type Wait Timeout ---------------------------------------------------- 7 Slave - - NONE 2013 The spider may need rebooting after the changes are made. Log into the RS6000 as root. If you are adding more than one printer then you will have to create a null device for each printer. (a) List /dev/null device and note the major and minor numbers, eg cwr_wr_wr_ /dev/null 2, 2 . (b) Use the mknod command to create extra null devices. Each device name has to be unique. In this example a null1 device will be created. mknod /dev/null1 c 2 3 NOTE: Keep the same major number as /dev/null but change the minor number. (c) Change permissions to 666 using the chmod command:- chmod 666 /dev/null1 Run "smit spooler" to create a virtual printer. For example, create a printer queue called "printer1" using null1 device by entering the following replies:- - Select "Add a Print Queue" - Select "File (in /dev directory)" - Select "Other (Select this if your printer type is not listed above)" - Select "Generic Printer" - Enter device name null1 - Enter queue name - printer1 Copy the following backend script to the AIX system. Create different backend scripts for each printer. For this example the backend script will be created in a directory /etc/backends and called "printer1". Edit "printer1" and amend the host name and port number for the spider which your new printer is to connected. -------------first-line-of-the-shell-script-is-below-this-line------------- #!/bin/sh # Shell script to divert printer output to Spider Atom using telnet # # The hostname of the spider that the printer is connected to. # HOST=spider1 # # The tcpip port number in the slave line characteristics # PORT=2013 TMP=/tmp/$HOST$PORT`date +%d%m%y`$$ # # Transfer the file raw. # cat $@ > $TMP # # Add a line feed to the end of each line # #cat $@ | awk '{ print $0 "\n" }' > $TMP # # Add a carriage return to the end on each line # #cat $@ | awk '{ print $0 "\r" }' > $TMP # Check it ran okay if [ $? -ne 0 ] then rm $TMP exit 1 fi # Keep on trying to successfully copy the file across to the spider while true do cat $TMP | telnet $HOST $PORT if [ $? -eq 0 ] then break fi sleep 2 done sleep 2 # Tidy up and exit rm $TMP exit 0 ------------the-last-line-of-the-shell-script-is-above-this-line--------- Change permissions of the shell script to 777 using the chmod command:- chmod 777 /etc/backends/printer1 Edit the file /etc/qconfig and search for the printer device null1. Edit the line which begins with "backend " and add the pathname for the backend script:- null1: file = /dev/null1 header = never trailer = never access = both backend = /etc/backends/printer1 The qdaemon subsystem will need to be restarted, ensure that there are no print jobs in the queues :- stopsrc -s qdaemon startsrc -s qdaemon