[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
7318 Model S20 Guide and Reference

Changing Port TTY Parameters

There is a section in the configuration file for each of the 7318 serial ports. These sections are named [Port00] to [Port15].

There are several entries within each [PortNN] section. To change the line parameters, modify the stty entry. The entry consists of a series of names separated by spaces. Some of the names may optionally have dashes in front of them to indicate that a property is disabled.

Any name that is not present in the stty entry is assumed to have the default value. The default values for line parameters are as follows:

Default Values for Line Parameters
Parameter Default Value Equivalent Entry
Data Rate 9600 9600
Parity None -parenb
Character Size 8 bits cs8
Stop Bits 1 -cstopb
Output Flow Control Software XON/XOFF ixon
Input Flow Control Software XON/XOFF ixoff

The following table outlines possible values for data rate, parity, character size, and stop bits:

Basic Port Parameters
Parameter Value Entry Value
Data Rate 50-115200 50-115200
Parity None -parenb

Even parenb -parodd

Odd parenb parodd
Character Size 5 bits cs5

6 bits cs6

7 bits cs7

8 bits cs8
Stop Bits 1 -cstopb

2 cstopb

Prerequisites

You must have root authority.

Change the Data Rate on a Port

  1. Using your favorite editor, edit the S20 configuration file.

  2. Find the [PortNN] section for the port you want to modify. The last two digits of the section name match the port number on the front of the 7318.

    The port section will look something like:

    [Port03]
    stty=...

  3. Change the line beginning with stty to include your new data rate. All common data rates are supported as well as 57600, 76400, and 115200. For example:
    [Port03]
    stty=38400...
    Note: Serial input data with a character size of 5 bits is reliable at a maximum data rate of 38.4 Kbps. Serial input data with a character size of 6 or 7 bits is reliable at a maximum data rate of 57.6 Kbps. Serial input data with a character size of 8 bits is reliable to a maximum data rate of 76.8 Kbps. Reliable operation with a serial input data rate of 115.2 Kbps requires SLIP/TCP for the Model P10 and TCP/IP protocols using SLIP, CSLIP, or PPP for the Model S20.

  4. Save the file and exit your text editor.

  5. When all users have finished using the 7318, restart it to load the new configuration file. The port will now operate at the new data rate.

Change Flow Control on a Port

Flow control, sometimes known as pacing, prevents the sender in a serial connection from overrunning the receiver if it can send data faster than the receiver can process it. This type of overrun can occur over a series of characters even though the sender and receiver agree to send each individual character at the same rate. It is usually a temporary condition.

To prevent this kind of overrun from occurring, the receiver uses flow control to pace the transmitter. The 7318 supports both software and hardware flow control in both directions. Output flow control is used by an attached device such as a terminal or modem to pause data being sent from the 7318. Input flow control is used by the 7318 to pause data being sent from an attached device. The 7318 does not generally need input flow control unless the path to the host runs slower than the effective data rate into the 7318.

Software flow control, often referred to as XON/XOFF flow control, uses characters in the data stream to control the pace of data being sent in the opposite direction.

Hardware flow control uses modem control signals to pace the data. The 7318 permits either CTS or DCD input modem control signals to pace the rate at which the server sends data. You should use CTS, as this signal involves less software overhead in the 7318. The 7318 can use either the RTS or the DTR modem control signal to pace data being sent to it. The following table describes the stty entry keywords for enabling and disabling software and hardware flow control.

Note: The terminal adapter for the 7318 is a null modem configuration that attaches DTR from the terminal to the DCD input on the 7318.
Flow Control Values
Parameter Value Keyword
Software Input Flow Control enabled ixoff

disabled -ixoff
Software Output Flow Control enabled ixon

disabled -ixon
DTR Input Flow Control enabled dtrxoff

disabled -dtrxoff
RTS Input Flow Control enabled rtsxoff

disabled -rtsxoff
DCD Output Flow Control enabled cdxon

disabled -cdxon
CTS Output Flow Control enabled ctsxon

disabled -ctsxon

You can select the software flow control characters although they are almost always Ctrl-S and Ctrl-Q. You should not change these values. If you do need to change the values, you can set the character using the stty entry keywords shown below.

Software Flow Control Characters
Character Keyword Default Value
Output XOFF start ^S
Output XON stop ^Q
Input XOFF istart ^S
Inout XON istop ^Q

Change Slew Rate on a Port

Slew rate determines the rate at which modem control signals transition from one level to another. When this transition occurs slowly, it minimizes the cross talk generated in the communications cable and thus permits the signal to operate over a longer distance. The transition must occur fast enough, however, so that it completes in less than half the period of a single bit in the data stream or else the receiver will not properly recognize the bit.

The 7318 allows you to program each group of four ports (0-3, 4-7, 8-11, 12-15) to a separate slew rate to optimize the distance and speed of your connections. The default slew rate is fast, which is appropriate in most cases unless you want to transmit over cable lengths in excess of 150 feet (45 meters).

Compatible baud rates, cable distances, and slew rates are described in the following table:

Slew Rate Settings
Distance (ft) RS-423/422 Distance (ft) RS-232 Maximum Baud Rate (bps) Slew Rate Setting
< 2300 < 200 9600 slow
< 625 < 200 38400 medium
< 150 < 50 115,200 fast

A slew rate of medium limits the baud rate to 38,400 bps and RS423 cable distances to 625 ft.

To change the default slew rate, add one of the sequences in the following table to the stty entry in your configuration file:

Slew Rate Values
Slew Rate Stty Entry String
slow slew slow
medium slew medium
fast slew fast
Note: All four ports in the port group must be configured to the same slew rate value. If the slew rate of all four ports is not the same, the resulting slew rate is undefined.

[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]