[ Previous | Next | Contents | Home | Search ]
AIX Versions 3.2 and 4 Asynchronous Communications Guide

Asynchronous Terminal Emulation

The Asynchronous Terminal Emulation (ATE) program enables terminals on the AIX system to emulate a terminal, thus allowing users a means of connecting to most other systems which support asynchronous terminals. ATE accomplishes this by making the remote system see a terminal either as a system's display or as a DEC VT100 terminal. The VT100 option allows the user to log in to systems that do not support their terminal, but do support VT100 terminals.

ATE uses both direct (cabled) and modem connections to communicate between the user's system and a remote system. (See the following figure.) Depending upon the connection type used, the user can configure ATE to connect either to a system in the next room or to a system across the country.

For a direct connection, the user must know the port to use on their system. For a modem connection, users must know the port to use on his system and the telephone number of the remote system. Users must also have a login ID and password on the remote system.

This section includes the following information about ATE:

Setting Up ATE

Before running ATE, the system administrator must install the proper software (if needed) and configure the tty ports and connections. ATE uses both direct (cabled) connections and modem connections. Local RS-232C connections allow a maximum distance of 15 meters (50 feet) between machines, and RS-422A connections allow up to 1200 meters (4000 feet) between machines.

Before using ATE to call a remote system, verify that the remote system's tty device is ready to accept a call.

Prerequisites

Procedure

To prepare ATE to run on the system, perform the following steps:

  1. Install an asynchronous adapter card in an appropriate slot in the system unit, unless the system has a built-in serial port.
  2. Plug the RS-232C or RS-422A cable into the adapter card or the built-in serial port.
  3. Add a tty device for the communications port using the smit mkdev fast path.

    Select the terminal type to emulate with ATE and make the necessary adjustments for the environment. The most common changes are line speed, parity settings, number of bits per character, and whether the line is to be driven as a remote or local line. Use bpc 8 and no parity if National Language Support (NLS) is required.

  4. Set up the port for the device. To set up a port to call out with ATE, use the pdisable command. For example, to set up port tty1, enter:
    pdisable tty1
    To set up a port so that others can call in, use the penable command. For example, to let other systems call in to the tty2 port, enter:
    penable tty2
  5. Ensure the device has previously been defined to the remote system. Once the device is defined, the ATE program must be customized to reflect the device settings on the remote system. Customize the default settings with the alter and modify subcommands or by editing the ate.def default file. To change the default settings for a telephone connection, use a dialing directory file entry.

Customizing the ATE Program

ATE creates the ate.def default file in the current directory the first time the user runs ATE. Edit the ate.def file to customize various aspects of ATE. For example, the user can change the name of the dialing directory file, the type of transfer protocols used to send and receive files from the remote system, and the baud rate ATE expects the modem to use. Refer to "Changing the Default Files" for more information on the ate.def file.

Users can also make temporary changes to certain aspects of ATE with the modify and alter subcommands. These subcommands can change all of the ATE default values except the control key sequences (which can only be changed by editing the default file) and the name of the dialing directory (which can be changed with the directory subcommand or by editing the default file). Any changes made with the modify, alter, or directory subcommands are effective only for that session of ATE. The next time the user runs ATE, the settings used are those defined in the default file.

When using a modem with ATE, the user can create a dialing directory of up to 20 phone numbers. The directory subcommand displays the telephone numbers in menu form and allows the user to select the desired system to call. Refer to "The ATE Dialing Directory File" section for more information.

By using a dialing directory, the user avoids having to look up the telephone number when calling a particular system. The user can also specify certain data transmission characteristics in the dialing directory file. This is useful if some connections use characteristics that differ from the ATE defaults.

ate.def Configuration File

The ate.def file sets the defaults for use in asynchronous connections and file transfers. This file is created in the current directory during the first run of ATE. The ate.def file contains the default values in the ATE program uses for the following:

The first time the ATE program is run from a particular directory, it creates an ate.def file in that directory.

LENGTH         8
STOP           1
PARITY         0
RATE           1200
DEVICE         tty0
INITIAL        ATDT
FINAL
WAIT           0
ATTEMPTS       0
TRANSFER       p
CHARACTER      0
NAME           kapture
LINEFEEDS      0
ECHO           0
VT100          0
WRITE          0
XON/XOFF       1
DIRECTORY      /usr/lib/dir
CAPTURE_KEY    002
MAINMENU_KEY   026
PREVIOUS_KEY   022

Edit the ate.def file with any ASCII text editor to permanently change the values of these characteristics. Temporarily change the values of these characteristics with the ATE alter and modify subcommands, accessible from the ATE Main Menu.

