Use this procedure to configure a RealPort device for a printer. See your operating system documentation for more information on configuring a serial device for a printer and configuring an lp device.
The Digi device and RealPort should be properly installed, configured and functioning before proceeding.
If you are using a printer attached to a terminal on a RealPort, use the corresponding RealPort transparent print device. For example, if your terminal is on /dev/term/a01s then the attached printer would be on /dev/pra01s.
Procedure
- Connect a proper cable between the port and printer.
- Insert either of following commands at the end of the file /etc/rc2.d/S99printer:
cat < /dev/term/a01s > /dev/null &
or
sleep 999999 < /dev/term/a01s &
These commands force the specified port to stay open, thus preserving any "non-sticky" options. This example uses the port /dev/term/a01s. Substitute your port name in the command.
The file S99printer is just an example. This file may need to be created. An "S99" file with a different name may be used instead.
- Insert any other necessary ditty commands at the end of the file /etc/rc2.d/S99printer. The command ditty can be used to change the settings of a port. For additional information on ditty, see Setting TTY Options.
As an example, the following command will set the port a01s to a speed of 38400, disable software flow control, enable forced carrier, and enable hardware flow control on the port:
ditty 38400 forcedcd -ixon -ixany -ixoff ctspace a01s
Note: The Data Carrier Detect (DCD) signal needs to be active (high) on the port for the port to function properly for a printer. The ditty forcedcd option can be used to accomplish this when the DCD signal is not made active through cabling.
- If you are configuring a transparent print device, add ditty commands to set the transparent print parameters. See Transparent Printer Configuration for more information.
- For the ditty command to take effect immediately, enter the command manually at a system root prompt, or reboot the system.
- Configure the device as a printer by running either
sysadm
for standard System V Release 4 systems or scoadmin printer
for SCO UnixWare.
- The printer should be ready for use. To print a file, use the command
lp -d PRINTER_NAME FILE_TO_PRINT
where PRINTER_NAME
is replaced with the name given to the printer in sysadm or scoadmin, and FILE_TO_PRINT
is replaced with the name of the file to print.
-