Remote wireless communication automatic networking configuration method and system

By adopting automatic networking and parameter issuance mechanisms in long-distance wireless communication, the problems of cumbersome networking and inconvenient communication processing are solved, and efficient network configuration and stability are achieved.

CN119012314APending Publication Date: 2024-11-22BEIJING WANWEIYINGCHUANG TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411258064.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Long-distance wireless communications are complicated in industries such as industrial control and environmental monitoring, and lack of automatic processing mechanisms, resulting in large amounts of manual operations, high probability of errors and inconvenient communication abnormal handling.

Method used

Through automatic alternating channel switching and frame transmission between gateway equipment and terminal equipment, automatic networking, automatic parameter issuance and network parameter adjustment are realized to reduce human operation and communication abnormalities.

Benefits of technology

It reduces the network workload and chance of error, improves network stability and communication quality, and reduces the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119012314A_ABST
    Figure CN119012314A_ABST
Patent Text Reader

Abstract

The invention discloses a remote wireless communication automatic networking configuration method and system. According to the method, firstly, rapid connection and configuration of equipment are realized through automatic networking, and remote parameter issuing and automatic network parameter adjustment are supported; the terminal equipment can respond to different types of frames according to the state, and accuracy and high efficiency of communication are ensured. The method is suitable for complex environments such as industrial sites, automatic networking, automatic parameter issuing and automatic network parameter adjustment of long-distance wireless communication are realized, the stability and flexibility of long-distance wireless communication are improved, manual operation is reduced, the workload and the error probability are reduced, and the probability and influence of communication abnormity are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of long-distance wireless communication, and in particular to a long-distance wireless communication automatic networking configuration method and system. Background Art

[0002] Long-distance wireless communication has important applications in industries such as industrial control and environmental monitoring, but the networking and configuration process is relatively cumbersome and lacks a mechanism for handling communication anomalies.

[0003] The current long-distance wireless communication networking process mostly involves sending instructions, pressing buttons, dialing codes, etc. through hardware interfaces (such as serial ports, network ports, etc.) to set the parameters of the wireless communication terminal equipment to be networked, so as to meet the preparation conditions for networking before starting networking. In addition, wireless communication terminal equipment needs to manually configure the parameters of the hardware interface when connecting to different downstream devices (such as instruments and meters at industrial sites). The networking and configuration process has many steps, takes up a lot of manpower, and has certain technical requirements for operators. Not only that, when wireless communication is abnormal, it is impossible to automatically adjust the network parameters and reconnect, resulting in communication data loss. Summary of the invention

[0004] Based on this, the embodiments of the present application provide a method and system for automatic networking configuration of long-distance wireless communications, which can realize automatic networking of long-distance wireless communications, automatic parameter distribution and automatic adjustment of network parameters, reduce manual operations, reduce workload and error rate, and reduce the probability and impact of communication abnormalities.

[0005] In a first aspect, the present application provides a method for automatic networking configuration of long-distance wireless communication, which is applied to a gateway device, and the method includes:

[0006] The gateway device sets the networking parameters, and after turning on the networking switch, it alternately switches between the initial default channel and the data channel specified by the networking instruction, and sends network access broadcast frames on the initial default channel, and listens to the network access application frames sent by the terminal device on the data channel specified by the networking instruction;

[0007] After the terminal device is started with the initial default parameters, it remains in the waiting state for network access and monitors the network access broadcast frame; when the network access broadcast frame is received on the initial default channel, the network access parameters are modified to enter the network access state, the message is parsed, and the terminal device automatically switches to the data channel specified in the message and sends the network access application frame while monitoring the network access response frame sent by the gateway device; wherein the network access application frame contains its unique device identification code;

[0008] When the gateway device monitors the network access application frame, it parses the message to obtain the unique device identification code of the terminal device, allocates a unique communication address to the terminal device, and sends the unique device identification code and the unique communication address of the terminal device as a network access response frame to the terminal device to complete the automatic networking of the gateway device;

