Tcp Server Functions; Udp Client Functions; Udp Server Features - Ebyte ECAN-W01 User Manual

Wireless modem
Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co., Ltd
communication mode.
(2) When ECAN-W01 attempts to connect to the server in TCP Client mode and the local port
is 0, it initiates a connection with a random port each time.
(3) In the same LAN, if ECAN-W01 is set as a static IP, please keep the IP and gateway of
ECAN-W01 in the same network segment, and set the gateway IP correctly, otherwise normal
communication will not be possible.

4.2.3. TCP Server Functions

(1) TCP Server is the TCP server. In TCP Server mode, ECAN-W01 listens to the local port,
accepts and establishes a connection for data communication when a connection request is sent,
and sends the data to all client devices that establish a connection with ECAN-W01 at the same
time after receiving the data.
(2) It is usually used for communication with TCP clients in the LAN. It is suitable for
scenarios where there is no server in the LAN and multiple computers or mobile phones request
data from the server. Like TCP Client, it has the difference between connection and disconnection
to ensure reliable data exchange.
(3) When ECAN-W01 is used as a TCP server, up to 8 clients can be supported in a dual socket,
and up to 4 clients can be supported in a single socket. The local port number is a fixed value
and cannot be set to 0.

4.2.4. UDP Client Functions

(1) UDP Client is a connectionless transmission protocol that provides simple and unreliable
transaction oriented information transmission services. Without connection establishment and
disconnection, you only need to specify an IP and port to send data to the other party. It is
usually used in data transmission scenarios where there is no requirement for packet loss rate,
the data packet is small, the transmission frequency is fast, and the data is to be transmitted
to the specified IP.
(2) In UDP Client mode, ECAN-W01 will only communicate with the target port of the target
IP. If the data does not come from this channel, the data will not be received by ECAN-W01.
(3) In UDP Client mode, if the target address is set to 255.255.255.255, the effect of UDP
full network segment broadcast can be achieved, and broadcast data can also be received. ECAN-W01
module supports broadcast within the network segment, such as the broadcast mode of xxx. xxx.
xxx. 255.

4.2.5. UDP Server Features

UDP Server does not verify the source IP address on the basis of ordinary UDP. After receiving
(1)
a UDP packet, it changes the target IP address to the data source IP address and port number.
When sending data, it sends the IP address and port number of the latest communication.
©2012–2022, Chengdu Ebyte Electronic Technology
Copyright
Co.,Ltd
ECAN-W01 User Manual

Advertisement

Table of Contents
loading

Table of Contents