CN113365240A - On-site serial port or Ethernet equipment debugging method based on 4G communication - Google Patents

On-site serial port or Ethernet equipment debugging method based on 4G communication Download PDF

Info

Publication number
CN113365240A
CN113365240A CN202110446274.3A CN202110446274A CN113365240A CN 113365240 A CN113365240 A CN 113365240A CN 202110446274 A CN202110446274 A CN 202110446274A CN 113365240 A CN113365240 A CN 113365240A
Authority
CN
China
Prior art keywords
gateway
data packet
data
remote
local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110446274.3A
Other languages
Chinese (zh)
Inventor
刘洋栋
黎冬生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Jiuxin Internet Of Things Science & Technology Co ltd
Original Assignee
Hangzhou Jiuxin Internet Of Things Science & Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Jiuxin Internet Of Things Science & Technology Co ltd filed Critical Hangzhou Jiuxin Internet Of Things Science & Technology Co ltd
Priority to CN202110446274.3A priority Critical patent/CN113365240A/en
Publication of CN113365240A publication Critical patent/CN113365240A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The invention provides a 4G communication-based field serial port or Ethernet device debugging method, which comprises the following steps: s1, confirming whether a gateway needing to establish a virtual cable is online: whether a local gateway and a remote gateway are online or not is sequentially confirmed, and if any gateway is not online, the problem of gateway disconnection is solved; if both are online, go to step S2; s2, selecting a virtual cable mode of the gateway, wherein the virtual cable mode comprises a network cable and a serial port cable; s3, after parameters needing to be adjusted are set through the platform forwarding server, the remote gateway and the local gateway are set to be started to work in a selected virtual cable mode; s4, determining whether the platform forwarding server is started or not, and if the platform forwarding server prompts success, then the gateway works in a virtual cable mode; otherwise, the reason of the non-starting is checked. According to the invention, through data forwarding of the two gateways and the 4G public network, an engineer can directly debug the field RS485 or Ethernet bus equipment in an office environment through the virtual cable.

Description

