TCP Server Mode

The parameter values for setting TW100 to TCP Server Mode are as follows:

  • Operation Mode: Server Mode
  • Communication Parameter
    • Local Port: 5000

With these settings, TW100 opens a TCP Server Socket with the local port number and waits for a connection from a TCP Client.

An example of a setting screen using the configuration tool is as follows.

This is the setup screen for sending data assigned to UART Channel 1 through TCP/IP. When the Operation mode is set to “Server mode”, it is configured as a TCP Server mode and waits for a TCP connection.

Once the TCP connection is established, the data coming in from UART Channel 1 is transmitted through the TCP/IP network via this connection. Conversely, data incoming from the TCP connection is transmitted to UART Channel 1.

Checking Operation

Let’s check the actual operation now. We’ll use the Hercules TCP/IP communication test tool mentioned earlier.

First, run Hercules and attempt a TCP connection. Use the values set above.

Hercules TCP Client setting

  • First, run Hercules and try to establish a TCP connection. Use the values set earlier.
  • Select the TCP Client tab, enter the TCP Server address and port information,
  • And press the Connect button to complete.

Now you can verify that the data sent will be received by TW100xx UART Channel 1. The reverse case also works well.

It is recommended to apply the same process to UART Channel 2, 3, and 4 for testing.

Caution!

It’s possible to assign the same port number, but this makes it difficult to determine which UART Channel is connected to the TCP Client. Therefore, it is recommended to give each a different server port number.

카테고리: BlogEnglish

0개의 댓글

답글 남기기

Avatar placeholder

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

ko_KRKorean