Parameters in the ate.def File

Type parameter names in uppercase letters in the ate.def file. Spell the parameters exactly as they appear in the original default file. Define only one parameter per line. An incorrectly defined value for a parameter causes ATE to return a system message. However, the program continues to run using the default value. These are the ate.def file parameters:

LENGTH
Specifies the number of bits in a data character. This length must match the length expected by the remote system.
Options:  7 or 8
Default:  8
STOP
Specifies the number of stop bits appended to a character to signal that character's end during data transmission. This number must match the number of stop bits used by the remote system.
Options:  1 or 2
Default:  1
PARITY
Checks whether a character is successfully transmitted to or from a remote system. Must match the parity of the remote system.

For example, if the user selects even parity, when the number of 1 bits in the character is odd, the parity bit is turned on to make an even number of 1 bits.

Options: 0 (none), 1 (odd), or 2 (even)
Default: 0.
RATE
Determines the baud rate, or the number of bits transmitted per second (bps). The speed must match the speed of the modem and that of the remote system.
Options: 50,75,110,134,150,300,600,1200,1800,2400,4800,9600,19200
Default: 1200
DEVICE
Specifies the name of the asynchronous port used to make a connection to a remote system.
Options: Locally created port names.
Default: tty0.
INITIAL
Defines the dial prefix, a string that must precede the telephone number when the user autodials with a modem. For the proper dial commands, consult the modem documentation.
Options: ATDT, ATDP, or others, depending on the type of modem. 
Default: ATDT.
FINAL
Defines the dial suffix, a string that must follow the telephone number when the user autodials with a modem. For the proper dial commands, consult the modem documentation.
Options: Blank (none) or a valid modem suffix.
Default: No default.
WAIT
Specifies the time to wait between redialing attempts. The wait period does not begin until the connection attempt times out or until it is interrupted. If the ATTEMPTS parameter is set to 0, no redial attempt occurs.
Options: 0 (none) or a positive integer designating the number of seconds to wait.
Default: 0
ATTEMPTS
Specifies the maximum number of times the ATE program tries redial to make a connection. If the ATTEMPTS parameter is set to 0, no redial attempt occurs.
Options: 0 (none) or a positive integer designating the number of attempts.   
Default: 0
TRANSFER
Defines the type of asynchronous protocol that transfers files during a connection.

p (pacing)
File transfer protocol controls the data transmission rate by waiting for a specified character or for a certain number of seconds between line transmissions. This helps prevent loss of data when the transmission blocks are either too large or sent too quickly for the system to process.
x (xmodem)
An 8-bit file transfer protocol to detect data transmission errors and retransmit the data.
Options: p (pacing), x (xmodem)
Default: p.
CHARACTER
Specifies the type of pacing protocol to be used. Signal to transmit a line. Select one character.

When the send subcommand encounters a line-feed character while transmitting data, the subcommand waits to receive the pacing character before sending the next line.

When the receive subcommand is ready to receive data, it sends the pacing character, then waits 30 seconds to receive data. The receive subcommand sends a pacing character again whenever it finds a carriage return character in the data. The receive subcommand ends when it receives no data for 30 seconds.

Options: any character
Default: 0
Interval
Number of seconds the system waits between each line it transmits. The value of the Interval variable must be an integer. The default value is 0, indicating a pacing delay of 0 seconds.
Default: 0.
NAME
File name for incoming data (capture file).
Options: A valid file name less than 40 characters long.
Default: kapture
LINEFEEDS
Adds a line-feed character after every carriage-return character in the incoming data stream.
Options: 1 (on) or 0 (off).
Default: 0.
ECHO
Displays the user's typed input. For a remote computer that supports echoing, each character sent returns and displays on the screen. When the ECHO parameter is on, each character is displayed twice: first when it is entered, and again when it returns over a connection. When the ECHO parameter is off, each character displays only when it returns over the connection.
Options: 1 (on) or 0 (off).
Default: 0.
VT100
The local console emulates a DEC VT100 terminal so DEC VT100 code can be used with the remote system. With the VT100 parameter off, the local console functions like a workstation.
Options: 1 (on) or 0 (off).
Default: 0.
WRITE
Captures incoming data and routes it to the file specified in the NAME parameter as well as to the display. Carriage-return or line-feed combinations are converted to line-feed characters before they are written to the capture file. In an existing file, data is appended to the end of the file.

The CAPTURE_KEY (usually the Ctrl-B key sequence) can be used to toggle capture mode on or off during a connection.