On-site serial port or Ethernet equipment debugging method based on 4G communication
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of data acquisition of the Internet of things, in particular to a field serial port or Ethernet equipment debugging method based on 4G communication.
[ background of the invention ]
The industrial field uses a large number of devices based on RS485 bus or ethernet. However, if there is a problem in field use or the parameter modification configuration needs to be adjusted, the user must go deep into the field. Using a PC, USB to 485 cable or network cable, with a physical wire link to the fieldbus, then set the RS485 bus or ethernet device to the desired operating state. The deep on-site entity wiring is a time-consuming and labor-consuming debugging scheme with low efficiency, and has the following problems: field personnel coordination, field bus wiring, field environment badness, etc. The Ethernet equipment is limited to island equipment which cannot access the public network.
[ summary of the invention ]
The invention aims to solve the problems in the prior art and provides a field serial port or Ethernet equipment debugging method based on 4G communication, which can remotely debug field RS485 or Ethernet bus equipment through a virtual cable.
In order to achieve the purpose, the invention provides a field serial port or Ethernet equipment debugging method based on 4G communication, which comprises the following steps:
s1, confirming whether a gateway needing to establish a virtual cable is online: whether a local gateway and a remote gateway are online or not is sequentially confirmed, and if any gateway is not online, the problem of gateway disconnection is solved; if both are online, go to step S2;
s2, selecting a virtual cable mode of the gateway, wherein the virtual cable mode comprises a network cable and a serial port cable;
s3, after parameters needing to be adjusted are set through the platform forwarding server, the remote gateway and the local gateway are set to be started to work in a selected virtual cable mode;
s4, determining whether the platform forwarding server is started or not, and if the platform forwarding server prompts success, then the gateway works in a virtual cable mode; otherwise, the reason of the non-starting is checked.
Preferably, the remote gateway is connected to a field bus, the local gateway is connected with the PC through an RS485 serial port line or a network cable, and remote debugging is realized through data forwarding of the remote gateway, the local gateway and the 4G public network.
Preferably, when the virtual cable mode adopts a network cable, the method for implementing data forwarding includes the following steps:
a. when the local area network has a data packet which accords with the gateway IP group address:
a1. sending the data to a platform forwarding server through 4G;
a2. the platform forwarding server sends the message to an opposite-end gateway, and a virtual routing program of the opposite-end gateway replaces a source MAC of the data packet with an MAC address of the virtual routing program, so that the target device can return the data packet correctly after receiving the data packet;
a3. when the data packet is correctly returned, the data packet enters a gateway port of an opposite terminal to input data, and a forwarding IP group which is in accordance with the virtual routing record of the gateway is forwarded to a local gateway;
a4. the local gateway replaces the source MAC address of the data packet with the MAC address of the local gateway, and sends the data packet to a local area network to complete the forwarding of the data packet;
b. when the remote local area network has a data packet which accords with the IP group address of the gateway:
b1. sending the data to a platform forwarding server through 4G;
b2. the platform forwarding server sends the message to an opposite-end gateway, and a virtual routing program of the opposite-end gateway replaces a source MAC of the data packet with an MAC address of the virtual routing program, so that the target device can return the data packet correctly after receiving the data packet;
b3. when the data packet is correctly returned, the data packet enters a gateway port of an opposite terminal to input data, and a forwarding IP group which is in accordance with the virtual routing record of the gateway is forwarded to a remote gateway;
b4. the remote gateway replaces the source MAC address of the data packet with the MAC address of the remote gateway, and sends the data packet to the remote local area network to complete the data forwarding.
Preferably, the platform forwarding server issues the IP addresses of the remote gateway and the local gateway that need to communicate to the respective gateways, so that the local gateway has the IP group address of the host of the remote lan, and the remote gateway has the IP group address of the local lan.
Preferably, when the RS485 serial port line is used as the virtual cable, the method for forwarding data includes the following steps: when the remote gateway or the local gateway receives the data, the data are sent to a platform forwarding server through a 4G network and then forwarded to an opposite-end gateway; and after receiving the data, the opposite-end gateway directly sends the data to a hardware serial port of the opposite-end gateway without processing, and completes the forwarding of the data.
The invention has the beneficial effects that: the invention uses two data acquisition gateways: the remote gateway is connected to the field bus; the local gateway is connected with the PC through an RS485 cable or a network cable in an office environment. Through the data forwarding of the two gateways and the 4G public network, an engineer can directly debug the field RS485 or Ethernet bus equipment through a virtual cable in an office environment.
The features and advantages of the present invention will be described in detail by embodiments in conjunction with the accompanying drawings.
[ description of the drawings ]
FIG. 1 is a general flowchart of a 4G communication-based field serial port or Ethernet device debugging method according to the present invention;
FIG. 2 is a flow chart of the virtual cable implementation of the present invention using a network cable;
fig. 3 is a flowchart of the virtual cable method according to the present invention executed by using a serial port line.
[ detailed description ] embodiments
Referring to fig. 1, the virtual cable scheme of the present invention includes three main contents: the cloud platform forwarding server, the remote gateway and the local gateway.
The method comprises the following steps: firstly, whether a gateway needing to establish a virtual cable is on-line or not is confirmed, and if the gateway is not on-line, the problem of gateway disconnection is checked. The method comprises the steps of selecting a virtual cable mode of a gateway, wherein the current scheme comprises two virtual cable modes of a network cable and a serial port cable. After parameters needed by the server are forwarded through the platform, a correct virtual cable working mode for starting the field gateway and the local gateway is set. If the platform forwarding server prompts successfully, the gateway works in a virtual cable mode immediately.
Referring to fig. 2, the gateway portal virtual cable data forwarding process:
the data sources of IP packets are four: local area network, local gateway IP protocol stack, remote gateway local area network, remote gateway IP protocol stack. Since there are a large number of IP packets, ARP packets, or other network protocol packets in the local area network at each time. Therefore, a virtual routing software is designed to run in the gateway, and when the network port virtual cable is set, the platform forwarding server will issue the remote and local IP addresses to be communicated to the respective gateways. That is, the local gateway has the host IP group address of the remote lan, and the remote gateway has the IP group address of the local lan.
After the whole system is started, when a data packet which accords with the gateway IP group address exists in the local area network, the data packet is sent to the platform forwarding server through the 4G. The platform forwarding server sends the message to the opposite-end gateway, and the virtual routing program of the opposite-end gateway replaces the source MAC of the packet with the MAC address of the virtual routing program, so that the target device can return the data packet correctly after receiving the data packet. When the data packet is returned correctly, the data enters the gateway network port of the opposite terminal to input data, and the forwarding IP group which is in accordance with the virtual route record of the gateway is forwarded to the local gateway. The local gateway replaces the source MAC address of the data packet with the MAC address of the local gateway, and sends the data packet to the local area network to complete the data forwarding process.
When there is an IP group address packet corresponding to the remote gateway record in the remote lan, the processing flow is similar to the above described flow. Specifically, when there is a data packet conforming to the gateway IP group address in the remote lan, the data packet is sent to the platform forwarding server through the 4G. The platform forwarding server sends the message to the opposite-end gateway, and the virtual routing program of the opposite-end gateway replaces the source MAC of the packet with the MAC address of the virtual routing program, so that the target device can return the data packet correctly after receiving the data packet. When the data packet is returned correctly, the data enters the gateway port of the opposite terminal to input data, and the forwarding IP group which is in accordance with the virtual route record of the gateway is forwarded to the remote gateway. The remote gateway replaces the source MAC address of the data packet with the MAC address of the remote gateway, and sends the source MAC address to the remote local area network to complete the data forwarding process.
Referring to fig. 3, the gateway RS485 serial port virtual cable forwards data:
the Hex data comes from only two sources: a serial port network accessed by a local gateway and a serial port network accessed by a remote gateway. Since the gateway itself does not need to process any message, it is only necessary to directly forward the respective received messages. And the software of a virtual route runs in the background, and the Hex data input by the serial port of the gateway is monitored at any time. And if the data is received, the data is sent to the platform forwarding server through the 4G network and then forwarded to the opposite-end gateway. After receiving the data, the gateway directly sends the data to the hardware serial port of the gateway without processing. Therefore, data forwarding of the RS485 based virtual cable is realized.
The above embodiments are illustrative of the present invention, and are not intended to limit the present invention, and any simple modifications of the present invention are within the scope of the present invention.

