关注官方微信

中文.

Products

Products

The Parameter Configuration Method of Serial Device Server

Date:2011-09-01 Author:Shanghai ZLAN Views:4520

This document introduces the parameter configuration method of serial device server module in use.

1. Introduction of serial device server module

The serial device server module is the core hardware component inside the serial device server. The software functions of serial device server are all integrated inside the core module of serial device server, so its parameter configuration method is the parameter configuration method of serial device server. In some cases, the user needs to integrate the function of the serial device server into its own circuit board instead of the external one, at this time the serial device server embedded module needs to be used.

Serial device server embedded modules include RS232, RS485, TTL level module. Here, the TTL level module-ZLSN2000 is an example. ZLSN2000 is the structure of a double-row needle, with 4 pins connected to the Ethernet port; The two pins provide TTL level serial port, which can be converted into RS232 level serial port or RS485 level serial port according to different needs, and can also directly connect the TTL level serial port of user MCU.

2. Parameters of Serial Device Server Module

The parameters of serial device server module include local IP address, working mode, serial port baud rate, etc., which can refer to《Introduction of Serial Device Server Configuration Parameters》

3. Parameter Configuration Method of Serial Device Server Module

There are 3 ways to configure parameters for ZLAN serial device server embedded module. It is the webpage method, the Windows tool method, the serial port like-AT command method. This refers to that users use the existing tools to configure parameters. See the next chapter on developing your own tools of module search and parameter configuration.

3.1 web method

A small Web server running inside the core module of the serial server can be used for parameter configuration, and users who have used router configuration must be familiar with this method. First, enter the current IP address of the serial device server module in the browser's address bar, and the default factory IP is 192.168.1.200. The open page is the Login page on the serial device server module. Enter the Login password (default is 123456) and click Login to enter the parameter configuration page. As shown. After modifying the parameters, click the "Submit" button to submit the parameters.

The advantage of the web method configuration parameter is that it is easy to use without installing any configuration tools and using a browser to configure it. The disadvantage is that the IP address of the serial device server module must be in the same network segment as the local computer, otherwise the page cannot be accessed. Other advanced parameters need to be configured through the Windows tool method.

3.2 Windows Tool Method

The Windows tool method is the recommended parameter configuration method. That is, the ZLVircom software or ZLDevManager will be run on the user's Windows computer, and all serial device server modules in the LAN can be searched by clicking on the search. The ZLDevManager is a simple tool that does not need to be installed directly. After select the module on the searching list, click on the "Edit Device" button or double-click the row on the list, can pop up parameters configuration dialog, modify the corresponding parameters and then click the button of "Modify Setting”. As shown.

The advantages of the Windows tool configuration parameter are: 1. The serial device server module and the computer are not required to be in the same network segment. 2. Search multiple modules at a time and manage by name without memorizing IP address. 3. Advanced parameters can be configured.

The Windows tool configuration parameter is actually doing the search and parameter configuration of the device through the “ZLAN management port protocol”. There are two ways to integrate the device search and parameter modification functions directly into the user software: ZLAN device management library DLL, and ZLAN management port protocol. The former is a DLL library that can be invoked by the user, the latter is telling the user the details of the management port protocol and implemented by the user himself. This item belongs to value-added service.

3.3 Serial like-AT command

Both of these methods are configured via the Ethernet port of the serial device server module. In some cases, users not only need to configure through Ethernet port but also want local configuration, as no need another computer to configure, but directly to configure your own parameters by the device itself. For example, the IP address that needs to be configured on site and the IP address of the site configuration. The serial port like-AT command method of ZLAN satisfies the requirement very well. When the user MCU and the serial device server module are connected via the TTL (UART) serial port, the user MCU can send the serial port command at any time to configure the parameters. This command is similar to the AT instruction, and the specific instruction format should refer to the ZLAN related documents.

The functions of the ZLAN serial AT-like command can be realized, including but not limited to:
1). Read the current TCP connection status of ZLSN2002/ZLSN2000, so as to know whether the module has established a TCP connection with the remote computer.
2). Arbitrarily control the ZLSN2002 module to initiate TCP connection to any destination IP, randomly switch between multiple targets, and switch randomly in a variety of working modes.
3). Read the local IP of the serial device server module. IP can also be read by DHCP.
4). Restart the serial device server module.

Use ZLAN serial port like-AT command can fully control the TCP running state of the serial device server module, which can realize the incoking of connet, listen, send, recv and so on function of socket through AT command. Can take ZLSN2002 as "hardware TCP/IP protocol stack" because ZLSN2002 internal fully integrated the function of all socket function, and can be invoked by methods of a serial port AT-like commands, relative to the socket interface software, the “hardware TCP/IP protocol stack" does not require user MCU operation protocol stack, also can guarantee the stability of the protocol stack. ZLAN provides the source code for connecting, listening, sending and receiving of ZLSN serial device server module through serial port AT command, which can be easily referenced by users.

4. Second Development of Parameter Configuration Method

If the user needs to integrate the parameter configuration and device search into the user's own software, he can use the device management function library and the management port protocol method provided by ZLAN. In some cases, users may need to integrate IP configuration and baud configuration into the user's management software, rather than ZLVircom, which increases the unity of the software. This method is described below.

4.1 Device management function

ZLAN can provide a dynamic link library (DLL) for user secondary development, the dynamic link library provides a simple similar SearchDev (), GetDevParam (), SetDevParam () function to implement such as search, capture, parameters setting of device. It is very convenient to use and provides a C code example program that calls this DLL. This function library is now available for download, referring to《 The Usage of for Secondary Developable Library》。

4.2 Manage port protocol

Sometimes, users may not want the own program with a DLL library, the more flexible control method is to get "management port protocol" from ZLAN, the protocol is for ZLAN user searching module, getting module parameters, setting module parameters. The user can implement the protocol by himself after understanding the protocol.

The device management function library, ZLDevManage, and the device management functions of ZLVircom are also based on this protocol. Users can integrate ZLDevManage and the device management functions of ZLVircom into their own software on the basis of understanding this protocol. The "Management Port Protocol" can be configured through the Ethernet port, at least to achieve:
1). Device search: search all of the ZLAN serial device server modules in the LAN and external network.
2). Read device parameters: read the parameters, device ID, device operation status, etc. of different equipment.
3). Restart the specified serial device server module.
4). Modify any parameters of the specified serial device server module.