[0009] After the terminal device monitors the network access response frame, it determines whether it is a response sent to this device according to the unique device identification code in the message. If it is a response sent to this device, it parses the unique communication address and records it, switches to the network access state, and automatically completes the networking.

[0010] Optionally, the method further includes: after the automatic networking is completed, the gateway device remotely sends the serial port parameters of the terminal device, specifically:

[0011] The gateway device remotely configures the serial port parameters of the specified terminal device that has been successfully networked, and sends the serial port parameters as data frames to the specified terminal device; wherein the serial port parameters at least include the serial port baud rate and the network port IP.

[0012] The terminal device starts to monitor the data frame. When receiving the data frame with the serial port parameters, it parses the message, automatically modifies its own serial port parameters, and then responds to the data response frame. The terminal device responds that the remote parameters are completed. The data frame includes a data frame with application data and a data frame with serial port parameters.

[0013] The gateway device monitors the data response frame sent by the terminal device, and performs verification after receiving the data response frame. When the verification passes, the gateway device completes the remote parameter sending.

[0014] Optionally, after completing the automatic networking, the gateway device turns off the networking switch, remains in the data channel specified by the networking instruction, and no longer switches to the initial default channel.

[0015] Optionally, the method further comprises:

[0016] When the transmission is idle, the terminal device sends a heartbeat frame to the gateway device at a specified time interval, and waits to receive a heartbeat response frame; the gateway device monitors the heartbeat frame sent by the terminal device in real time, and when a heartbeat frame is received, it sends a heartbeat response frame to the sender of the heartbeat frame.

[0017] Optionally, when the terminal device does not receive a heartbeat response frame within a specified timeout period and number of retries, the wireless communication is abnormal; after the wireless communication is abnormal, the terminal device automatically enters a network access state, adjusts network parameters, and re-executes the automatic networking process.

[0018] Optionally, when the gateway device times out and fails to receive the heartbeat frame sent by the terminal device, it determines that the current terminal device communication is abnormal, automatically deletes the information of the terminal device, adjusts the network parameters, and re-executes the automatic networking process.

[0019] Optionally, when the terminal device is in a state of waiting for network access, it does not respond to frame types other than network access broadcast frames;

[0020] When in the state of accessing the network, it does not respond to frame types other than the network access response frame;

[0021] When in the network access state, it does not respond to frame types other than data frames and heartbeat response frames.

[0022] In a second aspect, the present application provides a long-distance wireless communication automatic networking configuration system, the system comprising a gateway device and multiple terminal devices:

[0023] A gateway device is used to set networking parameters, alternately switch between the initial default channel and the data channel specified by the networking instruction after turning on the networking switch, and send a network access broadcast frame on the initial default channel, and listen to the network access application frame sent by the terminal device in the data channel specified by the networking instruction; when the gateway device listens to the network access application frame, it parses the message to obtain the unique device identification code of the terminal device, and allocates a unique communication address to the terminal device, and at the same time sends the unique device identification code of the terminal device and the unique communication address as a network access response frame to the terminal device, so as to complete the automatic networking of the gateway device;

[0024] A terminal device is used to start up with initial default parameters, remain in a waiting state for network access, and listen to network access broadcast frames; when a network access broadcast frame is received on the initial default channel, modify the network access parameters to enter a network access state, parse the message, automatically switch to the data channel specified in the message, and send a network access application frame while listening to a network access response frame sent by a gateway device; wherein the network access application frame includes its unique device identification code; after the terminal device listens to the network access response frame, it determines whether it is a response sent to the device according to the unique device identification code in the message. If it is a response sent to the device, it parses the unique communication address and records it, switches to the network access state, and automatically completes the networking.

[0025] In a third aspect, a gateway device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the instructions of the gateway device in the long-distance wireless communication automatic networking configuration method as described in any one of the first aspects above are implemented.

