[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Guide to Printers and Printing


Commands and Control Sequences

Terminfo Database

The terminfo database contains the capabilities and special features of a terminal device, such as cursor positioning, initialization sequences, and key sequences that control specific terminal operations. For supporte d terminals, the control sequence values are predefined in the terminfo database. The control sequences that allow access to the AUX port are:

mc5=Value Instructs the terminal to send all data to the AUX port (Printer ON).
mc4=Value Restores output to the terminal (Printer OFF).

The control sequence values are terminal specific. For example, the printer command sequences for an IBM 3151 terminal are:

mc5=^P^R

mc4=^P^T

In this example, ^P^R refers to the Ctrl-P Ctrl-R key sequence.

Adding Support for Nonsupported Terminals

The control sequences must be added to the terminfo database in the /usr/share/lib/terminfo directory. To add the control sequence values for your terminal, edit the appropriate *.ti file. Then compile th e file using the tic command. Refer to the documentation supplied with your terminal for more information about control sequence values.

The virtual printer database is a series of files that describe the way print requests should be processed, such as the data stream to be delivered to the printer. User-configurable attributes specific to terminal-at tached printers are defined in the virtual printer database and are based upon the asynchronous communications adapter being used.

The virtual printer attributes are defined when the virtual printer is configured. The naming convention for attributes unique to terminal-attached printers is yN, where N is an integer greater than or equal t o 0. The value of y0 is reserved. It designates that the virtual printer queue is configured for a terminal-attached printer and contains the hardware line discipline for the terminal port. The sections that follow detail the adapter-specific virtu al printer attributes for terminal-attached printers.

To change the attribute values on an existing virtual printer, use the Web-based System Manager Devices fast path. You can also use the smit ps_lsvirprt fast path command.

Native, 8-Port, 16-Port, and Third-party Controllers

Native port (S1 or S2), 8-port and 16-port controllers do not provide hardware support for terminal-attached printers and the hardware support for third-party controllers is unknown . As a result, print files must be split into small data blocks. The mc5 control sequence precedes each data block, which is in turn followed by the mc4 control sequence. When the terminal receives the mc5 control sequence, all subseq uent data is routed to the AUX port until an mc4 control sequence is received.

Data blocks sent to the terminal must be kept relatively small. Sending too many characters to the tty at once may cause output to the printer to be mixed with the echo of what is typed during the sending operation. A delay time between data block transmissions must also be established to minimize data reception errors.

Native port, 8-port, 16-port, and third-party controllers have the following virtual printer attributes for specifying block size and delay value:

y1 Indicates the maximum number of characters in a data block.
y2 Indicates the number of microseconds to delay between data block transmissions.

64-Port Controller

The 64-port controller provides hardware support for terminal-attached printers. The 64-port controller has the following virtual printer attribute:

y1 Sets the priority with which printing will be done over terminal activity. The larger the number, the greater the priority the printer has over the terminal.

128-Port Controller

The 128-port controller also provides hardware support for terminal-attached printers. The 128-port controller has the following virtual printer attributes:

y1 Sets the maximum characters per second (CPS) rate at which characters are sent to the print device. The rate should be just below the average print speed for your printer. Consult your printer's documentation for print speed.
y2 Sets the maximum number of print characters the device driver places in the output queue. Reducing this number increases system overhead. Increasing this number delays operator keystroke echo times when the terminal-attached printer is in use.
y3 Sets the device driver estimate of the size of the terminal-attached printer's input buffer. After a period of inactivity, the driver bursts the designated number of characters to the printer. Consult your printer's documentation for input buff er size.

Printer Backend Commands

The piobe command is the normal backend program run by the print spooling subsystem when printing to a locally attached printer device. The piobe comm and is started via the qdaemon process. It determines the data stream it is going to create by reading a flag or querying the virtual printer database. The piobe process then passes the print file through a pipeline of appropriate filters so that it generates the correct data stream. At the end of this pipeline, the filtered file is passed to the pioout device driver interface program.

The pioout command is invoked in a pipeline by the piobe command. For locally attached printers, the pioout command sends the print file to the appro priate printer device driver (for example, /dev/lp1). However, for terminal-attached printers, the print files are sent to the printer via the tty device driver (for example, /dev/tty0), after being modified by data gathered from the terminf o and virtual printer databases. The terminfo database is queried for the mc5 and mc4 terminal control attributes. The virtual printer database is queried for the asynchronous controller-specific attributes.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]