Default printer port characteristics
The default characteristics applied by the standard interface program are listed in the following table.
Default | Description |
---|---|
9600 | 9600 baud rate |
cs8 | 8-bit bytes |
-cstopb | 1 stop bit per byte |
-parenb | No parity generation |
ixon | Enable XON/XOFF flow control |
-ixany | Allow only XON to restart output |
opost | Postprocess data stream as listed below: |
-olcuc | Do not map lower case to upper case |
onlcr | Map linefeed into carriage return/linefeed |
-ocrnl | Do not map carriage return into linefeed |
-onocr | Output carriage returns even at column 0 |
nl0 | No delay after linefeeds |
cr0 | No delay after carriage returns |
tab0 | No delay after tabs |
bs0 | No delay after backspaces |
vt0 | No delay after vertical tabs |
ff0 | No delay after form feeds |
You may find that the default characteristics are sufficient for your printers. However, printers vary enough that you may have to set different characteristics. See the stty command for a complete list of characteristics.
If you have a printer that requires printer port characteristics other than those handled by the stty program, you will have to customize the interface program. See Printer interface scripts for help.
When you add a new printer, you may specify an additional list of port characteristics. The list you provide will be applied after the default list so that you do not need to include in your list items that you do not want to change. Specify the additional list as follows:
/usr/sbin/lpadmin -p printer-name -o "stty='stty-option-list'"
Note that both the double quotation and single quotation marks are needed if you give more than one item in the stty-option-list.
Suppose your printer is to be used for printing graphical data, where linefeed characters should be output alone, without an added carriage return. You would enter the following command:
/usr/sbin/lpadmin -p printer-name -o "stty=-onlcr"
Note that the single quotation marks are omitted because there is only one item in the list.
As another example, suppose your printer requires odd parity for data sent to it. You would enter the following command:
/usr/sbin/lpadmin -p printer-name -o "stty='parenb parodd cs7'"