[0026] In a fourth aspect, a terminal device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the instructions of the terminal device in the long-distance wireless communication automatic networking configuration method as described in any one of the first aspects above are implemented.

[0027] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0028] (1) Gateway devices and terminal devices complete the networking process by automatically sending and receiving specific broadcast frames and request frames. This automated process reduces the need for manual settings and operations, thereby directly reducing the workload and difficulty of networking.

[0029] (2) Allow the gateway device to remotely send serial port parameters to the terminal device after networking is completed, including baud rate and IP address, etc. This remote configuration method reduces the need for technicians to go to the site for manual configuration, thereby reducing the workload of configuring wireless communication terminal device parameters.

[0030] (3) The terminal device can automatically modify its own parameters after receiving new serial port parameters, and if communication is interrupted during communication, the terminal device can automatically try to reconnect. This automatic adjustment and reconnection capability reduces the need for human intervention and improves network stability and communication quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0032] Figure 1 An application scenario architecture diagram of a method for automatic networking configuration of long-distance wireless communication provided in an embodiment of the present application;

[0033] Figure 2 This is a flowchart of automatic networking in the embodiment of this application;

[0034] Figure 3 This is a flow chart of wireless communication terminal configuration in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of a wireless communication gateway setting networking parameter page in an embodiment of the present application;

[0036] Figure 5 This is a schematic diagram of a remote parameter setting page for a wireless communication gateway in an embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] In the description of the present invention, the terms "comprises", "has" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may also include other steps or units that are not explicitly listed but are inherent to these processes, methods, products or apparatuses, or steps or units added based on further optimization schemes conceived by the present invention.

[0039] The application scenario architecture diagram of this application is as follows Figure 1 As shown. The specific application system includes lower-end equipment (such as instruments and meters at industrial sites), terminal equipment for long-distance wireless communication, gateway equipment for long-distance wireless communication, upper-end equipment or application platform. Among them:

[0040] The lower-end device and the wireless communication terminal device can communicate via wired mode (such as serial port, network port, etc.) or wireless mode (3G, 4G, WIFI, etc.), the wireless communication terminal device and the wireless communication gateway device can communicate via wireless (such as LoRa, etc.) automatic networking mode, and the wireless communication gateway device can communicate with the upper-end device or application platform via wired mode (such as serial port, network port, etc.) or wireless mode (3G, 4G, WIFI, etc.). The lower-end device is used as the actuator for collecting data or controlling actions in this automatic networking system; the wireless communication terminal device provides the lower-end device with the function of accessing the internal network of long-distance wireless communication; the wireless communication gateway device is the organizer and manager of the internal network of long-distance wireless communication, and can also add the functions of collecting data processing and controlling action analysis; the upper-end device or application platform can be a data server or an upper-level control device.

[0041] Specifically, please refer to Figure 2 , which shows the automatic networking flow chart provided by the embodiment of the present application. The method of the present application is mainly applied to two main bodies, a gateway device and a terminal device. Specifically:

[0042] The gateway device sets the networking parameters, and after turning on the networking switch, it alternately switches between the initial default channel and the data channel specified by the networking instruction, and sends network access broadcast frames on the initial default channel, and listens to the network access application frames sent by the terminal device on the data channel specified by the networking instruction;

[0043] After the terminal device is started with the initial default parameters, it remains in the waiting state for network access and monitors the network access broadcast frame; after receiving the network access broadcast frame on the initial default channel, it modifies the network access parameters and enters the network access state, parses the message, automatically switches to the data channel specified in the message, and sends the network access application frame while monitoring the network access response frame sent by the gateway device; wherein, the network access application frame contains its unique device identification code;

[0044] When the gateway device monitors the network access application frame, it parses the message to obtain the unique device identification code of the terminal device, and allocates a unique communication address to the terminal device. At the same time, it sends the unique device identification code and unique communication address of the terminal device as a network access response frame to the terminal device to complete the automatic networking of the gateway device;

