ZY-128 (TCP) Instruction Manual
ZY-128 (TCP) Instruction Manual
user's guide
catalogue
Product overview ......................................................................................................................2、3
Product upgrade instructions ..........................................................................................3、4
Configure the installation and use of the software ..........................................5、6、7
TCPClient pattern .................................................................................................................8、9、10
TCPServer pattern .................................................................................................................11、12
UDPClient pattern ..................................................................................................................13、14
UDPServer pattern .................................................................................................................15、16
HTTPClient pattern ................................................................................................................17、18
MQTTClient pattern .........................................................................................................19、20、21
ModbusGateway pattern ..........................................................................................................22
Reader instructions instructions ..................................................................................23、24
2024.2.22
Product overview
ZY-128 (TCP) network card reader is an integrated TCP Client, TCP
Server, UDP Client, UDP Server, HTTP Client, MQTT, Modbus
gateway, you can update and switch back and forth between
different versions.
V0.0.1: Support for Modbus gateway;
V0.0.2: Support for MQTT Client;
V0.0.3: Support for HTTP Client;
V0.0.4: TCP / UDP is supported or above. The larger the version
number is, the more new the firmware is.
essential parameter:
working voltage DC12V
working current <50mA
working
-40 ~ 85 degrees C
temperature
Working
10% ~ 90% RH (no condensation)
humidity
size 84X84X20mm
Type of card
EM (ID), MF (IC) dual frequency
reading
10 mmpsT (X) ten MB adaptive RJ 45 interface,
Ethernet
cross / through network cable adaptation, built-in
specifications
network transformer
The factory already has a unique MAC address
MAC address
and supports user customization
ARP, DHCP, TCP Client, TCP Server, UDP Client,
networking
UDP Server, HTTP Client, MQTT, and Modbus
protocol
gateway
Parameter
String mouth, network
configuration
IP acquisition
Static / dynamic
method
DNS domain
support
name resolution
Custom
Registration support
Pack
Custom Serial ports / network all support custom
heartbeat pack heartbeat packets
firmware support
upgrade
One key to
restore the support
factory Settings
electric relay Group 1
point out
pay attention to
Parameter configuration
point out
pay attention to
the network cable (the product supports cross / direct network cable
adaptation function), select in the upper left corner of the
configuration software, and click the search button. If the product
works under dynamic IP (dynamic IP is the default) and is connected
to the router, it needs to obtain the IP; If the product works under
dynamic IP and is directly connected to the computer, it needs to
wait 40 seconds to find the device after the network cable, the
device can be found within 3 seconds after the startup and
connection under the static IP. After searching for the device, select
a device from the list to configure it.
This product has two UART ports. You can configure the
parameters through any UART port in it. Select in the upper left
corner of the configuration software, and select the correct port
rate, data bit, stop bit, and check bit (the default parameter of both
UART ports of this product is 115200 / 8 / N / 1. If you have set the
serial port parameters of this product but do not remember, then
you have two solutions: 1. Release the reload foot for more than 1
second, and the module will be restored to the factory setting; 2.
Check the network cable with the configuration tool.)
TCPClient pattern
dead work
point out
When this product is used as TCP Client, you need to know the IP
address (or domain name) and listening port number of the TCP
Server you built, otherwise you do not need to read subsequent
content.
pay attention to
If this product is in the same local LAN, please confirm whether they
are in the same network segment. Please read about dynamic /
static IP for details
If you create TCP Server with personal computer for testing, please
be sure to close the firewall and antivirus software of personal
computer; if the TCP Server is created with cloud server, please
remember to open the port for your monitoring
After modifying the parameters, please click "Submit Settings" - - ->
"Restart effective".
Configuration steps
1. Working Mode drop-down box select TCP Client.
4. Type the Local Port input box '0', '0' means that the product will
connect to the target server with a random local port number,
otherwise you may not be able to connect to your TCP Server
normally. If you need to specify a local port, make sure that your
server firewall and antivirus software allow reconnection initiation
with the same port number.
Registration package
Users can enable and set up the content and registration method of
the registration package. When enabled and set up, the registration
package is sent to the TCP Server over the network.
1. Use the MAC address or user custom data as a registration
package.
2. The registration package can be set to send after a successful
TCP connection.
3. The registration package can be added to the header of the
packet received by the serial port.
4. Clause 2 and 3 above may be met simultaneously.
5. After modifying the parameters, please click "Submit Settings" - -
-> "Reart Effective".
Heartbeat bag
Users can turn on and set the content of the network heartbeat
packet and the heartbeat interval according to their own needs.
After setting, click "Submit Parameters" - - -> "Reart Effective", and
the product will send your set heartbeat packet to the TCP Server
through the established TCP connection.
TCPServer pattern
pay attention to
If this product is in the same local LAN, please confirm whether they
are in the same network segment. Please read about dynamic /
static IP for details
After modifying the parameters, please click "Submit Settings" - - ->
"Restart effective" two buttons
Configuration steps
1. The Working Mode drop-down box, select TCP Server.
2. 2. The Local Port input box types the port you want to listen to
(except 0 and 5002). If you are using our multi-serial product then
be careful not to conflict with local ports in other serial tabs. Also do
not have the same web port in the basic parameters (factory default
is 80).
3. 3. After modifying the parameters, please click "Submit Settings"
- - -> "Reart effective" and then the product can receive TCP Client
access.
Heartbeat bag
Users can turn on and set the content of the network heartbeat
packet and the heartbeat interval according to their own needs.
After setting, click "Submit parameters" - - -> "Reart effective", and
the product will send your set heartbeat packet to all connected TCP
Client through the network at the set frequency.
UDPClient pattern
pay attention to
2. The Local Port input box types the port you want to listen to
(except 0 and 5002). If you are using our multi-serial product then
be careful not to conflict with local ports in other serial tabs. Also do
not have the same web port in the basic parameters (factory default
is 80).
Heartbeat bag
Users can turn on and set the content of the network heartbeat
packet and the heartbeat interval according to their own needs.
After setting, click "Submit parameters" - - -> "Reart Effective", and
the product will send your set heartbeat packet to the target device
through UDP at the set frequency.
UDPServer pattern
pay attention to
2. The Local Port input box types the port you want to listen to
(except 0 and 5002). If you are using our multi-serial product then
be careful not to conflict with local ports in other serial tabs. Also do
not have the same web port in the basic parameters (factory default
is 80).
Heartbeat bag
Users can turn on and set the content of the network heartbeat
packet and the heartbeat interval according to their own needs.
After setting, click "Submit parameters" - - -> "Reart Effective", and
the product will send your set heartbeat packet to the target device
through UDP at the set frequency.
The difference between UDP Server and
UDP Client
Generally, both have the same function, but use UDP Server for
those that do not know that the opposite device IP / port or the
opposite device IP / port will change, because the UDP Server will
track the IP of the device and the source port and use it as the new
target IP and port. In UDP Server mode, if a UDP device sends any
packet of data to the local port of the product, the data received by
the product through the serial port will be sent to the source port of
the device until another UDP device sends data to the product.
HTTPClient pattern
pay attention to
2. Type the domain name / IP and port number of your web server in
the Target IP / Domain Name and the Target Port. Please contact
your web server manager.
5. Type the api path for the web server in the Request URL, and
contact your web server leader for this issue.
8. If you select https in the Request Agreement, type the public key
content in the HTTPS Public Key column. Please contact your web
server manager.
MQTTClient pattern
pay attention to
2. Type the domain name / IP and port number of your MQTT Broker
in the Target IP / Domain Name and the Target Port. For this
problem, please contact your MQTT Broker server leader or service
provider.
4. Fill in the "User name" and "password" for the MQTT Broker
access according to your specific situation. If Broker allows
anonymous access, these two items are empty. For this problem,
please contact your MQTT Broker server leader or service provider.
When the user receives the {"online": true} message through the
serial port, it indicates that the module is connected to the server or
reconnects to the server due to some factor, the user needs to
subscribe all the tops they want to subscribe through the following
instructions:
{"ispub":false,"topic":"your_topic","qos":0}
{"ispub":true,"topic":"your_topic","qos":0,"retain":false,"msg":"010203"}
If you have subscribed to the above top through the serial port, you
will receive at the serial port:
{"topic":"your_topic","msg":"010203"}
Each time you send an instruction to the module, you get a correct
or incorrect feedback:
ModbusGateway pattern
pay attention to
2. Local port Type the port number you want to listen, (Modbus TCP
default port number is 502).
The eighth to thirteenth bytes are the header data class capacity. If
the header length is 0, the six bytes are 0. If the header length is 6,
the corresponding six bytes should write the corresponding data
The fifteenth to twenty bytes are the ending data. If the end length
is 0, the six bytes are 0. If the end length is 6, the corresponding six
bytes should write the corresponding data
Twenty 1 byte for space and return (0D0A) is at the end of the front,
if set to 1 that is at the end of 0D 0A, if set to 2 that is at the end of
0D, if set to 3 that is at the end of the 0A, if set to 4 that is at the
end of nothing
The twenty-two byte is the data format, which is the card code data
format has a total of 9 data formats
1, for the four-byte hex system (8H)
2, for the four-byte decimal system (8H10D)
3, for the three-byte sixteen decimal system (6H)
4, for the three-byte decimal (6H8D)
5, with two zeros (6H10D)
6, for the last eight decimal digits (8H8D)
7, the last eight card number (1H10D + 2H10D)
8, for a five-byte decimal (10H13D)
9, for five byte sixteen (10H)
The 23rd byte sends the data, set to 1 means the card number is
the positive code, and the data to 2 indicates the reverse code of
the card number.
The 24th byte for data is ASCII code or HEX code 1 is ASCII code 2 is
HEX code
The 25th byte is sent data with check or without check 1 is with no
check 2 is with different or check 3 is with and check
For example: Porter rate 9600 data format is 02 head four bytes
hexASCII code card number 0D 0A 03 end (02 30 38 41 43 44 38 39
36 0D 0A 03), the data format is set as follows:
19 Total number of data
88 Command character
00002580 9600 baud rate
01 Head length
020000000000 head data content
01 End length
030000000000 end data content
01 plus 0D0A
01 The data format is 8H
01 Positive code
01 The ASCII code
01 without calibration
34 All previous data differences or check
Complete command:
19 88 00 00 25 80 01 02 00 00 00 00 00 01 03 00 00 00 00 00 01
01 01 01 01 34
Note: commands are sent in 16 system, not ascll code