TITLE : Howto configure an IOLAN and RS6000 for RCP Printing OS LEVEL : AIX 4.x DATE : 15/02/99 VERSION : 1.0 ---------------------------------------------------------------------------- The below example is using an iolan plus running firmware version v4.0 Configure the IOLAN port as follows:- Hardware Flow ctrl Keys Speed [9600 ] Flow ctrl [XON/XOFF] Hot [^@] Intr [^@] Parity [None] Input Flow [Disabled] Quit [^@] Kill [^@] Bit [8] Output Flow [Enabled ] Del [^@] Sess [^@] Stop [1 ] Echo [^@] Break [Disabled] IP Addresses Monitor DSR [No ] Src [ ] Mask [ ] Monitor DCD [No ] Dst [ ] User Options Access Name [Iolan 1 Print ] Keepalive [No ] Access [Remote ] Terminal type [undef ] Rlogin/Telnet [Telnet] Authentication [None ] TERM [ ] Debug options [No ] Mode [Raw ] Video pages [0] Map CR to CR LF [No ] Connection [None ] CLI/Menu [Menu] Hex data [No ] Host [ ] Reset Term [No ] Secure [No ] Remote Port [0 ] MOTD [No ] Local Port [514 ] The iolan 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 iolan port via "rcp". # # The hostname of the iolan that the printer is connected to. # HOST=iolan1 # # The port number that the printer is plugged into on the iolan. # PORT=8 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:tty$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