[0045] After the terminal device monitors the network access response frame, it determines whether it is a response sent to this device according to the unique device identification code in the message. If it is a response sent to this device, it parses the unique communication address and records it, switches to the network access state, and automatically completes the networking.

[0046] Specifically, the specific implementation process of the above automatic networking includes:

[0047] The process of automatic networking of long-distance wireless communication The wireless communication gateway device can be carried out according to the following steps: The wireless communication gateway device first sets the "networking parameters", then turns on the "networking switch", the gateway turns on automatic networking, and automatically switches to the initial default channel and the channel specified by the "networking parameters" alternately. Send the "network access broadcast frame" on the initial default channel, which contains the channel and other parameters specified by the "networking parameters"; receive the "network access application frame" on the channel specified by the "networking parameters". After receiving the "network access application frame", parse the message, record the unique device identification code of the wireless communication terminal device attached to the message, assign a unique communication address to the terminal device and record it, and then send the "network access response frame" with the unique device identification code and unique communication address of the terminal device, and the automatic networking on the gateway device side is completed. Turn off the "networking switch", the gateway device stops automatic networking, remains on the channel specified by the "networking parameters", and no longer switches to the initial default channel.

[0048] The process of automatic networking of long-distance wireless communication The terminal equipment of wireless communication can proceed according to the following steps: After the terminal equipment of wireless communication is started with the initial default parameters, it remains in the "waiting for network access" state and receives the "network access broadcast frame" on the initial default channel. After receiving the "network access broadcast frame", it parses the message and enters the "network accessing" state. It no longer receives the "network access broadcast frame" and automatically switches to the channel specified in the message. It sends the "network access application frame", which contains its unique device identification code and other parameters. At the same time, it receives the "network access response frame". After receiving the "network access response frame", it determines whether it is a response to this device according to the unique device identification code in the message. If it is a response to this device, it parses the unique communication address and records it, switches to the "already connected to the network" state, no longer sends the "network access application frame" and receives the "network access response frame", and the automatic networking on the terminal equipment side is completed.

[0049] In an optional embodiment, if Figure 2 The implementation process specifically includes:

[0050] 1: The long-distance wireless communication terminal device is connected to the downstream device and powered on;

[0051] 2: The long-distance wireless communication gateway device is connected to the upper device or application platform, powered on, and the networking parameters are set, and then the networking is started;

[0052] 3: Determine whether the network is successfully established on the gateway side according to the indicator light or screen of the gateway device, and determine whether the network is successfully established on the terminal side according to the indicator light or screen of the terminal device;

[0053] General remote parameter delivery process:

[0054] After the network is successfully established, the parameters of the terminal device can be configured and issued at any time on the gateway device side;

[0055] General process of automatically adjusting network parameters:

[0056] The gateway device communicates data with the terminal device and detects whether the communication is abnormal. When the communication is abnormal, there is no need for manual intervention, that is, the system itself can automatically try to reconnect.

[0057] In an optional embodiment of the present application, please refer to Figure 3 , which shows a wireless communication terminal configuration flow chart provided in an embodiment of the present application. The method may include two main bodies, one applied to a gateway device and the other applied to a terminal device. When the automatic networking is completed, the gateway device remotely sends the serial port parameters of the terminal device, specifically:

[0058] The gateway device remotely configures the serial port parameters of the specified terminal device that has been successfully networked, and sends the serial port parameters as data frames to the specified terminal device; wherein the serial port parameters at least include the serial port baud rate and the network port IP.

[0059] The terminal device starts to monitor the data frame. When receiving the data frame with the serial port parameters, it parses the message, automatically modifies its own serial port parameters, and then responds to the data response frame. The terminal device responds that the remote parameters are completed. The data frame includes a data frame with application data and a data frame with serial port parameters.

[0060] The gateway device monitors the data response frame sent by the terminal device, and performs verification after receiving the data response frame. When the verification passes, the gateway device completes the remote parameter sending.

