2 tcptest2 in visual c – Atop Technology SE5404D User manual User Manual

Page 64

Advertising
background image

User manual Version 1.3

4-Port DIN-Rail Serial Device Server SE5404D

Copyright © 2011 Atop Technologies, Inc.

All rights reserved. Designed in Taiwan.

- 63 -

Figure 6.1 TCP test sample program in Visual B

6.2.2 TCPTEST2 in Visual C

Enter in the following command in the command line prompt(Figure 6.2):

TCPTEST2 IP_Address Port_Number

Figure 6.2 TCP test sample program in Visual C

The command tcptest2 10.0.50.100 4660 brings you to connect to a TCP server of IP address 10.0.50.100 and
port number 4660, the received data is displayed on the screen and the data typed in is sent to the TCP server of
the designated port number. You can also send binary data in hex format with a leading character “\”. For example,
“\00” and “\FF” represent ASCII code 0 and 255 respectively.

You can also use modem to connect to the serial server. Command "AT\Od" sends standard AT command to the
modem which in return responds with "OK\0D\0A" message to the host application.

Always use '=' then Enter key to exit the program.

Advertising