set serial

Purpose

Sets and displays general serial configuration options, such as baud rate, character size, parity, stop bits, and flow control.

Required permissions

For Digi products with two or more users, to use this command, permissions must be set to one of the following:

See set permissions for details on setting user permissions for commands.

Permissions for set serial also apply to the set switches command. See set switches.

Syntax

Set general serial options

set serial port=range baudrate=baudrate
databits={5|6|7|8}
stopbits={1|2}
parity={none|odd|even|mark|space}
flowcontrol={none|software|hardware|custom}
altpin={on|off}
closewait={forever|0-600}
customflow=[{rts|cts|dtr|dsr|dcd|ri|ixon|ixoff}[,...]
sigsonopen={none|rtsdtr}

Display current serial options

set serial [port=range]

Options

port=range

Used to specify the serial port. Optional on a single-port device.

baudrate=baudrate

The baud rate in bits per second. The default is 9600.

databits={5|6|7|8}

The number of data bits used on this line. The default is 8.

stopbits={1|2}

The number of stop bits per character to use on this line. The value used here must match the setting on the device connected to this port. Use 1 or 2 stop bits.

The default is 1 stop bit.

parity={none|even|odd|mark|space}

The parity used for the line.

none

No parity.

even

Even parity.

odd

Odd parity.

mark

Mark parity.

space

Space parity.

The default is none.

flowcontrol={none|software|hardware|custom}

Specifies which kind of flow control is used on the line.

none

No flow control.

software

Software flow control (Xon/Xoff).

hardware

Hardware flow control (RTS/CTS).

custom

Custom flow control, as specified by the customflow option.

The default is software.

altpin={on|off}

The altpin option swaps the pinout position of the DSR and DCD input signals for the port. Turning altpin on enables access to the DCD signal using an eight-wire cable. This option is useful for connecting to modems and for some hardware configurations where carrier detection is important.

on

The altpin option is used.

off

The altpin option is not used.

The default is off.

closewait={forever|0-600}

How long a close-port operation waits before it flushes and closes the port. The default is forever.

customflow=[{rts|cts|dtr|dsr|dcd|ri|ixon|ixoff}[,...]

The custom flow control used on the line. This option is supported on some but not all Digi devices. This option allows for specifying multiple signals for flow control in non-standard ways, with combinations for the same direction of data transfer; see the example below.

sigsonopen={none|rtsdtr}

Changes the default behavior for various applications so that they will not automatically raise and lower signals when the serial port is opened or a connection is established.

Example

Set baud rate and flow control

#> set serial baudrate=9600 flowcontrol=hardware

Set custom flow control

This command sets receive flow control to be RTS and both CTS and DSR to be used for transmit flow control.

#> set serial customflow=rts,cts,dsr

See also