[0061] Specifically, the above process involves the process of remotely sending parameters, specifically:

[0062] The process of long-distance wireless communication remotely sending parameters by the gateway device can be carried out in the following steps: After the automatic networking is completed, the interface parameters (such as serial port baud rate, network port IP, etc.) of the specified terminal device that has been successfully networked can be remotely configured at any time on the wireless communication gateway device side, and then the "data frame" with interface parameters is sent down, and the "data response frame" is received. After receiving the "data response frame", the remote parameter sending of the gateway device side is completed.

[0063] The process of long-distance wireless communication remotely sending parameters can be carried out by the terminal device in the following steps: After the automatic networking is completed, the wireless communication terminal device starts to monitor the "data frame", which includes "data frames" with application data and "data frames" with interface parameters. After receiving the "data frame" with interface parameters, the message is parsed, the interface parameters are automatically modified, and then the "data response frame" is responded. The terminal device side responds to the completion of the remote parameters.

[0064] Optionally, the embodiment of the present application also includes automatically adjusting network parameters, specifically:

[0065] When the transmission is idle, the terminal device sends a heartbeat frame to the gateway device at a specified time interval, and waits to receive a heartbeat response frame; the gateway device monitors the heartbeat frame sent by the terminal device in real time, and when the heartbeat frame is received, it sends a heartbeat response frame to the sender of the heartbeat frame. Among them, when the terminal device does not receive a heartbeat response frame within the specified timeout time and number of retries, the wireless communication is abnormal; after the wireless communication is abnormal, the terminal device automatically enters the network access state, adjusts the network parameters, and re-executes the automatic networking process. When the gateway device times out and does not receive the heartbeat frame sent by the terminal device, it determines that the current terminal device communication is abnormal, and automatically deletes the information of the terminal device, adjusts the network parameters, and re-executes the automatic networking process.

[0066] The gateway device can automatically adjust the network parameters of long-distance wireless communication according to the following steps: After receiving the "heartbeat frame", the wireless communication gateway device sends a "heartbeat response frame". When the "heartbeat frame" of a terminal device is not received after a timeout, it is considered that the terminal device has abnormal communication. After the wireless communication is abnormal, the information of the terminal device is automatically deleted, the network parameters are adjusted, and the automatic networking process is re-executed.

[0067] The process of detecting communication anomalies in long-distance wireless communication can be carried out by the terminal device in the following steps: When the wireless communication terminal device is idle, it sends a "heartbeat frame" to the wireless communication gateway device at a specified time interval and waits to receive a "heartbeat response frame". If the "heartbeat response frame" is received, the wireless communication is normal; if the "heartbeat response frame" cannot be received within the specified timeout time and number of retries, the wireless communication is abnormal. After the wireless communication is abnormal, the terminal device automatically enters the "network access" state, adjusts the network parameters, and re-executes the network access steps. The "heartbeat frame" is used to detect and maintain the connection, so it only needs to be sent when the wireless communication is idle to reduce resource usage.

[0068] When the long-distance wireless communication terminal is in the "waiting for network access" state, it does not respond to frame types other than "network access broadcast frames"; when it is in the "accessing the network" state, it does not respond to frame types other than "network access response frames"; when it is in the "already accessed the network" state, it does not respond to frame types other than "data frames" and "heartbeat response frames".

[0069] like Figure 4 and Figure 5 , respectively give a schematic diagram of the wireless communication gateway setting networking parameters page and a schematic diagram of the wireless communication gateway setting remote parameters page in this application. In summary, it can be seen that this application achieves:

[0070] Automatic networking: No need to configure parameters for long-distance wireless communication terminal equipment, just keep the initial default parameters to automatically join the wireless communication network that has networking enabled.

[0071] Automatically send parameter configuration: No need to operate the long-distance wireless communication terminal equipment, the parameters of the wireless communication terminal equipment can be remotely configured and sent through the wireless gateway device.

