set tcpserial
Purpose
Used to set behaviors of TCP serial connections, or display current TCP serial settings.
This command affects the following TCP serial connections:
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 TCP serial settings for the line on which they are logged in: set permissions s-tcpserial=r-self.
- For a user to display the TCP serial settings for any line: set permissions s‑tcpserial=read.
- For a user to display and set the TCP serial settings for the line on which they are logged in: set permissions s-tcpserial=rw-self.
- For a user to display the TCP serial settings for any line, and set TCP serial settings for the line on which the user is logged in: set permissions s‑tcpserial=w-self-r.
- For a user to display and set the TCP serial settings on any line: set permissions s-tcpserial=rw.
See set permissions for details on setting user permissions for commands.
Syntax
Set behaviors of TCP serial connections
set tcpserial port=range
[hangupdcd={on|off}]
[hangupdsr={on|off}]
[idletimeout={0-65000}]
[sid={on|off}]
[sidstring=socketid string]
Buffered forwarding options:
[buffered={on|off}]
[sendcount=1-65535 bytes]
[sendtime={0|1-65535ms}]
[endpattern=string]
[strippattern={on|off}
Display TCP serial settings
set tcpserial [port=range]
Options
port=range
Used to specify the serial port. Optional on a single-port device.
hangupdcd={on|off}
Indicates whether an established network connection should be terminated when the serial port’s DCD signal drops. The default is off.
hangupdsr={on|off|}
Indicates whether an established network connection should be terminated when the serial port’s DSR signal drops. The default is off.
idletimeout={0-65000}
Indicates that established network connection should be terminated if the serial port is idle for the specified amount of time in seconds. A value of 0 (zero) disables this option. The default is 0.
sid={on|off}
Determines how the socket ID (SID) string in the sidstring option is handled.
on
The value for the sidstring option is sent to the network destination right before the first data bytes are sent to the network.
off
The value for the sidstring option is not sent to the network destination.
The default is off.
sidstring=socketid string
When the sid option is set to on, this string is sent to the network destination right before the first data bytes are sent to the network. The maximum length of this string is 256 characters, including escape sequences for special characters. The maximum parsed length of this string is 256 characters. That is, this string must reduce down to a 256-character string when the escape sequences are processed. For more details on the escape sequences, see Entering Special Characters in String Values.
buffered={on|off}
Turning on this feature on allows controlling how serial data is sent out to the network. The sendcount, sendtime, endpattern, and strippattern options are used to control how data is sent out once the buffered option is set to on. The default is off.
sendcount=1 - 65535 bytes
Indicates that data from the serial port should be sent out to the network after buffering the given number of bytes. This option only is valid when the buffered option is on. The default is 1024 bytes.
sendtime={0|1-65535ms}
Indicates that data from the serial port should be sent out to the network after the given amount of time has past where no new data has arrived from the serial port. This option only is valid when the buffered option is on. A value of 0 (zero) disables this option. The default is 0.
endpattern=string
Indicates that data from the serial port should be sent out to the network after the given endpattern string has been found in the data from the serial port. This option only is valid when the buffered option is on. An empty string disables this option.
The maximum length of this string is 16 characters, including escape sequences for special characters. For more details on the escape sequences, see Entering Special Characters in String Values. The maximum parsed length of this string is 4 characters. That is, this string must reduce down to a 4-character string when the escape sequences are processed.
strippattern={on|off}
This option corresponds with the endpattern option. When a valid endpattern string is found, this option indicates whether the matching string is stripped or kept in the data stream. The default is off.
Examples
#> set tcpserial hangupdcd=off idletime=20
#> set tcpserial port=1 sid=on sidstring=”abc”
#> set tcpserial port=1 buffered=on sendtime=50 sendcount=512
#> set tcpserial