APPENDIX C
XENIX / UNIX CONFIGURATION

The distribution CD contains SCO UNIX driver. Our drivers also provide transparent printer features that let user to connect local printer from auxiliary port of terminal. The PCI BIOS will assign card number automatically when you use PnP method, otherwise you can use card identifier switch to set your card number. The software installation procedures are shown is the bellows.

C.1 Hardware Configuration

       1. First adapter

Port
Device Name
MODEM Name
Transparent
Printer Name
1
/dev/ttyj11
/dev/ttyJ11
 /dev/lpj11
2
/dev/ttyj12 /dev/ttyJ12  /dev/lpj12
3
/dev/ttyj13 /dev/ttyJ13  /dev/lpj13
4
/dev/ttyj14 /dev/ttyJ14  /dev/lpj14
5
/dev/ttyj15 /dev/ttyJ15  /dev/lpj15
6
/dev/ttyj16 /dev/ttyJ16  /dev/lpj16
7
/dev/ttyj17 /dev/ttyJ17  /dev/lpj17
8
/dev/ttyj18 /dev/ttyJ18  /dev/lpj18

       2. Second Adapter

Port
Device Name
MODEM Name
Transparent
Printer Name
1
/dev/ttyj21
/dev/ttyJ21
 /dev/lpj21
2
/dev/ttyj22 /dev/ttyJ22  /dev/lpj22
3
/dev/ttyj23 /dev/ttyJ23  /dev/lpj23
4
/dev/ttyj24 /dev/ttyJ24  /dev/lpj24
5
/dev/ttyj25 /dev/ttyJ25 /dev/lpj25
6
/dev/ttyj26 /dev/ttyJ26 /dev/lpj26
7
/dev/ttyj27 /dev/ttyJ27 /dev/lpj27
8
/dev/ttyj28 /dev/ttyJ28 /dev/lpj28

       3. Third Adapter

Port
Device Name
MODEM Name
Transparent
Printer Name
1
/dev/ttyj31
/dev/ttyJ31
 /dev/lpj31
2
/dev/ttyj32 /dev/ttyJ32  /dev/lpj32
3
/dev/ttyj33 /dev/ttyJ33  /dev/lpj33
4
/dev/ttyj34 /dev/ttyJ34  /dev/lpj34
5
/dev/ttyj35 /dev/ttyJ35  /dev/lpj35
6
/dev/ttyj36 /dev/ttyJ36  /dev/lpj36
7
/dev/ttyj37 /dev/ttyJ37  /dev/lpj37
8
/dev/ttyj38 /dev/ttyJ38  /dev/lpj38

       4. Fourth Adapter

Port
Device Name
MODEM Name
Transparent
Printer Name
1
/dev/ttyj41
/dev/ttyJ41
 /dev/lpj41
2
/dev/ttyj42 /dev/ttyJ42  /dev/lpj42
3
/dev/ttyj43 /dev/ttyJ43  /dev/lpj43
4
/dev/ttyj44 /dev/ttyJ44  /dev/lpj44
5
/dev/ttyj45 /dev/ttyJ45  /dev/lpj45
6
/dev/ttyj46 /dev/ttyJ46  /dev/lpj46
7
/dev/ttyj47 /dev/ttyJ47  /dev/lpj47
8
/dev/ttyj48 /dev/ttyJ48  /dev/lpj48


C.2 Software Installation
The installation procedure for the device drivers is described as follows:
  1. Login as a root user.
  2. Insert distribution CD (which contains device drivers) into CD-ROM drive d:, then copy the files from the distribution CD to a temporary directory.
#cd /
# doscp d:dc.tz ./dc.tar.Z  
# zcat dc.tar / tar xvfp -

  1. To install device drivers, please type:
#cd /usr/sys/pccom/dc
# ./install

  1. Reboot the system. Now, your new UNIX system that includes device drivers is activated.
  2. Enable each terminal by using the enable command. 
# enable   ttyj11
# enable   ttyj12

  1. Connect each terminal to connector.
NOTE:
  1. If the new system fails to reboot, please boot the original system. When system is boot, please press return key to halt autoboot, then type
:unix.old
  1. To remove device driver from UNIX, please type
a. login as a root user
b. # cd /usr/sys/pccom/dc
c. Remove PCCOM Driver from the kernel
    #./ remove

  1. After installation, please enable each port by enable command and disable port by disable command.
#disable ttyj11
  1. To change baud rate, please update /etc/inittab and /etc/conf/cf.d/init.base files.

C.3 Transparent Printer
The default device names to Transparent Printer(TP) are /dev/lpXYY, that is, the prefix name is changed from "tty" to "lp" but the other "XYY" is the same. e.g. under default device names, the corresponding TTY line of /dev/lpj11 is /dev/ttyj11.

By multiplexing a serial line, there are two sorts of data channels for TTY data(by /dev/ttyXYY) and TP data(by /dev/lpXYY). If the /dev/ttyj11 is used for a TTY, it has to be enabled before you would like to print data through /dev/lpj11 to a printer that connected to the terminal that is operated via /dev/ttyj11.

The channel for TP data that is uni-directional is used to transmit the data from a host to a terminal only. The differentiates of TTY data and TP data in the same serial line is that TP data are encapsulated within a couple of PRINT-ON and PRINT-OFF escape strings that are recognized by connected terminals. The PRINT-ON and PRINT-OFF is defined by connected terminals.

The scheme to multiplex a serial line for these two channels is based on time-division method. The time slices for TTY or TP data are generated according to the entry procedure, polling, in the PCCOM driver, which is periodically called by system clock. The period of system clocks is different among various operating systems, e.g. most UNIXs is 100hz, but SCO Xenix is 50hz.

The interval reserved for TTY or TP channel in the same serial line is important to output TP data to a low-speed printer through high-throughput line from PCCOM cards if there is no flow control XON/XOFF to the serial line.

The lpx command is used to adjust the time interval for TTY or TP data and the TP protocol.


lpx [option] device name

  • option:
-t number: set interval for TTY    
-l number: set interval for Transparent Printer    
-n string: set esc string to turn on printer    
-f string: set esc string to turn off printer    
-T : get interval for TTY    
-L : get interval for Transparent Printer    
-N : get esc_string to turn on printer    
-F : get esc_string to turn off printer

  • device_name : lpXYY
The range of interval reserved for TTY or TP channel is from 1 to maximum integer. The default setting for any /dev/lpXYY is as follows:

Interval for TTY : 50     
Interval for TP : 1     
PRINT - ON escape : ¡§\033[5i¡¨ (ESC[5i)     
PRINT ¡V OFF escape : ¡§\033[4i¡¨ (ECS[4i)

The examples to invoke lpx
  1. Set 60 time slices reserved for /dev/ttyj11
# lpx -t 60 /dev/ttyj11
  1. Set 2 time slices reserved for /dev/lpj11
# lpx ¡V12 /dev/lpj11
  1. Get the time slices reserved for /dev/lpj11
# lpx ¡VL /dev/lpj11
  1. Set PRINT-ON string for /dev/lpj11
# lpx ¡Vn ¡§\033[51¡¨ /dev/lpj11
  1. Get PRINT-OFF string for /dev/lpj11
# lpx ¡VF /dev/lpj11 \033[4i