[0072] Automatically adjust network parameters: The system can detect whether the communication is abnormal, and automatically adjust the network parameters of wireless communication and reconnect when abnormal.

[0073] The existing related technologies focus on solving the problems of LoRa network transmission conflicts, improving effectiveness, reducing conflicts, and reducing channel conflicts, but do not involve the wireless automatic networking and configuration method described in this application. This application mainly describes a method for automatic networking, automatic parameter distribution, and automatic adjustment of network parameters for long-distance wireless communication, which reduces manual operations, reduces workload and error probability, and reduces the probability and impact of communication abnormalities.

[0074] The present application also provides a long-distance wireless communication automatic networking configuration system. The system includes:

[0075] A gateway device is used to set networking parameters, alternately switch between the initial default channel and the data channel specified by the networking instruction after turning on the networking switch, and send a network access broadcast frame on the initial default channel, and listen to the network access application frame sent by the terminal device in the data channel specified by the networking instruction; when the gateway device listens to the network access application frame, it parses the message to obtain the unique device identification code of the terminal device, and allocates a unique communication address to the terminal device, and at the same time sends the unique device identification code of the terminal device and the unique communication address as a network access response frame to the terminal device, so as to complete the automatic networking of the gateway device;

[0076] A terminal device is used to start up with initial default parameters, remain in a waiting state for network access, and listen to network access broadcast frames; when a network access broadcast frame is received on the initial default channel, modify the network access parameters to enter a network access state, parse the message, automatically switch to the data channel specified in the message, and send a network access application frame while listening to a network access response frame sent by a gateway device; wherein the network access application frame includes its unique device identification code; after the terminal device listens to the network access response frame, it determines whether it is a response sent to the device according to the unique device identification code in the message. If it is a response sent to the device, it parses the unique communication address and records it, switches to the network access state, and automatically completes the networking.

[0077] The long-distance wireless communication automatic networking configuration system provided in the embodiment of the present application is used to implement the above-mentioned long-distance wireless communication automatic networking configuration method. For the specific definition of the long-distance wireless communication automatic networking configuration system, please refer to the definition of the long-distance wireless communication automatic networking configuration method in the above text, which will not be repeated here. The various parts in the above-mentioned long-distance wireless communication automatic networking configuration system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the device in the form of hardware, or can be stored in the memory in the device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0078] In one embodiment of the present application, a gateway device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the instructions of the gateway device in the automatic networking configuration method for long-distance wireless communication are implemented.

[0079] In one embodiment of the present application, a terminal device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the instructions of the terminal device in the automatic networking configuration method for long-distance wireless communication are implemented.

[0080] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0081] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.

Claims

1. A method for automatic networking configuration of long-distance wireless communication, characterized in that: The method comprises: The gateway device sets the networking parameters, and after turning on the networking switch, it alternately switches between the initial default channel and the data channel specified by the networking instruction, and sends network access broadcast frames on the initial default channel, and listens to the network access application frames sent by the terminal device on the data channel specified by the networking instruction; After the terminal device is started with the initial default parameters, it remains in the waiting state for network access and monitors the network access broadcast frame; when the network access broadcast frame is received on the initial default channel, the network access parameters are modified to enter the network access state, the message is parsed, and the terminal device automatically switches to the data channel specified in the message and sends the network access application frame while monitoring the network access response frame sent by the gateway device; wherein the network access application frame contains its unique device identification code; When the gateway device monitors the network access application frame, it parses the message to obtain the unique device identification code of the terminal device, allocates a unique communication address to the terminal device, and sends the unique device identification code and the unique communication address of the terminal device as a network access response frame to the terminal device to complete the automatic networking of the gateway device; After the terminal device monitors the network access response frame, it determines whether it is a response sent to this device according to the unique device identification code in the message. If it is a response sent to this device, it parses the unique communication address and records it, switches to the network access state, and automatically completes the networking.