Claims (5)

1. A4G communication-based field serial port or Ethernet device debugging method is characterized in that: the method comprises the following steps:
s1, confirming whether a gateway needing to establish a virtual cable is online: whether a local gateway and a remote gateway are online or not is sequentially confirmed, and if any gateway is not online, the problem of gateway disconnection is solved; if both are online, go to step S2;
s2, selecting a virtual cable mode of the gateway, wherein the virtual cable mode comprises a network cable and a serial port cable;
s3, after parameters needing to be adjusted are set through the platform forwarding server, the remote gateway and the local gateway are set to be started to work in a selected virtual cable mode;
s4, determining whether the platform forwarding server is started or not, and if the platform forwarding server prompts success, then the gateway works in a virtual cable mode; otherwise, the reason of the non-starting is checked.
2. The field serial port or Ethernet device debugging method based on 4G communication of claim 1, characterized in that: the remote gateway is connected to the field bus, the local gateway is connected with the PC through an RS485 serial port line or a network cable, and remote debugging is realized through data forwarding of the remote gateway, the local gateway and the 4G public network.
3. The field serial port or Ethernet device debugging method based on 4G communication of claim 1, characterized in that: when the virtual cable mode adopts a network cable, the method for realizing data forwarding comprises the following steps:
a. when the local area network has a data packet which accords with the gateway IP group address:
a1. sending the data to a platform forwarding server through 4G;
a2. the platform forwarding server sends the message to an opposite-end gateway, and a virtual routing program of the opposite-end gateway replaces a source MAC of the data packet with an MAC address of the virtual routing program, so that the target device can return the data packet correctly after receiving the data packet;
a3. when the data packet is correctly returned, the data packet enters a gateway port of an opposite terminal to input data, and a forwarding IP group which is in accordance with the virtual routing record of the gateway is forwarded to a local gateway;
a4. the local gateway replaces the source MAC address of the data packet with the MAC address of the local gateway, and sends the data packet to a local area network to complete the forwarding of the data packet;
b. when the remote local area network has a data packet which accords with the IP group address of the gateway:
b1. sending the data to a platform forwarding server through 4G;
b2. the platform forwarding server sends the message to an opposite-end gateway, and a virtual routing program of the opposite-end gateway replaces a source MAC of the data packet with an MAC address of the virtual routing program, so that the target device can return the data packet correctly after receiving the data packet;
b3. when the data packet is correctly returned, the data packet enters a gateway port of an opposite terminal to input data, and a forwarding IP group which is in accordance with the virtual routing record of the gateway is forwarded to a remote gateway;
b4. the remote gateway replaces the source MAC address of the data packet with the MAC address of the remote gateway, and sends the data packet to the remote local area network to complete the data forwarding.
4. The field serial port or Ethernet device debugging method based on 4G communication of claim 3, characterized in that: the platform forwarding server issues the IP addresses of the remote gateway and the local gateway which need to communicate to the respective gateways, so that the local gateway has the host IP group address of the remote local area network, and the remote gateway has the IP group address of the local area network.
5. The field serial port or Ethernet device debugging method based on 4G communication of claim 1, characterized in that: when the virtual cable mode adopts an RS485 serial port line, the method for realizing data forwarding comprises the following steps: when the remote gateway or the local gateway receives the data, the data is sent to the platform forwarding server through the 4G network and then forwarded to the opposite-end gateway, and after the data is received by the opposite-end gateway, the data is directly sent to the hardware serial port of the remote gateway or the local gateway without being processed, so that the data forwarding is completed.
CN202110446274.3A 2021-04-25 2021-04-25 On-site serial port or Ethernet equipment debugging method based on 4G communication Pending CN113365240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110446274.3A CN113365240A (en) 2021-04-25 2021-04-25 On-site serial port or Ethernet equipment debugging method based on 4G communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110446274.3A CN113365240A (en) 2021-04-25 2021-04-25 On-site serial port or Ethernet equipment debugging method based on 4G communication

