关注官方微信

中文.

Products

Products

Ethernet Transparent Transmission Protocol in Serial Device Server

Published Time:2010-12-18 Author:shanghai ZLAN Views:2528

This paper introduces the content of Ethernet transparent transmission protocol, to make users understand how to realize the serial port data content converting to Ethernet data content on serial port to Ethernet protocol.

1. The concept of transparent transmission of Ethernet

Communication protocol is a layered structure, which is divided into physical layer, data link layer, network layer, transport layer, conversation layer, presentation layer and application layer according to the ISO 7 layer model communication protocol. If the user wants to achieve the forwarding of serial port data and Ethernet data through the Ethernet transparent transport protocol of the ZLSN module, the application model is shown in the figure.

The so-called Ethernet network transparent transport protocol (referred to as "Ethernet pass-through") refers to the application layer data of network protocol completely consistent with user data of the serial port, there is no format conversion, vividly compared to "transparent transmission". For example, the application layer data content of network data should be the character "a", so the user layer data of the serial protocol is also "a", and the data received by the user's circuit board is also the character "a".

2. How to use transparent transport protocol?

So how does the user data pass from the computer to user serial port board? This first needs to understand the difference between network protocol and serial protocol.
1) Network (TCP/IP) protocol is divided into Ethernet layer, IP layer, TCP or UDP layer and user data layer. Ethernet layer represents network communication medium, such as fiber, wireless, cable Ethernet cable. The key point in the IP layer is to include the IP address, which is the address of each network device. The key point of the TCP or UDP layer is the port, which is used to distinguish multiple applications under an IP address. The user data layer carries the data that the user needs to transmit.
2) The serial protocol has no IP layer and TCP layer.

Here are two questions:
1) How to make up for the missing IP layer and TCP layer of network protocol? In fact, in the ZLSN module, the key points of IP layer and TCP layer have been saved -- IP address and port. Each ZLSN module has a IP address which can set, at the same time also has a TCP or UDP port, so that the computer can send network data to ZLSN module through the "IP + port". Also ZLSN module holds the IP and port of the destination computer, which can also send data to the computer. The network module with IP and port saved internal solved the problem of no IP and port in the serial protocol.
2) How to use transparent transmission protocol?

a) For a computer programmer, calling send() and recv() of Socket API function can be used to send network layer data, such as carrying out send("a") can send the character "a" to the user's serial circuit board. The user calls recv(buf) to receive the data sent by the serial circuit board to the buffer buf.

b) In other users can also use the ZLAN network debugging tool, SocketDlgTest. Through this tool users can send and accept application layer data similar with the serial debugging tools.

c) The more simple way is that users can use virtual serial port technology (ZLVircom program) to simulate the network end as a serial port, and the computer still uses serial port to send and receive.

3. Other conversion agreements

Except "Ethernet transparent transmission protocol", ZLSN module also supports more complex protocols, such as "Modbus TCP to Modbus RTU agreement", "Realcom agreement" and so on. Different transformation agreement in specific applications have their own purposes, but "Ethernet transparent transmissiont protocol" is the most simple and easy to use.