2. The long-distance wireless communication automatic networking configuration method according to claim 1, characterized in that: The method further includes: when the automatic networking is completed, the gateway device remotely sends the serial port parameters of the terminal device, specifically: The gateway device remotely configures the serial port parameters of the specified terminal device that has been successfully networked, and sends the serial port parameters as a data frame to the specified terminal device; wherein the serial port parameters at least include the serial port baud rate and the network port IP; The terminal device starts to monitor the data frame. When receiving the data frame with the serial port parameters, it parses the message, automatically modifies its own serial port parameters, and then responds to the data response frame. The terminal device responds that the remote parameters are completed. The data frame includes a data frame with application data and a data frame with serial port parameters. The gateway device monitors the data response frame sent by the terminal device, and performs verification after receiving the data response frame. When the verification passes, the gateway device completes the remote parameter sending.

3. The long-distance wireless communication automatic networking configuration method according to claim 1, characterized in that: After completing the automatic networking, the gateway device turns off the networking switch, remains in the data channel specified by the networking instruction, and no longer switches to the initial default channel.

4. The long-distance wireless communication automatic networking configuration method according to claim 1, characterized in that: The method further comprises: When the transmission is idle, the terminal device sends a heartbeat frame to the gateway device at a specified time interval, and waits to receive a heartbeat response frame; the gateway device monitors the heartbeat frame sent by the terminal device in real time, and when a heartbeat frame is received, it sends a heartbeat response frame to the sender of the heartbeat frame.

5. The long-distance wireless communication automatic networking configuration method according to claim 4, characterized in that: When the terminal device does not receive the heartbeat response frame within the specified timeout period and retry times, the wireless communication is abnormal; after the wireless communication is abnormal, the terminal device automatically enters the network access state, adjusts the network parameters, and re-executes the automatic networking process.

6. The long-distance wireless communication automatic networking configuration method according to claim 4, characterized in that: When the gateway device times out and fails to receive the heartbeat frame sent by the terminal device, it determines that the current terminal device communication is abnormal, automatically deletes the information of the terminal device, adjusts the network parameters, and re-executes the automatic networking process.

7. The long-distance wireless communication automatic networking configuration method according to claim 1, characterized in that: When the terminal device is in the state of waiting for network access, it does not respond to frame types other than network access broadcast frames; When in the state of accessing the network, it does not respond to frame types other than the network access response frame; When in the network access state, it does not respond to frame types other than data frames and heartbeat response frames.

8. A long-distance wireless communication automatic networking configuration system, characterized in that: The system includes a gateway device and multiple terminal devices: The gateway device is used to set the networking parameters. After the networking switch is turned on, it alternately switches between the initial default channel and the data channel specified by the networking instruction, sends network access broadcast frames on the initial default channel, and listens to the network access application frames sent by the terminal device on the data channel specified by the networking instruction. When the gateway device monitors the network access application frame, it parses the message to obtain the unique device identification code of the terminal device, allocates a unique communication address to the terminal device, and sends the unique device identification code and the unique communication address of the terminal device as a network access response frame to the terminal device to complete the automatic networking of the gateway device; A terminal device is used to start up with initial default parameters, remain in a waiting state for network access, and listen to network access broadcast frames; when a network access broadcast frame is received on the initial default channel, modify the network access parameters to enter a network access state, parse the message, automatically switch to the data channel specified in the message, and send a network access application frame while listening to a network access response frame sent by a gateway device; wherein the network access application frame includes its unique device identification code; after the terminal device listens to the network access response frame, it determines whether it is a response sent to the device according to the unique device identification code in the message. If it is a response sent to the device, it parses the unique communication address and records it, switches to the network access state, and automatically completes the networking.

9. A gateway device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the instructions of the gateway device in the automatic networking configuration method for long-distance wireless communication as claimed in any one of claims 1 to 7 are implemented.

10. A terminal device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the instructions of the terminal device in the automatic networking configuration method for long-distance wireless communication as claimed in any one of claims 1 to 7 are implemented.