
Chengdu Ebyte Electronic Technology Co., Ltd.
NB1A1User Manual
Copyright ©2012–2023
,
Chengdu Ebyte Electronic Technology Co., Ltd.
19
4.4.4 UDP Client
The UDP Client is a connectionless transport protocol that provides simple and unreliable
transaction-oriented information transmission services. No connection is established or disconnected.
Data can be sent to each other only by configuring the destination IP address and destination port. It
is usually used in the data transmission scenario where the packet loss rate is not required, the packet
size is small, the transmission frequency is fast, and the data needs to be transmitted to the specified
IP address.
In UDP Client mode, the device communicates only with the remote UDP device configured with the
destination IP address and destination port.
In this mode, when the target address is set to 255.255.255.255, the sending and receiving devices
need to ensure that the ports are the same and that the devices can receive broadcast data.
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.
4.4.5 HTTP client
This mode can realize the HTTP automatic packet grouping function, providing two ways of
GET and POST. Customers can configure the URL, Header and other parameters by themselves, and
send the packet grouping by the device to realize the rapid communication between serial data and
the HTTP server. The maximum value of URL and Header data is 128 bytes. The 16 channels can
enable the HTTP client mode independently without affecting each other.
The HTTP request data should be smaller than the package length (512 bytes); otherwise, the
device will divide the request data into multiple packets for request, resulting in request exceptions.
You can configure whether to return the HTTP packet header. The returned data is shown in the
following figure
:
Start the host computer, search for devices, and enter the device configuration page. Set Network
Parameters first. DHCP is recommended to avoid device IP anomalies (network segment errors, IP
conflict, etc.) caused by incorrect configurations. Configure the HTTP client mode on 16 channels
that require HTTP. This section uses GET to request the Baidu web page as an example. (URL:
empty, HEADER: Host:www.baidu.com, target domain name :www.baidu.com, target port: 80,
random port is recommended for the local port.) The configuration is as shown in the following
figure
: