ZLAN7146 User Manual
ZLAN7146 User Manual
Multi-function
WIFI Serial Device Server
RS232/485/422 To WIFI
1
CopyRight©2008 Shanghai ZLAN Information Technology Co., Ltd. All right reserved
Version Information
History
Copyright information
Information in this document is subject to change without notice. It is against the law to
copy the document on any medium except as specifically allowed in the license or
nondisclosure agreement. The purchaser may make one copy of the document for backup
purposes. No part of this manual may be reproduced or transmitted in any form or by any
information storage and retrieval systems, for any purpose other than for the purchaser’s
personal use, without the express written permission of Shanghai ZLAN information
2
Content
1. Summary ................................................................................................................................ 5
2. Function Features ................................................................................................................ 7
2.1 General Software Features .................................................................................... 7
2.2 Advanced Software Function ................................................................................ 8
3. Technical Parameters.......................................................................................................... 9
4. Hardware Instruction ......................................................................................................... 10
5. Wifi Function ....................................................................................................................... 13
5.1 AP Mode.................................................................................................................... 13
5.2 STA Mode.................................................................................................................. 17
5.3 5.8G Usage ............................................................................................................... 17
5.4 Wifi Connection in pairs ....................................................................................... 17
5.5 Antenna Choose ..................................................................................................... 18
6. Using Steps ......................................................................................................................... 18
6.1 Using Overview ....................................................................................................... 18
6.2 Software Installation.............................................................................................. 18
6.3 Parameter Configuration ...................................................................................... 19
6.4 TCP communication test ...................................................................................... 25
6.5 Virtual serial port test ............................................................................................ 28
6.6 Modbus TCP test .................................................................................................... 31
6.7 Web Configuration ................................................................................................. 32
7. Work Mode and Transfer Protocol ................................................................................. 34
7.1 Virtual Serial Mode ................................................................................................. 35
7.2 Direct TCP/IP Communication Mode ................................................................. 36
7.2.1 TCP Client Mode ......................................................................................... 36
7.2.2 The Client connects to Multiple Servers .............................................. 37
7.2.3 TCP Server Mode ........................................................................................ 39
7.2.4 Be both Client and Server ........................................................................ 39
7.2.5 UDP Mode ..................................................................................................... 40
7.3 Device Pairs-connect Mode ................................................................................. 41
8. Device Debugging .............................................................................................................. 43
8.1 Network Physical Connection............................................................................. 43
8.2 Network TCP Connection ..................................................................................... 43
8.3 Data Sending and Receiving ............................................................................... 44
8.4 ZLVircom Remotely Monitor Data ...................................................................... 45
9. Modbus Advanced Features............................................................................................ 46
9.1 Enable Modbus Gateway ...................................................................................... 47
9.2 Storage Modbus Gateway .................................................................................... 47
9.3 Disable Storage Functionality............................................................................. 50
9.4 Multi-host Function................................................................................................ 51
3
9.5 Multi-host Parameter ............................................................................................. 52
9.6 Non-storage Multiple Hosts ................................................................................. 54
9.7 Modbus Under Multi-destination IP ................................................................... 54
9.8 Slave Station Under Client Mode ....................................................................... 55
10. Registration Pack and Heartbeat Pack ................................................................. 56
10.1 Registration Packet ............................................................................................... 57
10.1.1 Connect to send MAC Addresses .......................................................... 57
10.1.2 Realcom Agreement .................................................................................. 58
10.1.3 Custom Registry ......................................................................................... 59
10.1.4 Transcode Configuration Files ............................................................... 60
10.2 The Heartbeat Packets .......................................................................................... 60
10.2.1 Implied Heartbeat ....................................................................................... 61
10.2.2 REALCOM agreement ............................................................................... 61
10.2.3 Customize Heartbeat Packets ................................................................. 61
11. HTTPD Client Communication Function .............................................................. 62
12. Transcoding Functions ............................................................................................. 63
12.1 Enable the Transcoding........................................................................................ 63
12.2 Case of Transcoding Implementation ............................................................... 65
12.3 Notice ........................................................................................................................ 66
13. Network Interface to Modify Parameters.............................................................. 66
14. Device Management Function Library .................................................................. 67
15. Serial Port Modify Parameters ................................................................................ 68
16. Remote device management ................................................................................... 68
17. Firmware upgrade method....................................................................................... 71
18. Multi-wifi Parameter Configuration........................................................................ 73
18.1 Usage scenarios ..................................................................................................... 73
18.1.1 STA Mode Restored to AP ........................................................................ 74
18.1.2 Multi-router Backup ................................................................................... 74
18.2 Wifi.txt File Format ................................................................................................. 74
18.3 Download method .................................................................................................. 76
18.4 Wifi.txt example ...................................................................................................... 77
18.4.1 STA mode restored to AP ......................................................................... 77
18.4.2 Multi-router Backup ................................................................................... 78
18.5 Notice ........................................................................................................................ 78
19. Order information ....................................................................................................... 80
20. After-Service ................................................................................................................ 80
4
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
1. Summary
ZLAN7146 is another serial device server launched by Shanghai ZLAN after
7146 adopts the latest WIFI chipset, which has stronger WIFI performance and higher
cost performance. Use ARM M4 kernel, main frequency 192MHz, and use real-time
(currently both of them are 2.4G frequency bands in AP mode), and others are similar
to 7146.
Ethernet interface (RJ45 is for future extended use). Support Modbus TCP to RTU,
The high quality power supply design in 9~48V wide voltage provides better industrial
5
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
The serial device server can easily make serial device connected WIFI network,
implement the wireless network upgrade of the serial device. RS232 interface support
protection. The Wifi supports STA mode to connect to the wireless router, or as AP
mode which mobile phones and other wifi devices can connect to.
For users using virtual serial port can use ZLAN ZLVircom software to achieve a
virtual serial port, the original PC software of serial no need modification. You can also
use the Modbus TCP protocol in the Configuration Software to directly connect with
The typical application is shown as FIG. 2. The original serial devices connect with
ZLAN7146, then connect ZLAN7146 to wireless network through the WIFI. Then any
ZLAN7146, and data sent to ZLAN7146 from PC via network will also be transparently
6
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
2. Function Features
2.1 General Software Features
1) Support 802.11b/g/n.
2) Wide voltage power supply: 9~48V supply scope. The power input type can
3) Support three forms of serial port: RS232/485/422. Support hardware flow control
4) Sticky package optimization, the real-time of serial framing is strong. The serial
packet sub-package interval of ordinary WIFI serial port server is over 100ms,
7
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
5) Support upgrading program through Ethernet port in the system. Support remote
network upgrades.
7) Provide 4 kinds LINK indicator interface: Link blue indicates the TCP connection
established, LINK green indicates the Ethernet cable is connected, WIFI blue
indicates establishing wifi connection as AP or STA, WIFI green indicates the wifi
function works normal. The abundant indicators can directly shows the device
status.
8) One-key search configuration. When the wifi and PC or router establish link, using
Server.
10) Support TCP sever, TCP client, UDP/UDP multicast. As Server can support up to
30 TCP connections communicating with the networking module at the same time;
11) Support the function of device connecting with sending MAC address to facilitate
12) It supports remote viewing of TCP connection status, serial port data sending and
receiving status of devices through software. Virtual serial port supports data
monitoring.
1) Support Modbus gateway function, support Modbus RTU to Modbus TCP. Can
support storage Modbus, and can automatically collect the equipment data. Also
8
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
2) Support for multiple hosts: the network port allows multiple computers to access
the same serial port device at the same time in ask-answer query mode.
5) Support "transcoding" function, which can realize the translation of protocols for
specific devices and allow different devices to connect to the unified software
platform.
6) The data submission and sending function in HTTP mode is supported, and the
cloud can directly use HTTP GET instructions to interact with the serial port data
of the device.
3. Technical Parameters
Figure
Power Supply: Inside positive outside negative, standard outlet; Two lines terminal
Size: L x W x H =9.4cm×6.5cm×2.5cm
Communicate Interface
Wifi 802.11a/b/g/n
Serial Parameters
WLAN
9
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
2.4G: 802.11b/g/n:-96.4dBm
Receiving Sensitivity
5G: 802.11a/n:-92.8dBm
Hardware
Software
Protocol TCP/UDP/ARP/ICMP/DHCP/DNS/HTTP
Environment
Humidity: 5~95%RH
4. Hardware Instruction
The front view of ZLAN7146 WIFI serial server is shown in Figure 3. ZLAN7146 uses
black anti-radiation SECC board. Left and right are with two "ears" to facilitate the
installation.
Size:
10
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Panel Light:
1) ACT: ACT lights up when green indicates that data is normally transferred
between WIFI/Ethernet and RS232/485/422. When the ACT light blinks blue, it
the data is short then blue flashing time is relatively short, need to pay attention to
view.
2) LINK: LINK lights are green when the RJ45 cable is connected. When the LINK
mode.
4) WIFI: WIFI light is blue indicates the WIFI as STA establishes wifi connection with
11
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
The serial interfaces in front of the server area shown in Figure 4, from left
there have:
2) R-, R+, T+, T-: where T+ is RS485A, T- is RS485B; if you need RS422, you
4) Power outlet: you can use the standard 5.5mm plug (core for the positive),
The back panel of serial server is as shown in Figure 5, from left there have:
1) WIFI antenna. You can choose the extending line antenna, easy to install to
12
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
2) Reset switch: putting on the reset mode, will reset wifi work mode to the AP
3) Serial port using standard DB9 male: line sequence as shown in Table 1:
5 GND Grounding
7 RTS After the flow control is enabled, when the pin is 0, the serial
device server can accept the data of the serial device.
8 CTS After the flow control is enabled, when the pin is 0, the serial
device server can send the data of the serial device.
5. Wifi Function
Install the antenna and power the module.
5.1 AP Mode
Do not plug the cable, put 7146 power on. After a while you can see WIFI_WORK
light began to flash, indicating the wifi function has been normal. By default 7146
is in AP mode and SSID is "ZLAN". See "ZLAN" in the wifi list of PC, connect the
wifi.
13
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
After connecting the laptop, you can automatically get an IP address from 7146.
Click ZLVircom software "Device Manage" button, you can see a line in the device
Double-click the line to open the Device Parameter Edit dialog box.
14
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Here you can see one of the device model ZLAN7146, ZLSN7044 and so on.
Here you can also configure the IP address and baud rate, the meaning of these
parameters will introduce after. Please click on "More Advanced Settings", you
can configure the 7146 wifi parameters in the open dialog box.
15
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
16
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
password mode you just select "no encryption" type; password method is
When the STA mode is used, the user enters the SSID, encryption mode, and
password of the pre-connected router in FIG. 9. When you do not know the
When the STA mode is used, 7146 will automatically connect to the AP hotspot
after power-on. At this time, the WIFI_WORK light is flashing quickly, indicating
that it is in the connecting state. WIFI_LINK lights will be on when the connection
is established.
STA mode support automatic reconnection, such as AP hot restart, 7146 can
that whether the encryption mode, password, SSID is correct, whether the
In figure 9, select enable in "RJ45 WIFI Relay", and it will work in 5.8G mode.
Currently it only supports 5.8G connecting to routers, as 5.8G STA mode. 5.8G AP
17
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
When the 2 7146 establish connection via wifi, WIFI_LINK light will be on.
If you choose to use the built-in antenna module, no need external antenna, if you
need an external antenna you need to meet the following characteristics, ZLAN
Impedance 50 Ohm
VSWR 2 (Max)
6. Using Steps
6.1 Using Overview
Please use ZLVircom to do the configuration for 7146. When 7146 access network
through Ethernet port or wifi, the computer in same LAN can search and configure
ZLVircom can be used to configure the device IP and other parameters, also can
create virtual serial port. If no need the virtual serial port function, you can
18
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Software Description
ZLVircom Device Management Tool This version no have the virtual serial
Just follow the default prompt when installing. Upon completion of the installation,
ZLVircom will be started each time the computer is started, which is used to boot
After installing ZLVircom, the hardware also connecting, run ZLVircom software as
figure 10, and click "Device Manage" as figure 11. Use ZLVircom can search and
long as the device and computer of running ZLVircom are under the same switch.
19
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
From the device list, you can see all of the current online devices, and you can
search for devices that are not in one network segment. There is no need to use
20
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
In this interface, the user can set the parameters of the device, then click "Modify
Setting", and the parameters are set to the flash of the device, with power-off no
The main configuration parameters are: baud rate, data bit, and check bit in serial
port setting; IP address, subnet mask, gateway in network setting; Sometimes you
need to configure the work mode of the serial port server according to the
computer software.
Virtual Serial Non-in use, created You can bind the current device to a created virtual serial
virtual serial port port.
21
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Dev Name Any You can give the device a readable name, with a maximum
of 9 bytes, and support the Chinese name.
IP Mode Static, DHCP The user can choose Static or DHCP (Dynamic acquisition
of IP)
Port 0~65535 The monitoring port of Networking products when in the TCP
Server or UDP mode. As a client, it is best to specify that the
port is port 0, which is good for increasing the connection
speed, and the system will randomly assign a local port
when using the 0 port. At this time the difference from
specifying the non-zero port are: (1) local port is 0, module
sets up a new TCP connection with PC when restarting, old
TCP connection may not be closed, so that the old TCP
connection of the host has been unable to close, specify the
non-zero port does not have the problem. Generally host
wants to close the old connection when the module is
restarted. (2) the local port is 0, the time of TCP rebuilding
connection is faster.
Work Mode TCP Server(TCP Server When set to TCP Server, the network Server needs to
Mode),TCP Client(TCP actively connect the networking products; When set to TCP
Client Mode),UDP Client, the networking product initiates the connection to the
Mode, UDP Multicast network server specified by the destination IP.
Net Mask Eg: 255.255.255.0 Must be same as net mask of local LAN.
Gateway Eg: 192.168.1.1 Must be the same as the local LAN gateway. If it is not
crossing outer network (such as the cable connecting
computer), it is best to set the gateway as the IP address of
the connected computer.
Dest. In the TCP Client or UDP mode, the data will be sent to the
IP/Domain destination IP or the computer of domain name instruction.
Dest. Port In the TCP Client or UDP mode, the data is sent to the
destination port of the destination IP.
22
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Data Bits 5, 6, 7, 8, 9
Stop Bits 1, 2
Dest. Mode Static, Dynamic UDP working mode: if the destination computer is described
by a domain name, it’s best to choose the static mode; If
there are multiple computers in the LAN communicating with
networking products through UDP, it is best to choose
dynamic mode.
Transfer NONE, Modbus NONE indicates that the data forwarding from the serial port
Protocol TCP<->RTU, to the network is transparent; Modbus TCP<->RTU will
Real_COM convert Modbus TCP protocol directly into RTU protocol to
facilitate coordination with Modbus TCP protocol; RealCOM
is designed to be compatible with the old version of
REAL_COM.
Keep Active 0~255 (1) Choose 1~255, if the device is in the TCP client working
Time mode, the TCP heartbeat will be sent automatically for
every "keep alive time". This can guarantee the TCP
availability of links. When set to 0, there will be no TCP
23
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
heartbeat.
Max Frame 1~1400 One of the rules of serial. The connected product serial port
Length sends the received data to the network as a frame after
receiving the length data.
Max Interval 0~255 One of the rules of serial. When there is a pause in the data
(Smaller will received by the connected product, and the pause time is
better) greater than that time, the received data is sent to the
network as a frame.
Name Instruction
Webpage download Support to control the serial output command through the web page,
only the product with the trailing W has this function.
24
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Domain name system The destination IP can be the domain name (such as the beginning
of the WWW server address).
Modbus TCP to RTU Only the models that the third bit is 4 support this function. Modbus
TCP to RTU can be implemented. It also supports multi-host
capabilities.
Serial port modify The serial port modification parameter supports the serial port AT
parameters instruction to configure and read the device parameters.
Multiple TCP Support more than one TCP connections as a TCP server.
connections
Proxy server Support the proxy server functionality (a specific model is required).
SNMP function Support SNMP to Modbus RTU protocol. Only those with -snmp tails
support this feature.
P2 function Support the ability to access devices in any network through P2P
across technology. This feature is supported in model N with trailing
patches.
After the device parameters are configured, TCP connection communication can
25
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Now suppose the PC COM port (USB to RS232 line) connect with serial port of
serial device server, then open the serial debugging assistant ZLComDebug, and
open the corresponding COM as figure 14; Open TCP&UDP debugging assistant
SocketTest, and as TCP client, fill in the destination IP for the serial port server IP
(currently 192.168.1.200), destination port is 4196, and then click "open" button in
figure 15. Enter "socket send" in SocketTest and click send, then the data is
transferred to RS232 interface through the network port of the serial port server,
Conversely, type "Comdebug send" in ZLComDebug, and clicking send can also
26
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
27
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
SocketTest in figure 13 communicates directly with the serial port server through
TCP. In order to enable users to communicate with the serial port server with the
developed serial port software, it is necessary to add a virtual serial port between
the user program and the serial port server. As shown in figure 16, ZLVircom and
the user program run on a computer, and ZLVircom virtual a COM port, so that the
COM port corresponds to the serial port server. When the user program opens the
Click on the "Serial Manage" of the main interface of ZLVircom, then click "Add",
and select COM5, where COM5 is the COM port that didn’t exist on the computer.
28
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Then enter the “device manage”, and double-click the device that you need to bind
to the COM5. As shown in FIG. 12, select COM5 from the "virtual serial port" list in
the upper left corner. Then click "modify Settings". And return to the main interface
of ZLVircom. You can see that the COM5 has been connected to a device with IP
29
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Now close the before SocketTest and open a new ZLComdebug as the user's
serial port program, now open COM5. At this point, COM5 (virtual serial port) and
COM4 (hardware serial port) can send-receive data through networking products.
If the serial port of the connected product is not connected to the COM port of PC,
but a serial port device, then the COM5 can be opened to communicate with the
30
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
implement the Modbus TCP to RTU, requires selecting “transfer protocol” for
"Modbus TCP RTU" in the Settings dialog, as shown in figure 20. At this point,
the device port is automatically changed to 502. At this point, the user's Modbus
TCP tool is connected to port 502 of IP of serial port server, and the Modbus TCP
instruction sent will be converted into RTU instruction output from the serial port.
For example, the serial port server network port receives the Modbus TCP
mode, which will automatically poll to query. It'll show you how to switch to
non-storage.
31
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
If the user's Modbus TCP software is used as Slave, it is necessary to change the
working mode to client based on the transfer protocol selection, and the
network segments. The configuration of the Web mode requires that the computer
and the serial port server are in the same IP segment, and the IP address of the
serial port server should be known in advance. But the Web configuration can be
32
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
1) Enter the IP address of the serial port server in the browser, such as
Figure 22
login.
3) The serial port server parameters can be modified in the web page that
appears, and the related parameters can refer to the meaning of the
33
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
parameters in table 3.
server, so as to be more stable and reliable use, the details are as following.
The use of serial device server is basically divided into two types: with virtual serial
port and non-virtual serial port, as shown in fig.13 TCP communication diagram and
fig.16 function of virtual serial port. The user software with virtual serial port needs to
be connected is the COM port, that is, both the user software and the user device are
serial ports. Non-virtual serial mode user software communicates directly over TCP/IP
In the non-virtual serial port mode, the "Transfer Protocol" is divided into transparent
transmission, Modbus TCP to RTU and Realcom protocol. If the user software is a
fixed Modbus TCP protocol and the host computer is Modbus RTU, Modbus TCP to
RTU mode should be selected. The Realcom protocol is currently only used when a
multi-port server is connected to a server as a TCP client and a virtual serial port is
34
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
If the user software is using COM port for communication, it must use virtual serial
software, etc.
Then check whether the monitoring computer and equipment are in the local
network:
1) If the computer is a public network IP server rented over the Internet, then the
device must use TCP client mode to connect the device to the server. At this
point, you can select the (2) and (5) in Table 5, and must select (5) if it is a
multi-port server.
2) All in the local network (can ping each other), then see is the upper computer
active query or device active send data. If the device is sent initiatively it must
use the device to be TCP client as (2) in Table 5, or you can choose the (1)
way.
35
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
If Modbus TCP conversion is not required and virtual serial port is not required, the
user software may directly communicate with the network port of the serial port
server for TCP/IP communication, and the serial port server will transfer the
TCP/IP data to the serial port data and send it to the serial port device.
software of upper computer by themselves and integrate the analysis of the serial
efficient than virtual serial port. Correspond to (6) and (7) in table 5.
communicate when the serial port server is a TCP server. Here you will learn
about TCP clients, UDP mode, and how multi-TCP connections communicate with
computer software. The computer software takes SocketTest (the software that
ZLAN serial port server is in compliance with the standard TCP/IP protocol, so any
network terminal that conforms to the protocol can communicate with the serial
port server. ZLAN technology provides the network debugging tool (SocketDlgTest
program) to simulate the network terminal to communicate with the serial port
server.
For two network terminals (in this case, the network debugging tool and the serial
be matched.
There are two operating modes under TCP mode: TCP Server and TCP
Client. No matter which mode is adopted, one side must be the Server
side and the other side the Client side. Then the Client side can access
36
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
When the serial port server is the Client, there must be three
correspondence: the working mode of the serial port server is the Server
address of the computer on which the network tool is located; (3) port
correspondence: the destination port of the serial port server must be the
local port of the network tool. In this way, the serial port server can
automatically connect to the network tools, send and receive data after the
connection is established.
When the ZLAN serial port server is a TCP client, it can connect to 7
destination IP addresses at the same time, and the data sent by the serial
don't have that many servers, the rest of the destination IP is vacant. Its
37
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
The first IP is set in the device settings interface shown in figure 25, where
the first IP can be the domain name. For the remaining 2~7 destination IP,
click the "More Advanced Options" button in the device setting interface
reconnect.
Note that if the wifi parameter is set, the number of multi-destination IP will
38
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
destination IP and need to configure the wifi parameter, please use the
format of 18.2wifi.txt file to configure the wifi parameter, and leave the
When the serial port server acts as a Server, there are also three
explanation here. After this setting, click the open button of the network
tool to establish a TCP connection with the serial port server, send and
established TCP connections. If the data need to be sent only to TCP that
The ZLAN serial server supports accepting TCP connections when the
device is on a TCP client, which means that it also has TCP server
functions.
39
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
changed to "TCP Client" mode, the port (that is, the local port)
order to support the TCP Server mode, the computer software must know
figure 28, the computer software can now connect to port 1024 of
192.168.1.200 for communication, and the device will also connect to port
1024 of 192.168.1.189 as the Client. It should be noted that since the local
port 1024 is occupied by the Server, when the local port is used as the
Client, it is "port +1", that is, the software on 192.168.1.189 sees that the
In UDP mode, the parameter configuration is shown in figure 29. The left
side is the configuration of the serial port server in ZLVircom, and the right
side is the setting of the network debugging tool SocketDlgTest. First, both
the destination IP and destination port of the network tool must point to the
local IP and port of the serial server. As indicated by the blue arrow, the
40
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
computer where the network tool is located, while the destination port of
the serial port server must be the local port of the network debugging tool.
Only when these network parameters are configured the two-way UDP
port, but two devices are connected through a network port, the configuration
method is similar. First, the user needs to connect two devices and computers to
the same LAN. ZLVircom runs on this computer and is only connected to the
computer for configuration purposes, after which the computer does not need to
be connected.
Click ZLVircom's device management to find the two devices, as shown in figure
31. Then click "Device Edit" to configure the device. Device pair-connection can
be divided into TCP pair and UDP pair. In the case of TCP pairing, the parameters
of the two devices are shown in figure 30. The parameters shown by the arrows
connection, you can view the connection status by going back to the device
management dialog box, as shown in figure 29. If both devices are "connected",
41
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
figure 32, and the parameters corresponding to the arrows must be one-to-one. As
long as the parameters of UDP pair are configured correctly and the connection
status is not checked, the data sent will be automatically sent to the specified
device.
42
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Finally, we need to remind that if the device is connected to each other, in addition
to the above settings of the Ethernet port parameters, the serial port parameters
must also be correctly set. Mainly is the serial port server baud rate and so on
needs to be consistent with user's equipment baud rate and so on. With this setup,
the user device can send data to each other through the serial ports of the two
serial servers.
8. Device Debugging
8.1 Network Physical Connection
Confirm the wifi connection is normal through wifi_work and wifi_link indicator
lights.
When the device is in dynamic accessing IP mode, cannot directly connect to the
(general DHCP server is the router in LAN). So please specify IP when connecting
43
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
When configured with static IP, both the device and the computer need to be on
that can be searched but cannot be communicated is usually not well configured.
In this case, ZLVircom can be used to configure devices in the same network
segment.
After the configuration, the Link light turns blue when the TCP connection is
established by using the steps of “6.4 TCP Communication Test” or “6.5 Virtual
Serial Port Test”. The Link light blue can also be seen through ZLVircom, as in the
device management list, if the TCP connection is listed as "established" then the
Link light is blue, as shown in figure 34, which facilitates remote diagnosis.
When the Link light turns blue, data can be sent and received between the
software and the serial port server. If the software sends a message, the Active
44
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
light turns green for at least a second. The data is also output from the serial port
server, but whether the output data is correct depends on whether the correct
serial port parameters (baud rate, data bit, stop bit, check bit) are configured.
The serial device will reply to the right instruction. If there is a reply (the serial port
sends data to the network port), “Active” will turn blue. Otherwise, please check
the serial port parameters or the connection of the serial port line.
data sent and received, as shown in figure 34, where TXD is the amount of data
sent by the serial port server. When refreshing the list of devices, a change in this
value indicates that data has been sent, and the Active light is also green. If you
see a change in the RXD value it indicates that the serial device has returned data.
Active is blue.
In the case of virtual serial port, ZLVircom supports real-time capture of data sent
and received from the virtual serial port. It is convenient for users to debug the
It is assumed that the virtual serial port communication has been established
according to the “6.5 Virtual Serial Port Test” method. Now you need to monitor
the data passing through the virtual serial port. Open the ZLVircom
box.
45
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Select the three options of enable monitoring, hexadecimal monitoring mode, and
display the time of send-receive data, as shown in figure 33. Then click ok.
Assuming that data has been sent and received before, now select a virtual serial
port to be monitored in the main interface, and then select the menu/view/monitor,
From the open dialog box, you can see the instructions issued by the upper
computer and the instructions returned by the device, as shown in figure 37. This
46
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
according to Salve ID, function code, register No. and register number in Modbus TCP
instructions sent to Modbus gateway by user software and output them from the serial
First of all, the serial port server should support Modbus gateway, that is, the
the "port" parameter to 502 (the Modbus server's port). The Modbus gateway is
thus enabled.
If the serial port RTU device is the slave station, then the host computer Modbus
TCP software connects to port 502 of Modbus gateway. At this time, Modbus
gateway needs to work in TCP server mode. If the serial port RTU is the main
station, the Modbus gateway works on the TCP client side, and the destination IP
fills in the IP of the computer on which the Modbus TCP software resides, and the
ZLAN5142 (the end of which is 2 or 0 is non-storage), 7146 can save the read
contents of the registers in the gateway. In this way, the speed of Modbus TCP
query can be greatly improved, and the performance is superior when supporting
multi-host access.
47
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
As shown in figure 38: ordinary Modbus TCP data flow direction (1)(2)
corresponding Modbus RTU instruction, and then the device responds Modbus
RTU instruction to Modbus gateway, which is then converted into Modbus TCP
speed, which can be answered within 3ms, while Modbus RTU is RS485 with a
speed of only 9600bps. Generally, it takes at least 30ms to send and return an
48
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
query response time. In addition, if there are many upper computers to query data
at the same time, the serial port will be congested. If the network is compared to
the highway, the serial port is compared to the single-log bridge, then the original
way is to pass the traffic flow of the highway on the single-log bridge.
Register save Modbus Gateway (7146) solves the above problem. It can
temporarily save the register data obtained from the query in the Modbus gateway,
so that when Modbus TCP query comes, Modbus gateway can immediately return
the instruction, and truly give play to the rapid characteristics of Modbus TCP. On
the other hand, 7146 can actively send instructions from the serial port to
automatically update the data content of the currently saved register and save a
Users do not need to configure required register addresses, function codes and
slave station addresses. The 7146 will automatically recognize and dynamically
add these registers according to Modbus TCP instructions sent from the network
port.
When monitored by multiple computers, 7146 can show a good response speed.
Regardless of the baud rate of the serial port, it can generally give the upper
response data within 3ms. And it shows a good real-time update speed of serial
data.
Modbus gateway with register storage is a real Modbus TCP to Modbus RTU,
which gives full play to advantages of fast speed and multi-host simultaneous
Note that when the serial server is a TCP client, it does not have a storage
1) The first Modbus TCP query instruction is non-stored. Because you have to
49
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
wait for the RTU device to slowly return data before returning the register
3) Currently, it can store 10K Modbus cache. For ordinary single-register query,
4) When there are multiple instructions at the same time were queried, send in
accordance with the order, send first instruction first instruction reply
wait for 485 anti-collision time (refer to many host part) the next instruction
to send... . Return to the first instruction after the last instruction has been
answered.
Although the stored Modbus has a fast response speed, some users do not want
the RTU device to receive a large number of query instructions, which will affect
the internal processing speed of the instrument. You can turn off the storage
To disable storage, click the “more advanced options” button in the “Parameters
Setting” dialog box and remove one of the support and one of the enable options
shown in figure 39 by clicking ok. Then go back to device Settings and click modify
Settings.
Note that when configuring the transfer protocol in a Web method, the default is a
50
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
As shown in figure 39, "RS458 multi-host support" and "RS485 bus collision
detection function" are ZLAN's multi-host functions. They are generally both
enabled and disabled at the same time. After enabling, the device that converts
the protocol into Modbus TCP has the function of storage Modbus gateway;
generally, the user-defined RS485 protocol can also have the function of serial
devices accessed by multiple hosts at the same time, which cannot be achieved in
the pure RS485 network, because the sending of multiple master stations at the
same time will cause conflicts on the RS485 bus. The multi-host of ZLAN serial
port server can "coordinate" the RS485 bus so as to achieve the purpose of
multi-host access.
51
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
As shown in figure 40, in normal mode, when two hosts, host A and host B, are
connected to the serial port server at the same time, host A sends (1) instruction,
RS485 device receives (2) instruction, and RS485 device returns (3) instruction,
but the serial port server sends (4) to host A and (5) to host B at the same time.
Since host B did not send a query, but it also received a reply instruction (5), host
instructions (4) will be given and no instructions (5) will be given, because the
serial port server will automatically remember the host that needs to be returned
and only return the instructions to the nearest communication host. The query of
host A will only reply to A, and the query of host B will reply to host B.
Another effect is that in normal mode, when host A and host B send data at the
same time, the instruction combination will be generated on the RS485 bus, so
that it cannot be recognized normally. In the multi-host mode, the serial port server
can schedule the priority of A and B on the use bus, so as to solve the conflict
If the conversion protocol is "none", the default is not to enable multi-host function.
If you need to enable multi-host, please click "more advanced options" in the
device configuration dialog box, and then check "RS485 multi-host support".
The meanings of "RS458 multi-host support" and "RS485 bus collision detection
52
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
RS485 instruction reply timeout is: the maximum time interval between the start of
sending this instruction and the receipt of the reply by the serial port server. The
filling time should be greater than the actual maximum time interval. If the timeout
RS485 bus collision time: indicates how many milliseconds the serial server waits
to send the second instruction after receiving the reply of the first instruction. This
When the user use ZLVircom to select "Modbus TCP to RTU" as the transfer
protocol, ZLVricom will automatically select the above two enabled boxes (unless
the user manually enters the advanced option to remove), and the above two
1) Figure 42 shows the "RS485 bus anti-collision time", which can be set as
twice of the "packet interval" in the lower right corner of the parameter
configuration interface, but the minimum value should not be less than 20.
instruction is N bytes and the reply is M bytes, the recommended value is:
53
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
In some places, non-stored Modbus must be used. This is because when an event
occurs, PLC will read the data in the register, but the data read is the data before
the storage collection, which is logically incorrect. Therefore, 7146 must also
necessary to support multiple hosts at the same time. In order to cooperate with
this approach, the maximum waiting time of RS485 bus can be changed to "2" on
the basis of stored Modbus gateway (using 1.565 and above version of firmware).
The 2 here is a special value that lets the module know that it needs to disable the
stored function.
Note that each time Modbus TCP mode is set, the value must be set to 2 again,
In this way, the functions of Modbus in model 3 will be similar to that of ZLAN5142,
As shown in figure 40, if the serial port device (RTU device) is the master station
54
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
and the Modbus TCP device (Modbus TCP device) is the slave station, and
multiple network port slave station devices exist simultaneously. In this case, the
serial port server can be used as the client to connect to multiple network port
devices at the same time according to the method introduced in “7.2.2 Client
At this point the need to achieve the function is: when instructions sent from the
serial RTU can be sent to more than one network device, the network device
identify whether to send their own through the Slave ID field, only the network
devices corresponding to Slave ID make a response. After the network port reply
is sent to the serial port server, it is converted into RTU instruction and output from
At this point, it is important to note that the two checkmarks shown in figure 42 as
"RS485 bus anti-collision time" and figure 41 as "RS485 instruction reply timeout
realized.
Another application method is that although the serial port server connects
multiple network port devices as a Client, the RTU device is not the main station,
but the network port device sends first and the RTU device answers (as the slave
station). At this time, "RS485 bus conflict prevention time" and "RS485 instruction
response timeout time" need to be checked, so that multiple hosts can access a
Sometimes 7146 is used as a client to connect to a cloud server. But 7146 as the
slave station, that is, the cloud is the active query, 7146 response mode.
55
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Special Settings are required to keep the serial Numbers of the send and reply
consistent.
Set the total idle time to 4, which is a special value to let 7146 know to switch to
56
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
The registry is defined as a string of code that is sent to the software when a TCP
connection is established between the computer software and the serial server
module (hereinafter referred to as the module) so that the software knows which
The registration package is very suitable for the monitoring of the Internet of things,
because the cloud software generally runs on the public network server of the
Internet, while the modules are scattered in various collection and monitoring
points. How to make the cloud software identification module is very important and
Connect to send MAC addresses: this is not only for model 4 (like 5143),
but also for regular models. It does this by sending its MAC address to the
cloud when the module is connected to the cloud. Since the MAC address
and effective without having to write a registry for each device. To use it,
click "more advanced options" in the device Settings dialog box, find "send
MAC address when TCP is established" in the middle and upper part,
check the box in the front, then go back to the Settings interface and click
"modify Settings".
57
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
packages that users can use to implement registry and heartbeat package
dialog box.
2) When the device sends data to the network, it will automatically add
keep-alive time.
58
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
format. The method is: in the device setting interface, the configuration is
as follows:
The difference with the REAL_COM protocol is that the registry is enabled
hexadecimal, which means that the actual data sent is the string 1234. If
registration method is more flexible, can let the device to adapt to the
REALCOM are the same for each device configuration, but they are
59
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
will conflict with the custom registry heartbeat packet. At this time, it is
ZLAN 5143 series supports the "transcoding" function, which can write a
user's fully customized registration package, and can use MAC address
wildcard, can solve the trouble of writing a custom registration package for
each device, and there is no limit on the length of the registration package.
packet data to the server software every once in a while, which will be discarded
by the server after receiving and will not be regarded as valid data for
communication.
Heartbeat packet has two main functions: first, it can let the upper computer
software know that the device is in the active state; Secondly, if the device fails to
send a heartbeat, the device on the TCP client will automatically re-establish a
60
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
As shown in figure 49, the sending time of the heartbeat packet is set by the "Keep
alive time".
Even if no heartbeat packets are set, the ZLAN device enables the implied
function means that the device has sent data, but the server cannot
receive the heartbeat data. Therefore, it cannot play the first function of
heartbeat packet, that is, the server can detect whether the device is
active or not. However, since the device actually sends data, it can play
the second function of heartbeat packet, that is, the function of the device
61
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
follows: click the "more advanced options" button in the device Settings,
Note that the total number of registered and heartbeat packets is less than
program based on the web architecture, which can simplify the software development
When the collection terminal of the Internet of things interacts with the web server
(HTTPD program), if the data can be submitted to the web server in the standard
format of HTTP GET and POST instructions, the web server can use the existing PHP
/asp language to process and store the data. This saves the user the effort of
To support this feature, download a configuration file of httpd.txt from the ZLAN serial
port server. Download can be done using the firmware upgrade feature of zlvircom.
1) Device send: support to directly convert serial data into HTTP format by
62
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
2) Web server issue: the Web server can also send the required data to the serial
port server through the GET/POST instruction, where the valid data content can
be output from the serial port of the serial port server. When the serial server
receives the data, it can also send a specific reply to the Web server indicating
3) Support arbitrary conversion of input and output data between hexadecimal and
string, convenient for the Web server to send data in character mode, and the
For more information, please refer to the "ZLAN HTTPD Client Communication Mode"
document.
As shown in table 5, when the network port receives 01 02 03 04 the serial port will
output instructions of a1 a2 a3 a4. Similarly, when the serial port receives b1 b2 b3 b4,
the network port actually sends 11 12 13 14. This enables the conversion of different
protocols. This is just a simple example of a "transcode" function that can actually be
The configuration files converted by the command are written to the httpd.txt file
and then downloaded to the ZLAN serial port server. To do this, create a new
63
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
httpd.txt document in the web page directory. If the user does not have a web
directory, make a new webs directory and then make a separate httpd.txt file.
Now click the "upgrade firmware" button in "device configuration", and the web
As shown above, select the web directory to download, then select the web
directory you just created, and then click the "download" button to download
httpd.txt into the device. Above IP, model, space size, port will be automatically
filled in without configuration. Note: any time httpd.txt is updated, the device needs
to be repowered.
64
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Because transcoding function is more complex, the length is longer. Without going
into detail here, it is also possible to write the configuration file httpd.txt by using
ZLAN engineer if necessary. ZLAN can also provide the configuration file httpd.txt
for the existing case. At present, there are several typical cases as follows:
the network port send data to the serial port will increase 4 byte prefix of IP+
port. When a serial port is connected to a network port, the IP address + port
4) Add the MAC address before sending TCP or UDP to identify the device.
5) IP filtering: the device only receives data from the network port with the
specified IP address.
6) IO pin control: control the level of some output pins by any specified
command.
assemble the returned instruction and send it to the cloud software in a fixed
format.
length.
9) Multiple serial instructions are combined and sent to the cloud after the
combination.
10) The super-long serial instruction is split into several smaller instructions to be
65
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
12.3 Notice
1) When “httpd.txt” is not stored, the device will be used as a normal serial port
2) To delete “httpd.txt” you can simply change “httpd.txt” to “1.txt” and then
download it again. Re-downloading the firmware of the device will also delete
the “httpd.txt” file, and downloading the firmware progress bar will delete the
“httpd.txt” file if it only moves 1 frame. Refer to the following sections for
4) When an “http.txt” editing error causes syntax parsing to fail, which can cause
a device startup exception, set the “def” switch (reset switch) of the device to
“On” and re-power it. This will start without “httpd.txt”. Please download the
new “httpd.txt” or delete “httpd.txt” and then set “def” back to the “Off”
position.
device parameters like zlvircom software, that is, to manage the device and
modify parameters through the network interface of the serial port server. Suitable
for users who integrate search and configuration functions into the user's
software.
66
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
1092 in the network. When the device receives the data packet, it will return
the device.
the 1092 port of the device to achieve the purpose of modifying the device
parameter.
The described "UDP management port protocol" is integrated into the device
development library of DLL, can be called by VC, VB, Delphi and other
development tools.
Provide detailed API interface introduction documents and VC call Demo case.
Can realize the device search, parameter modification, P2P function call and so
on.
Can be gained from ZLAN website development libraries: search for "equipment
details.
67
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
serial port server. Suitable for users choose chip or module level products to
control and configure through the serial port. Parameters that can be set include:
IP address, baud rate, device name, working mode, etc. After setting the new
parameters, you can restart the serial port server through the serial port
instruction.
1) The serial instruction uses 10 bytes of data leading code, so there is no need
to distinguish the communication data or command through the pull down and
convenient to use.
the serial port server, such as changing the working mode of the serial port
server when switching from TCP Server to TCP Client mode, can actively
connect to the server; You can disconnect from the TCP server when
Please refer to “Serial port modification parameters and hardware TCPIP protocol
68
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
device, modifying parameters and upgrading firmware. This feature is suitable for
For ZLVircom software, the device can be managed remotely as long as it can be
found in the device list. Remote management of equipment can be divided into the
following situations:
1) Automatic search: under the same switch of the device and computer,
whether in the same network segment or not, the method of ZLVircom on the
devices will reply their parameters to the ZLVircom tool after receiving the
a) Large routers split the network: in some large networks, the broadcast
packets are split by the router so that the broadcast packets cannot
reach the device, but pinging device IP is enabled. At this point, you
add the first and last IP to query the devices one by one.
b) Public network server query internal network equipment: the serial server
in the internal network and as a TCP Server mode, zlvircom in the public
made on the router of the network where the device is located, which is
mapped to the IP of the device. Then, zlvircom will manually add the
69
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
3) TCP Client: when the device is a TCP Client, it initiates a TCP connection to
established, each hold time automatically sends its own parameter system to
the UDP port (not TCP) on the destination port (4196 in this case,), enabling
port is not 4196, the default parameter receiving port of zlvircom needs to be
listening port, and then starting zlvircom will ignore the execution if TCP port
Figure 55 client
4) Timing sending parameters: even if the serial server is in the mode of TCP
server, you can check the "timing sending parameters" function and send
70
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
updates can be applied to devices found in the device list, whether through
2) In the ZLVircom tool, first search for the device that needs to be upgraded,
and then go to the device parameter edit dialog box. First click "restart
device" once.
After the device is restarted, use the same method to search the device again
and enter the dialog again. Click the "upgrade firmware" button in the lower
71
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
3) As shown, select the “program file download” radio option. In the program file,
select the firmware file. The IP address part of the serial port server has been
filled in automatically, no need to write again, and the module type/model has
4) The download bar starts to move, and the download takes about 30 seconds.
The ACT lights on the device will flash during the download, and the LINK
lights will flash a few times at the end of the download. Then the program
pops up the prompt box of "do not power off the LINK light blinking device
will take about 3 seconds to write the flash process. At this time, the LINK
automatically restart, generally without power. See the running indicator light
flashing. If there is no automatic restart, please power on again after the LINK
72
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
configured through the Web again, but it does not affect the communication.
download the Web, change the "program file" download mode to "Web
directory download" as shown in the figure. And select the root directory
where the local web page is located as the directory where the web files need
and download all the files in the local web page directory to the internal file
7) Note:
b) If the prompt fails, the device will not be damaged. Please restart the
off when the LINK light flashes, otherwise the device will be damaged.
c) Check out the firmware version number of ZLVircom to find out whether
multiple WIFI parameters, such as 3, which can be applied in: STA mode recovery
73
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
to AP mode, so that the laptop can connect to the wifi module again and
reconfigure.
By default, if the module is used as STA mode, and if the configured SSID
and password are wrong, the router will not be connected. At this time, you
must use reset switch to reset to AP mode or search through the Ethernet
port of the module, and then reconfigure WIFI parameters with the
switch of the module and connect to the Ethernet port, so the WIFI
parameters are in AP mode, the user can connect to the module and
reconfigure. The WIFI parameter switch will stop when any WIFI
switching.
success, switch to STA2 mode and connect to the second router. This
allows for multiple router backups, and if one of the routers fails to
This method allows two routers to be placed on site. When the first router
74
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
DEFAULT_WIFI_TIME=10
WIFI_CONFIG_COUNT=2
WIFI_MODE1=STA
WIFI_SSID1=TP-LINK_2312
WIFI_CRYPT1=AUTO
WIFI_KEY1=12345678
WIFI_BRIDGE1=0
WIFI_DHCP1=0
WIFI_TIME1=10
WIFI_MODE2=AP
WIFI_SSID2=TEMP_AP
WIFI_CRYPT2=NONE
WIFI_IP2=192.168.1.200
WIFI_TIME2=10
AP.
75
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
will be NONE. Otherwise, just write AUTO. Other optional WEP64, WEP128, AES,
WIFI_BRIDGE1=0 indicates whether the network port and wifi are interconnected,
while 0 indicates not. You can ignore this line if you don't care, and the default is
not interconnected.
indicates not. When this line is not written by default, the DHCP server is turned
The line WIFI_TIME1=10 cannot be omitted, indicating how long it will be stay if
STA mode, the IP may not be acquired in the AP mode when the router is not
document in the web page directory. If the user does not have a web directory,
make a new webs directory and then make a separate wifi.txt file.
76
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
Now click the "upgrade firmware" button in "device configuration", and the web
As shown above, select the web directory to download, then select the web
directory you just created, and then click the "download" button to download
wifi.txt into the device. Above IP, model, space size, port will be automatically filled
in without configuration. Note: any time wifi.txt is updated, the device needs to be
repowered.
DEFAULT_WIFI_TIME=120
WIFI_CONFIG_COUNT=1
WIFI_MODE1=AP
WIFI_SSID1=TEMP_AP
WIFI_IP1=192.168.1.200
WIFI_TIME1=300
77
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
connection fails for 2 minutes, it will switch to AP mode. The hotspot name
DEFAULT_WIFI_TIME=60
WIFI_CONFIG_COUNT=1
WIFI_MODE1=STA
WIFI_SSID1=TP-LINK_2312
WIFI_CRYPT1=AUTO
WIFI_KEY1=12345678
WIFI_TIME1=60
18.5 Notice
which is the same as the usage of non wifi.txt. The content of wifi.txt is empty,
2) When the reset switch DEF is on, wifi.txt will not be loaded. If the module is
abnormal due to an abnormal wifi.txt format during debugging, you can set
78
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
4) Note that after downloading wifi.txt, you need to restart the module before it
5) After upgrading the firmware, wifi.txt will be lost and need to be downloaded
again.
a) When there is wifi.txt, there will be wifi switch. At this time, if the firmware
otherwise the module will be reset constantly, thus the firmware cannot
be upgraded.
device may switch between the IP set in the main interface of the device
device search interface and search the device again to obtain the current
the IP cannot be obtained without wifi connection, but the IP will be tried for
zlvircom). If you need to modify wifi parameters through the web, you need to
modify all wifi parameters, including STA/AP, SSID, password and encryption
79
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com
mode.
ZLAN7146 2.4G
ZLAN7146-5 2.4G/5G
20. After-Service
Shanghai ZLAN Information Technology Co., Ltd.
Address: 12 floor, D building, No. 80 CaoBao road, Xuhui District, Shanghai, China
Phone: 021-64325189
Fax: 021-64325200
Web: http://www.zlmcu.com
Email: [email protected]
80