
Chengdu Ebyte Electronic Technology Co., Ltd.
NB1A1User Manual
Copyright ©2012–2023
,
Chengdu Ebyte Electronic Technology Co., Ltd.
18
4.4 Device Working Mode
4.4.1 TCP Server
TCP Server Indicates the TCP server. In TCP Server mode, the device listens to the local port,
accepts the connection request of the client and establishes the connection for data communication.
When the Modbus gateway function is disabled, the device sends the data received from the serial
port to all the client devices that are connected to the device.
Each serial port server supports eight clients. If the number of clients exceeds the maximum, the
serial port server refuses to connect.
4.4.2 TCP Client
TCP Client Indicates the TCP client. When the device is working, it initiates a connection
request to the server and establishes a connection to realize the interaction between serial port data
and server data.
The IP address, domain name, and port of the target must be correctly configured when the
client is used.
When serving as a TCP client, you are advised to set the local port to 0, that is, the dynamic
port.
4.4.3 UDP Server
In UDP Server mode, the device does not verify the source IP address of data when it uses the
UDP protocol for communication. After receiving a UDP packet, the device saves the source IP
address and source port of the packet and sets them as the destination IP address and port. After
receiving data from other ports, the device updates the source IP address and source port of the
packet. Therefore, the data sent by the device only sends data packets to the source IP address and
port of the last data received by the device.
This mode is usually used when multiple network devices communicate with the local device at
a high frequency, and the TCP Server cannot meet the requirements
。
If the UDP Server is used, the remote UDP device must send data first. Otherwise, data cannot
be sent properly. After receiving any packet of data, the PORT indicator lights up
。
Note: In UDP mode, the data sent by the network to the device must be smaller than 1472 bits per
packet; otherwise, data loss may occur.