Modem−Related UNIX Commands

ttyd1 usretcgetty d2400 unknown on dialin entry enabled cua1 none unknown off dialout entry disabled Finally, the software carrier detect for the dial−out version of the port should be disabled: ttysoftcar n devcua1 Once it is done, the use of special files etcttyd1 and etccua1 is possible. For more detailed explanations and complete installation, SunOS provides the manual page named zs. System V UNIX flavors specify the terminal line, i.e., serial port initialization, through the etcinittab file. When a modem is attached to the system, the appropriate port must be enabled for duplex communication. It can be done by replacing the getty program in the corresponding inittab−entry with another, more sophisticated program that supports both, getty and duplex communication such programs exist on the System V, for example the program uugetty. An inittab−entry could be: 27:2:respawn:usrlibuucpuugetty −r tty12 2400 Another approach is also possible; to invoke the init program to reinitialize the terminal line for dial−in and dial−out, using different init−run−levels for example, 2 and 3. Then, invoking init 2 will initialize the terminal line for dial−in, including the getty program the corresponding inittab−entry with the getty must exist for run−level 2. By invoking init 3, the terminal line will be enabled for dial−out the previous inittab−entry with the getty must be excluded from the run−level 3.

24.2.2 Modem−Related UNIX Commands

There is no uniform UNIX set of modem−related commands; they are always flavor specific. Most UNIX flavors point to the command uugetty, but this command was primarily designed for a different purpose; more about this command and its implementation can be found in the section on UUCP. Several other commands will be briefly described, or sometimes even only listed in the following text. 24.2.2.1 The cu Command cu calls up another UNIX system, a terminal, or possibly a non−UNIX system. The command exists, for example, on Solaris and HP−UX flavors. It manages an interactive conversation with possible transfers of files. It is convenient to think of cu as operating in two phases: The connection phase in which the connection is established 1. The conversation phase 2. The format of the command is: 593 cu accepts many options. The −c, −l, and −s options play a part in selecting the medium; the remaining options are used in configuring the line. The command is directly related to UUCP, and it uses some UUCP configuration data. Some of the options are listed. Option Meaning −c device Force cu to use configuration entries in the UUCP file etcuucpDevices that match the user specified device. −s speed Specify the transmission speed; the default value is Any speed that depends on the etcuucpDevices file. −l line Specify a device name to use as the communication line. Combined with other options could also depend on the UUCP configuration files. The most common case is that a specified device is a directly connected asynchronous line for instance, devterma required. However the specified device need not be in the dev directory. If the specified device is associated with an auto dialer, a telephone number must be provided. −b bits Specifies the number of bits processed on the line either 7 or 8. This allows connection between systems with different character sizes. By default, the character size of the line is set to the same as the current local terminal. telno When using an automatic dialer, specifies the telephone number; the equal sign = identifies secondary dial tone, while the minus sign − placed appropriately, a delay of 4 seconds. systemname Specifies a system name, which can be used rather than a telephone number. In this case, cu will obtain an appropriate direct line or telephone number from a UUCP system file. For example: To dial a system whose telephone number is 9−1−212−567−1234 using 2400 baud where dial tone is expected after the 9: cu −s 2400 9 =12125671234 • To log in to a system connected by a direct line: cu −l devtermb • To dial a system with a specific line and speed: cu −s 1200 −l termb • To use a system name: cu systemname • 24.2.2.2 The tip Command The tip command or utility connects to the remote system and establishes a full−duplex terminal connection. Once the connection is established, a remote session using tip behaves like an interactive session on a local terminal. The command is Solaris flavored. The format of the command is: tip [ −v ] [ −speed−entry ] { hostname | phone−number | device } 594 When phone number is specified, tip looks for an entry in the remote file of the form: tip −speed−entry to set the connection speed accordingly. When device is specified, tip attempts to open that device, but will do so using the access privileges of the user the user must have readwrite access to the device. tip interprets any character string beginning with the slash character as a device name. When establishing the connection, tip sends a connection message to the remote system. The default value for this message can be found in the remote file. When tip starts up, it reads commands from the file .tiprc in the users home directory. Some other UNIX commands that belong to this category are, for example, the Solaris−flavored commands ttymon and ttyadm for control of the serial lines, or the same purpose Linux−flavored commands mgetty or agetty.

24.3 Third−Party Communication Software