Configuring HP-UX For Peripherals

210 Chapter8
Configuring Printers and Plotters
Configuring a Printer Using HP-UX Commands
line printer name.
Step 1. Execute ioscan -fn -C tty to identify the device file currently
associated with the port. Note in the following excerpted output, the
sample device special file representing port 3 has a name consistent with
the device-file format used by terminals and modems.
/usr/sbin/ioscan -fn -C tty
Class I H/W Path Driver S/W State H/W Type Description
==================================================================
tty 0 56/56 mux2 CLAIMED INTERFACE MUX
/dev/tty0p3
Step 2. Create a new device special for the port to which you are attaching the
printer by invoking /usr/sbin/mksf and specifying the device driver
(-d), hardware path (-H), and serial port (-p). Use -l to create a device
special file with a line-printer name and -v for verbose output.
For example, the following command line creates a new device special file
for port 3 with a line-printer name.
/usr/sbin/mksf -d mux2 -H 56/56 -p3 -l -v
making c0p3_lp c 193 0x000300
If your manual states that your printer uses hardware flow control
(RTS/CTS) and you wish to employ it, you can execute mksf with the -f
option to enable the feature.
/usr/sbin/mksf -d mux2 -H 56/56 -p3 -f -l -v
making c0p3_lp c 193 0x000310
Step 3. Invoke /sbin/ioscan -fn again to display the new device special file,
whose name will now be consistent with other line printer device special
files.
Class I H/W Path Driver S/W State H/W Type Description
==================================================================
...
tty 0 56/56 mux2 CLAIMED INTERFACE MUX
...
/dev/c0p3_lp
You can also confirm the file's characteristics by invoking
/usr/sbin/lssf on the new file or viewing the long listing (ll).