Description Of Functions; Initialization; Tcp Protocol - Advantech EH-8100 Reference Manual

Ethernet & tcp/ip protocols stack
Table of Contents

Advertisement

Description of Functions

1. Initialization

In order to use the Ethernet I/F of EH-8100-Lx, the basic registers that are required to run the
Ethernet I/F of EH-8100-Lx need to be set up. The basic registers include GAR (Gateway Address
Register), SMR (Subnet Mask Register), SHAR (Source Hardware Address Register), and SIPR
(Source IP Address Register).
GAR, SMR and SIPR are the network information on which the Ethernet I/F of EH-8100-Lx is
operated, and the registers need to be set according to the operating environment. SHAR is the
Hardware address to be used at the MAC layer of the Ethernet I/F of EH-8100-Lx, and the address
already provided to the manufacturer is used.
After appropriately setting up above registers, the Ethernet I/F of EH-8100-Lx can activate in the
network by executing the sys_init command. Activation can be verified by using Ping (ICMP Echo
request).

2. TCP Protocol

TCP is a connection-oriented protocol. By using three-way handshaking method in executing the
connection set-up and termination process, reliable data transmission and reception are assured.
TCP Initialization Process
In order to use TCP, the protocol field of the corresponding channel's Cx_SOPR (Socket
Option/Protocol Register of Channel x) needs to be set up as SOCK_STREAM(0x01). After the
channel is activated by sock_init command, Cx_TW_PR (Tx Write Pointer Register of Channel x),
Cx_TR_PR (Tx Read Pointer Register of Channel x), and Cx_TA_PR (Tx Ack Pointer Register of
Channel x) need to be initialized with same value.
TCP Connection Set-up Process
In the Ethernet I/F of EH-8100-Lx, the TCP connection process as directed by Connect or Listen
command is processed internally.
Sending SYN Packet as directed by Connect command is called active open, and standing by for
SYN Packet from peer as directed by Listen command is called passive open.
Active open.
TCP Client mode that knows the IP address and port number of the destination, and the connection
set-up is made ahead.
- 16 -

Advertisement

Table of Contents
loading

Table of Contents