set autoconnect

Purpose

Used to establish an automatic connection (autoconnection) between the serial port and a remote network destination, and to display current autoconnect settings.

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.

Syntax

Configure autoconnect

set autoconnect [port=range] 
[state={on|off}]
[trigger={always|destination|data|dcd|dsr|string}]
[service={raw|rlogin|ssl|telnet}]
[description={string}]
[ipaddress=ipaddress]
[ipport=ipport]
[connect_on_string=string]
[flush_string={on|off}]
[keepalive={on|off}]
[nodelay=on|off]

Display autoconnect settings

set autoconnect [port=range]

Options

port=range

The serial port to which the autoconnect settings apply. Optional on a single-port device.

state={on|off}

Enables or disables the autoconnect feature.

on

Enables the autoconnect feature.

off

Disables the autoconnect feature.

The default is off.

If you are using the serial port for another purpose, it is recommended this value be set to off.

trigger={always|destination|data|dcd|dsr|string}

Indicates which events from the serial port will trigger a network connection to occur.

always

The serial port will continually attempt to keep a connection to a remote network destination active.

destination

The serial port will attempt a network connection whenever data arrives from the network destination specified by the ipaddress option.

data

The serial port will attempt a network connection whenever data arrives on the serial port.

dcd

The serial port will attempt a network connection whenever the serial port’s DCD signal is asserted.

dsr

The serial port will attempt a network connection whenever the serial port’s DSR signal is asserted or raised.

string

A connection will be made upon detecting a particular sting, specified by the connect_on_string option, in the data from the serial port.

The default is always.

service={raw|rlogin|ssl|telnet}

The type of network connection that will be established.

raw

A connection without any special processing occurs.

rlogin

A remote login (rlogin) connection occurs.

ssl

A secure connection conforming to SSL (Secure Sockets Layer) Version 3 and Transport Layer Security (TLS) Version 1 occurs.

telnet

A connection with Telnet processing occurs.

The default is raw.

description=string

A name for descriptive purposes only.

ipaddress=ipaddress

The IP address of the network destination to which a connection will be made.

ipport=ipport

The TCP port of the network destination to which a connection will be made.

connect_on_string=string

When the value of the trigger option is string, this option specifies the string that must be found in the serial data in order for a connection to occur. The maximum length of this string is 32 characters, including escape sequences for special characters. For more details on the escape sequences, see "Entering Special Characters in String Values" on page 11. The maximum parsed length of this string is 32 characters. That is, this string must reduce down to a 32-character string when the escape sequences are processed.

flush_string={on|off}

Indicates whether the connect string, specified by the connect_on_string option, is flushed or sent over the newly established connection.

on

The connect string is flushed.

off

The connect string is sent over the newly established connection.

The default is on.

keepalive={on|off}

Indicates whether or not TCP keepalives will be sent for the specified range of clients. If set to on, keepalives will be sent, if it is off, keepalives will not be sent.

Configurable TCP keepalive parameters, for example, how many keepalives to send and when to send them are configured globally via the set network command (see "set network" on page 288).

nodelay={on|off}

 

Used to allow unacknowledged or smaller than maximum segment sized data to be sent.

Note The nodelay option disables Nagle’s algorithm, which is on by default, for some TCP services. The purpose of Nagle's algorithm is to reduce the number of small packets sent. Nagle's algorithm says to hold on to outgoing data when there is either unacknowledged sent data or there is less than maximum segment size (typically around 1500 bytes for Ethernet) worth of data to be sent. While Nagle’s algorithm does a good job at keeping transmission efficient, but there are times where it is desirable to disable it.

Examples

Set autoconnect on with trigger

This example shows setting autoconnect to connect to the TCP port (2101) of the network IP destination when data arrives on the serial port.

#> set autoconnect state=on trigger=data ipaddress=10.0.0.1 ipport=2101

 

Allow outgoing data that is either unacknowledged or less than maximum segment size

#> set autoconnect port=1 nodelay=on

See also