Options: 1 (on) or 0 (off).
Default: 0.
XON/XOFF
Controls data transmission at a port as follows:
DIRECTORY
Names the file that contains the user's dialing directory.
Default: the /usr/lib/dir file.
CAPTURE_KEY
Defines the control key sequence that toggles capture mode. When pressed, the CAPTURE_KEY (usually the Ctrl-B key sequence) starts or stops capturing (saving) the data that is displayed on the screen during an active connection.
Options: Any ASCII control character.
Default: ASCII octal 002 (STX).
MAINMENU_KEY
Defines the control key sequence that returns the Connected Main Menu so the user can issue a command during an active connection. The MAINMENU_KEY (usually the Ctrl-V key sequence) functions only from the connected state.
Options: Any ASCII control character.
Default: ASCII octal 026 (SYN).
PREVIOUS_KEY
Defines the control key sequence that displays the previous screen anytime during the program. The screen displayed varies, depending on the screen in use when the user presses PREVIOUS_KEY (usually the Ctrl-R key sequence).
Options: Any ASCII control character.
Default: ASCII octal 022 (DC2).  The ASCII control character is mapped to the interrupt signal.

ATE Dialing Directory File

The ATE dialing directory file lists phone numbers that the ATE program uses to establish remote connections by modem. Users name the dialing directory file with any valid file name and place it in any directory where read and write access is owned. Edit the dialing directory file with any ASCII text editor. The default dialing directory information for the ATE program is contained in the /usr/lib/dir file. (See the following figure.)

Users can access the dialing directory information from within ATE by using the directory subcommand available in the "UNCONNECTED MAIN MENU." The following figure shows the directory information as it would appear from within the ATE program.

Users can have more than one dialing directory. To change the dialing directory file the ATE program uses, the user must modify the ate.def file in the current directory.

Note: The dialing directory file can contain up to 20 lines (one entry per line). ATE ignores subsequent lines.

Format of Dialing Directory File Entries

The dialing directory file is similar to a page in a telephone book that contains entries for the remote systems called with the ATE program. The format of a dialing directory entry is:

Name Phone Rate Length StopBit Parity Echo Linefeed

The fields must be separated by at least one space. More spaces can be used to make each entry easier to read. The fields are:

Name
Identifies a telephone number. The name can be any combination of 20 or fewer characters. Use the _ (underscore) instead of a blank between words in a name, for example, data_bank.
Phone
The telephone number to be dialed. The number can be up to 40 characters. Consult the modem documentation for a list of acceptable digits and characters. For example, if a 9 must be dialed to access an outside line, include a 9, (the numeral 9 and a comma) before the telephone number as follows: 9,1112222.

Although the telephone number can be up to 40 characters long, the directory subcommand displays only the first 26 characters.

Rate
Transmission or baud rate in bits per second (bps). Determines the number of characters transmitted per second. Select a baud rate that is compatible with the communication line being used. The following are acceptable rates:

50, 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, or 19200.

For non-POSIX baud rates, setting the rate at 50 causes the ATE to use the configured baud rate set through SMIT for that device.

Length
Number of bits that make up a character. The entry for the Length field can be 7 or 8.
StopBit
Stop bits signal the end of a character. The entry for the StopBit field can be 1 or 2.
Parity
Checks whether a character was successfully transmitted to or from a remote system. The entry for the Parity field can be 0 (none), 1 (odd), or 2 (even).
Echo
Determines whether typed characters display locally. The entry for the Echo field can be 0 (off) or 1 (on).
Linefeed
Adds a line-feed character at the end of each line of data coming in from a remote system. The line-feed character is similar in function to the carriage-return and new-line characters. The entry for the Linefeed field can be 0 (off) or 1 (on).

Notes:
  1. Changing or remapping may be necessary if control keys conflict across applications. For example, if the control keys mapped for the ATE program conflict with those in a text editor, remap the ATE control keys.
  2. The ASCII control character selected may be in octal, decimal, or hexadecimal format, as follows:
    octal
    000 through 037. The leading zero is required.
    decimal
    0 through 31.
    hexadecimal
    0x00 through 0x1F. The leading 0x is required. The x may be uppercase or lowercase.

Example

Create an ate.def file that defines those characteristics to change characteristics of ATE emulation. For example, to change the RATE to 300 bps, the DEVICE to tty3, the TRANSFER mode to x (xmodem protocol), and the DIRECTORY to my.dir, create an ate.def with the following entries, in the directory running the ATE program:

RATE          300
DEVICE        tty3
TRANSFER      x
DIRECTORY     my.dir

The program uses the defined values from time the ATE program starts from that directory.

Dialing-Out with ATE

Use the following procedure to dial out of a system using ATE and a customized /usr/lib/dir dialing directory file.

Prerequisites

