![](/images/new-backgrounds/1148897/14889761x1.webp)
4.1.2 TCP Server Mode Configuration
To configure the LS100 to work as a TCP server, use ‘set’ command as follows:
set host tcps listening_TCP_port inactivity_timeout + <CR> where,
listening_TCP_port: Listening TCP port
Inactivity_timeout: Inactivity timeout in seconds.
Listening TCP port is the TCP port number through which remote host can connect a TCP session, and, send and receive data. Incoming connection request to the ports other than Listening TCP Port will be rejected. The LS100 does not restrict the number to a specific range, but it is strongly recommended not to use the
Inactivity timeout is set to maintain the TCP connection state as Closed or Listen in TCP host mode unless there is any data transfer between the serial device and the LS100. If there is no incoming or outgoing data through the serial port during the specified inactivity timeout interval, the existing TCP connection will be closed automatically.
If the value of inactivity timeout is set to 0, the current TCP connection is maintained unless there’s no connection close request. Although inactivity timeout is disabled, the LS100 will check the connection status between the LS100 and the remote host by sending “keep alive” packets periodically. If the remote host does not answer the packets, it is regarded that the connection is down unintentionally. Then, the LS100 will force to close the existing TCP connection.
Note:
At least, this value should be set larger than that of
Figure 4-2 shows TCP server mode setting example:
>set host tcps 6001 300
OK
Figure 4-2. TCP server mode setting
31