3 tcp server/client mode operations, 2 tcp client mode configuration, 1 overview – SENA LS100 User Manual

Page 34

Advertising
background image

34

4.2.2 TCP Client Mode Configuration

To configure the LS100 to work as a TCP client, use set command as follows:

set host tcpc dest_ip dest_port cyclic_connection_interval inactivity_timeout + <CR>

where,

dest_ip = destination IP address

dest_port = destination TCP port

cyclic_connection_interval = cyclic connection interval in minutes

inactivity_timeout = inactivity timeout in seconds.

Destination IP address and destination TCP Port are the information on the remote host to which

the LS100 will try to connect in TCP client mode. The IP address should be specified together with the

TCP port number.

Cyclic connection interval is the time interval at which the LS100 will try to connect to the remote

host regardless of the existence of incoming data from the serial port. If the interval is specified with a

valid value other than 0, the function is enabled. The time interval will be the specified value by the unit

of minute. If the interval is entered as 0, cyclic connection feature will be disabled.

Inactivity timeout is the same as described in TCP server mode setting section.

Figure 4-4 shows TCP client mode setting example:

> set host tcpc 192.168.1.1 6001 10 300
OK
>

Figure 4-4 TCP client mode setting

4.3 TCP Server/Client Mode Operations

4.3.1 Overview

The LS100 works as either TCP server or client according to the situation. This will be the typical

mode for most applications, since it will transfer the data either from serial port or from TCP port. The

default TCP state is [Listen] which is the same as that of TCP server mode.

1) Typical State Transition

[Listen] --> [Sync-Received] --> [Established] --> [Data] --> [Closed] --> [Listen]

Or

Advertising