Contents:
Setting
up a Printer using TCP/IP
Setting up a Printer
Using TCP/IP
You can attach a serial printer to the Communications Server and make
it available to users on the network.
To set up a printer in a UNIX environment using TCP/IP, set up:
1. The hardware
2. A Telnet listener
3. A printer interface
4. A printer queue
The following subsections explain each step in detail.
Setting up a Printer
This section outlines the procedure for connecting a printer to the
specified port(s).
Using Web Configuration.
Invoke the Server's setup utility by entering its IP address in a network-connected
web-browser, (i.e. http://123.456.789.001).
When the Setup front page is displayed:
Step 1.
Press the 'Setup' button. Specify a valid user name and password,
if prompted.
Step 2.
Select the 'Printer' hyperlink from the main Setup screen.
Step 3.
Specify the following:
- Ports to which printer(s) are to be connected- Port 01
to 08 or 16.
- Baud Rate - from 5 to 230,400 or autobaud (default 115200).
- Character size - 8 or 7 (default 8).
- Parity - none, even, odd, mark or space (default none)
- Stop bits - 1 or 2 (default 1)
- Flow Control - none, hardware or software (default hardware)
Step 4.
Press the Configure button when ready. The input parameters
are implemented immediately. The setup program now confirms that the
input has been accepted by displaying the Configuration Results
screen.
Setting up the Hardware
Attach a serial printer to any port on the Communications Server, or
attach a printer to a terminal that is attached to any port on the communications
server. If the printer is attached to a terminal on the server, enable
transparent printing on the port. See 'Setting Up a Port Using Transparent
Printing' later in this chapter. Use an adapter to attach the
device to the communications server (refer to the EasyServer
Appendix: Cables and Connectors).
Setting up a Telnet Listener
To access your printer on the communications server, set up a Telnet
listener. A Telnet listener allows remote hosts to access devices, such
as printers and modems, that are attached to the Communications Server.
Assign a Telnet listener to the communications server serial port to
which the printer is attached. The port you want to configure must not
be in use. You can't be logged into the port you want to configure,
and it can't be in use by any other user or service (such as SLIP or
PPP).
Using Command Line Configuration.
To set up a Telnet listener, perform the following:
Step 1.
From the Communications Server prompt, enter the following privileged
commands for printers attached directly to the communications server
or attached to a terminal that is attached to the server:
Local 1>> CHANGE TELNET
LISTENER tcp_port PORTS port_number ENABLED
Local 1>> CHANGE TELNET
LISTENER tcp_port IDENTIFICATION 'id_string'
Local 1>> CHANGE TELNET
LISTENER tcp_port CONNECTIONS ENABLED
Local 1>> CHANGE PORT
port_number ACCESS REMOTE
Local 1>> CHANGE PORT
port_number TELNET SERVER NEWLINE FROM TERMINAL <LF>
Local 1>> CHANGE PORT
port_number TELNET SERVER NEWLINE TO HOST <CRLF>
Where
- tcp_port is the Telnet listener TCP port number. TCP port
numbers start at 2001 and increment up to 2032. Make sure the TCP
port you specify is not in use by any other Telnet listener.
- port_number is the serial port number.
- id_string is a descriptive name for the printer.
In the following example, the TCP port is 2003, the port number is
3, and the identification string is HPprinter.
Local 1>> CHANGE TELNET
LISTENER 2003 PORTS 3 ENABLED
Local 1>> CHANGE TELNET
LISTENER 2003 IDENTIFICATION `HPprinter'
Local 1>> CHANGE TELNET
LISTENER 2003 CONNECTIONS ENABLED
Local 1>> CHANGE PORT
3 ACCESS REMOTE
Local 1>> CHANGE PORT
3 TELNET SERVER NEWLINE FROM TERMINAL <LF>
Local 1>> CHANGE PORT
3 TELNET SERVER NEWLINE TO HOST <CRLF>
Step 2.
If your printer is attached to a terminal that is attached to the
communications server, enter the following privileged command at the
server prompt:
Local 1>> CHANGE PORT
port_number TRANSPARENT PRINT ENABLED
Local 1>> CHANGE PORT
port_number ACCESS DYNAMIC
Where port_number is the serial port number.
Setting up a Printer
Interface
This section explains how to extract two files from the Server to set
up the AT&T UNIX SVR3 or SVR4 Line Printer (LP) Spooler Package
for use with the remote printer on the server.
To extract files from the communications server, TFTP must be enabled
on the UNIX host. For more information, refer to steps 1 and 2 in 'Downloading
the Configuration File' in Chapter 4, 'Setting Up the Communications
Server on a Network.'
Using Command Line Configuration.
Step 1.
Extract the svr_print.c and interface files from the communications
server and save them on a remote UNIX host.
(a) Log in as root on the UNIX host and type:
# cd /tftpboot
# touch svr_print.c
interface
# chmod a+w svr_print.c
interface
(b) Log in to the Communications Server and type:
Local 1>> TUTORIAL
PRINTER CODE > svr_print.c HOST unix_host
Local 1>> TUTORIAL
PRINTER INTERFACE > interface HOST unix_host
Where unix_host is the name of the UNIX host.
Step 2.
Install the two files into the proper directory on the UNIX host.
This step requires that you have a C development system installed
on your UNIX host. If you do not have a C development system installed,
you'll need to contact your system vendor for support. Log in as root
to the UNIX host and type:
# cd /tftpboot
# cp svr_print.c interface
/usr/lib
# cd /usr/lib
# cc -O -o svr_print
svr_print.c
Setting up a Printer Queue
This section explains how to set up a printer queue for using the remote
printer with the LP Spooler Package.
Step 1.
Set up an LP Spooler printer queue and interface script. Log in as
root on the UNIX host and type:
# /usr/lib/lpadmin
-p printername -h -v/dev/null -m interface
# /usr/lib/accept printername
# enable printername
# cd /usr/spool/lp/admins/lp/interfaces
# mv printername printername.if
Where
- printername is the name of the LP Spooler printer queue
(any unique name).
- interface is the name of the LP Spooler interface script.
(If you're not sure what the name of the LP Spooler interface script
is, use standard.)
In the following example, the printer queue name is HPprinter and
the interface script name is standard.
# /usr/lib/lpadmin
-p HPprinter -h -v/dev/null -mstandard
# /usr/lib/accept HPprinter
# enable HPprinter
# cd /usr/spool/lp/admins/lp/interfaces
# mv HPprinter HPprinter.if
Step 2.
Edit the interface file to specify the communications server's Internet
address and the Telnet listener's TCP port. Log in as root on the
UNIX host and type:
# cd /usr/spool/lp/admins/lp/interfaces
# sed `s/REMOTEADDR/ts_ipaddr/'
< /usr/lib/interface >/tmp/$$
# sed `s/REMOTEPORT/ts_tcpport/'
</tmp/$$ >printername
# chmod +x printername
Where
- ts_ipaddr is the communications server's Internet address.
- ts_tcpport is the Telnet listener's TCP port. This number
must match the number specified for tcp_port in step 1 of 'Setting
Up a Telnet Listener,' earlier in this chapter.
- printername is the name of the LP Spooler printer queue
(any unique name).
In the following example, the communications server's Internet address
is 132.237.20.37, the Telnet listener's TCP port is 2003, and the
printer queue name is HPprinter.
# cd /usr/spool/lp/admins/lp/interfaces
# sed `s/REMOTEADDR/132.237.20.37/'
< /usr/lib/interface >/tmp/$$
# sed `s/REMOTEPORT/2003/'
</tmp/$$ >Hpprinter
# chmod +x HPprinter
Step 3.
To print a file on the remote printer, type:
$ lp -d printername
filename
Where
- printername is the name of the LP Spooler queue.
- filename is the name of the file you want to print.
In the following example, the printer queue name is HPprinter and
the filename is toc.doc.
$ lp -d HPprinter
toc.doc