User’s Manual Version 1.
4
Serial to Ethernet Device Server
STE-501C
Copyright © 201
7
Antaira Technologies, LLC
All rights reserved.
36
Figure 6.1 TCP test sample program in Visual Basic
6.2.2 TCPTEST2 in Visual C
To start the program, please type 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 one 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. One can also send binary data in hex format with a
leading character “\”. For example, “\00” and “\FF” represent ASCII code 0 and 255 respectively.
One 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.