The user should verify that all of the following prerequisites and conditions are met before attempting to dial out.

Procedure

  1. Enter:
    ate
  2. Enter a d for directory at the > prompt on the UNCONNECTED MAIN MENU screen. Refer to following figure.

  3. Press Enter when the prompt shown in the following figure is displayed.

  4. To dial, enter the appropriate directory entry number from the /usr/lib/dir file displayed on the screen as shown in the following figure.

Transferring a File Using ATE

Use the following procedure to transfer a file from a local host to the remote system.

Prerequisites

Procedure

  1. Run the following xmodem command on the remote system after logging in:
    xmodem -r newfile
    where r is the Xmodem flag to receive and newfile is the name of the file to be received. This name does not need to be the same as the file being transferred.
  2. Press Enter.
  3. The following message is displayed:
    ate: 0828-005 The system is ready to receive file newfile. Use Ctrl-X to stop xmodem.
    If the message is not displayed, the system may not have the xmodem program installed or located in its command PATH.
  4. Press Ctrl-V to return to the ATE CONNECTED MAIN MENU.
  5. Press s to send a file.
  6. The following message is displayed:

    Type the name of the file you wish to send and press Enter. To use the last file name (), just press Enter.

  7. Enter the name and full path of the file to be transferred.
  8. Press Enter.
  9. ATE will display the following message and begin to transfer the file:
    ate: 0828-024 The program is ready to send file newfile. You will receive another message when the file transfer is complete.
    ate: 0828-025 The system is sending block 1.
    ate: 0828-025 The system is sending block 2.
    ate: 0828-015 The file transfer is complete.
    ate: 0828-040 Press Enter
  10. Press Enter when the transfer is complete.

Receiving a File Using ATE

Use the following procedure to receive a file transferred from a remote host.

Prerequisites

Procedure

  1. Run the following xmodem command on the remote system after logging in:
    xmodem -s newfile
    where s is the xmodem command to send and newfile is the name and full path of the file to be transferred.
  2. Press Enter.
  3. The following message is displayed:
    ate: 0828-005 The system is ready to send file newfile. Use ctrl-X to stop xmodem.
    If the message is not displayed, the system may not have the xmodem program installed or located in its command PATH.
  4. Press Ctrl-V to return to the ATE CONNECTED MAIN MENU.
  5. Press r to receive the file.
  6. The following message is displayed:

    Type the name of the file you wish to store the received data in and press Enter. To use the last file name (), just press Enter.

  7. Enter the name and full path of the file to be transferred.
  8. Press Enter.
  9. ATE will display the following message and begin to transfer the file:
    ate: 0828-020 The program is ready to receive file newfile. You will receive another message when the file transfer is complete.
    ate: 0828-028 The system is receiving block 1.
    ate: 0828-028 The system is receiving block 2.
    ate: 0828-040 Press Enter.
  10. Press Enter when the transfer is complete.

Troubleshooting Common ATE Problems

Problem:
When transferring or receiving files, the xmodem command appears to hang. A Ctrl-X corrects the problem.
Solution:
Examine the Alter menu to verify that xmodem protocol (or Transfer method) is being used.
Problem:
When transferring or receiving files, the file scrolls across the screen and a message is displayed stating that the transfer or receipt was complete when, in fact, it was not.
Solution:
Examine the Alter menu to verify that xmodem protocol (or Transfer method) is being used.
Problem:
When starting ATE, the user receives the following error:
ate: 0828-008 The system tried to open port /dev/tty0 but failed.  If the port name is not correct, change it  using the Alter menu.  Or, take the action indicated by the system message shown below.
  
Connect: The file access permissions do not allow the specified action.
ate: 0828-040 Press Enter.
Solution:
The Connect: line in the error message narrows down the problem. Verify that the user attempting to run ATE is a member of the UUCP group. To check this, the user can enter id on the command line; uucp should appear in the output listing.
Problem:
When attempting to make a connection with ATE, the following error is received:
ate: 0828-008 The system tried to open port /dev/tty0 but failed. If the port name is not correct, change it using the Alter menu. Or, take the action indicated by the system message shown below.
   
Connect: A file or directory in the path name does not exist.
ate: 0828-040 Press Enter.
Solution:
An incorrect or unavailable tty was selected for use by ATE. Examine the Alter screen in ATE.
Problem:
The file transfers correctly, but the file size is larger than the original file.
Solution:
The xmodem protocol pads the file during transfer. To avoid this, use the tar command to compress the file and transfer it. This is also a means of overcoming another xmodem limitation where only one file is sent at a time. The user can tar several files together into a single tar image and transfer it using xmodem.

[ Previous | Next | Contents | Home | Search ]