Tcp Server/Client Mode Operations; Overview - Sena HelloDevice LS100 User Manual

Hellodevice lite series
Table of Contents

Advertisement

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 (or domain name) 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
>

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
[Listen] --> [Sync-Sent] --> [Established] --> [Data] --> [Closed] --> [Listen]
The initial state is [Listen]. If there are data coming from the serial port, it will connect to the remote
host as a TCP client. If there is incoming connection request from the remote host, it will accept the
connection as a TCP server, and then transfer data through the serial port. Thus, users can assume
that the LS100 is always connected to the specified remote host.
Figure 4-4 TCP client mode setting
34

Advertisement

Table of Contents
loading

Table of Contents