Publications (1)

Publication Number Publication Date
CN113365240A true CN113365240A (en) 2021-09-07

Family

ID=77525420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110446274.3A Pending CN113365240A (en) 2021-04-25 2021-04-25 On-site serial port or Ethernet equipment debugging method based on 4G communication

Country Status (1)

Country Link
CN (1) CN113365240A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101521631A (en) * 2009-04-14 2009-09-02 华为技术有限公司 Treatment method, equipment and system for VPLS network messages
US20100232441A1 (en) * 2009-03-16 2010-09-16 Samsung Electronics Co., Ltd. Quality of service management for home-to-home connections
CN103179228A (en) * 2013-04-02 2013-06-26 杭州华三通信技术有限公司 Internet protocol address analysis method and edge node
CN103379187A (en) * 2012-04-28 2013-10-30 中兴通讯股份有限公司 Data processing method and gateway network element
CN103731820A (en) * 2014-01-12 2014-04-16 绵阳师范学院 Method for access control based on MAC address conversion in IPv6 wireless router
CN104579783A (en) * 2015-01-14 2015-04-29 北京旋思科技有限公司 Remote equipment management method achieved through multiplexing data link
CN108306975A (en) * 2018-02-11 2018-07-20 杜翔 The transparent transmission channel and method of electricity consumption acquisition system based on 4G and cloud service

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100232441A1 (en) * 2009-03-16 2010-09-16 Samsung Electronics Co., Ltd. Quality of service management for home-to-home connections
CN101521631A (en) * 2009-04-14 2009-09-02 华为技术有限公司 Treatment method, equipment and system for VPLS network messages
CN103379187A (en) * 2012-04-28 2013-10-30 中兴通讯股份有限公司 Data processing method and gateway network element
CN103179228A (en) * 2013-04-02 2013-06-26 杭州华三通信技术有限公司 Internet protocol address analysis method and edge node
CN103731820A (en) * 2014-01-12 2014-04-16 绵阳师范学院 Method for access control based on MAC address conversion in IPv6 wireless router
CN104579783A (en) * 2015-01-14 2015-04-29 北京旋思科技有限公司 Remote equipment management method achieved through multiplexing data link
CN108306975A (en) * 2018-02-11 2018-07-20 杜翔 The transparent transmission channel and method of electricity consumption acquisition system based on 4G and cloud service

Similar Documents

Publication Publication Date Title
CN106375175B (en) Method and system for flashing electronic control unit for automobile diagnosis
Pigan et al. Automating with PROFINET: Industrial communication based on Industrial Ethernet
CN108847979B (en) Self-adaptive configuration system and method based on SCADA
CN111866110B (en) Industrial equipment communication method and 5G gateway
JP6463708B2 (en) How to achieve deep inspection of field-level broadband bus data on the industrial Internet
CN111381553B (en) VPN technology-based equipment and method and system for remotely maintaining PLC
WO2019196455A1 (en) Air-conditioning communication system and method, storage medium and electronic apparatus
CN212163361U (en) Two main station controller communication systems
US20170041269A1 (en) Method For Transmitting Messages In An Energy Automation Network, Energy Automation Component And Substation
CN102438017B (en) Routing function-based conversion apparatus of Modbus protocol and BACnet Ethernet protocol and conversion method thereof
JP2014519107A (en) Industrial controller device capable of low error rate and ultra-high speed serial communication and driving method thereof
CN102821020B (en) Method for transparent transmission of virtual private network (VPN) communication through copy and transfer of internet protocol (IP) packet
JP2004306200A (en) Robot control system
CN106506306B (en) Method and device for transmitting data message
CN113115346A (en) Gateway multi-protocol conversion device based on 5G and method thereof
CN113365240A (en) On-site serial port or Ethernet equipment debugging method based on 4G communication
US10374834B2 (en) Modular industrial automation appliance and method for transmitting messages via a backplane bus system of the modular industrial automation appliance
US20040114591A1 (en) IP Routing Between Modules on a PLC Backplane
Adhane et al. Distributed control system for ship engines using dual fieldbus
CN114285877A (en) Universal industrial equipment communication system and method
Lin et al. Gigabit Modbus user datagram protocol fieldbus network integrated with industrial vision communication
CN102447597A (en) Method and device for realizing IP (Internet Protocol) effectiveness detection
CN102255784A (en) Field bus gateway using virtual serial field bus port and data transfer method thereof
Fang et al. Research and Implementation of Collision Detection Based on Modbus Protocol.
Tahir et al. An evaluation of ethernet based signal exchange among several machines in automation industry

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210907

RJ01 Rejection of invention patent application after publication