SENA HD132x Series User Manual

Page 38

Advertising
background image

HD132x Series User Manual

38

5.2.1 When the HelloDevice is TCP Server with a static IP address

The sample program enables the user to connect to the HelloDevice and send strings to the

HelloDevice, when the HelloDevice has been set as TCP server mode. The only difference from the

previous section is that we use the sample program for TCP/IP terminal program instead of TeraTerm

Pro. In this section, we will describe how to establish the connection and check data communication.

1) Connect serial ports of HelloDevice and the PC with the serial cable.

2) Launch serial terminal program such as TeraTerm Pro.

3) Open “Server.dsw” file in the “Server” folder and “Build” and “Run” the program.

4) Enter the IP address of the HelloDevice.

Figure 5.6 is a sample when the IP address of HelloDevice is 192.168.1.15.

Figure 5.6 Running Server.exe

5) Enter the Character string and press [Enter].

The character string you entered will be displayed on the serial terminal program of the PC.

Below is a major part of the sample program. Main contents are TCP socket initialization, TCP socket

open/close and TCP/IP data send functions. For details on window socket programming, refer to

Advertising