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:
- For a user to display the serial settings for the line on which they are logged in: set permissions s-serial=r-self.
- For a user to display the serial settings for any line: set permissions s‑serial=read.
- For a user to display and set the serial settings for the line on which they are logged in: set permissions s-serial=rw-self.
- For a user to display the serial settings for any line, and set serial settings for the line on which the user is logged in: set permissions s‑serial=w-self-r.
- For a user to display and set the serial settings on any line: set permissions s-serial=rw.
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}
none
No parity.
even
odd
mark
space
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
hardware
custom
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
- display serial
- info serial
- revert: The revert serial command reverts the settings configured by this command.
- set profile
- set switches
- show: The show putty command shows the current serial configuration settings in a Digi device.