12.10. Serial Printer

Options used:

The following is a typical printcap for a serial printer:

# Local Serial ASCII printer
lp2
  :lp=/dev/ttya
  :rw
  :cm=Serial printer
  :sd=/var/spool/lpd/lp2
  :stty=9600 -echo -crmod -raw -oddp -evenp pass8 cbreak ixon
  :filter=/usr/local/sbin/lpf
  :mx=0

Let's examine the new options:

  1. A serial port is usually bidirectional, and printers will report errors back to the host computer. The rw flag will cause the printer port to be opened read-write, and the lpd server will report status information.

  2. The stty option specifies the stty(1) flags and line speed needed to configure the serial line (See Serial Printers for details).

  3. The legacy br (bit rate) option can be used to specify the line speed as well.