TITLE : Howto configure an SPLX and RS6000 for RCP Printing OS LEVEL : AIX 4.x DATE : 15/02/99 VERSION : 1.0 ---------------------------------------------------------------------------- The below example is using an SPLX Jest Stream 6000 running firmware version 6.04 i.2 When configuring the SPLX, set the type parameter in virtual circuit to printer. All other setting are as per a terminal. The SPLX 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 iolan which your new printer is connected to. -------------first-line-of-the-shell-script-is-below-this-line------------- #!/bin/sh # Shell script to divert printer output to SPLX port via "rcp". # # The hostname of the iolan that the printer is connected to. # HOST=splx1 # # The port number that the printer is plugged into on the SPLX. # PORT=1 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 iolan while true do rcp $TMP $HOST:mts_p$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