Configuring a Device for a Printer

Use the following procedure to configure a RealPort device for a printer. 

Note: The PortServer and RealPort should be properly installed, configured and functioning before connecting a printer.

Procedure

  1. Connect a proper cable between the port and printer. These are common EIA-232 cables:

    Cable

    Flow Control Compatibility

    RJ-45/RJ-11 3-pin Terminal/Printer Cable Software Only (ixon/ixoff)
    DB-25 3-pin Terminal/Printer Cable Software Only (ixon/ixoff)
    RJ-45 4-pin Terminal/Printer Cable Software (ixon/ixoff) or Hardware (ready/busy)
    DB-25 4-pin Terminal/Printer Cable Software (ixon/ixoff) or Hardware (ready/busy)
  2. Set the port to dev=prn on the PortServer by entering this command at a PortServer root prompt:

    set dev port=prn ra=12

    This example sets dev=prn for port 12 of a PortServer.

  3. If you are using 8-pin RJ-45 cabling from the PortServer to the printer, set the port to altpin=on by entering this command at a PortServer root prompt:

    set port altpin=on ra=12

    This example sets altpin=on for port 12 of a PortServer.

  4. From a root prompt run sysadm and choose Device, Printer, Devices, and then Add. Enter the requested information when prompted. For connection type choose Local /dev/tty, /dev/lp, or /dev/parallel. Normally you can answer yes to "Quick Add using default values?"; if the default values are not appropriate you can later choose Modify to change the defaults, including stty settings. For device, enter /dev/ttyNN for for a printer directly connected to a PortServer serial port, or enter /dev/tty-N-Mp for a printer connected to a terminal on port tty-N-M. (Replace NN, N and M with the appropriate numbers.)
  5. When you have completed the Add process, the printer should be ready for use. To print a file, use the command

    lp -d [printer_name] [file_to_print]

  6. If neither your cable nor printer set carrier, you will need to configure the printer port to assume it has carrier with this command:

    stty-ncxa forcedcd ttyNN