CN112583656B - Debugging method and device based on LWIP user mode PPP communication function - Google Patents

Debugging method and device based on LWIP user mode PPP communication function Download PDF

Info

Publication number
CN112583656B
CN112583656B CN202011245172.7A CN202011245172A CN112583656B CN 112583656 B CN112583656 B CN 112583656B CN 202011245172 A CN202011245172 A CN 202011245172A CN 112583656 B CN112583656 B CN 112583656B
Authority
CN
China
Prior art keywords
debugging
parameters
user
lwip
ppp
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.)
Active
Application number
CN202011245172.7A
Other languages
Chinese (zh)
Other versions
CN112583656A (en
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.)
Shenzhen Neoway Technology Co Ltd
Original Assignee
Shenzhen Neoway 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 Shenzhen Neoway Technology Co Ltd filed Critical Shenzhen Neoway Technology Co Ltd
Priority to CN202011245172.7A priority Critical patent/CN112583656B/en
Publication of CN112583656A publication Critical patent/CN112583656A/en
Application granted granted Critical
Publication of CN112583656B publication Critical patent/CN112583656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • 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/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Abstract

The application provides a method and a device for debugging a user mode PPP protocol stack based on LWIP. Wherein the method comprises the following steps: the target instance sets debugging information to a light internet protocol stack LWIP (light weight Internet protocol stack), wherein the target instance is an instance when a target program runs, the target program is used for debugging a PPP dial-up communication function in the communication module, and the target instance runs in a user mode; and testing the PPP dial-up communication function of the communication module through the PPP dial-up communication function in the LWIP according to the debugging information, thereby obtaining a test result.

Description

Debugging method and device based on LWIP user mode PPP communication function
Technical Field
The application relates to the technical field of wireless communication, in particular to a debugging method and device based on an LWIP user-mode PPP communication function.
Background
With the development of broadband access technology, more and more services are developed based on broadband IP networks. Generally, in order to open a service, a terminal device needs to use a point-to-point protocol (PPP) dialing in advance to configure some relevant configuration parameters, such as an IP address, a gateway address, a domain name system, a server address, and the like, on the terminal device.
PPP is a link layer protocol designed for simple links for transmitting data packets between equivalent units, and is a common solution for establishing point-to-point connections to transmit data mainly in a dialing or dedicated line mode, and further, PPP dial-up networking becomes a simple connection among various hosts, bridges and routers. Therefore, PPP dialing is almost a necessary function of the communication module, and the communication module realizes connection with the wide area network based on its own PPP dialing function. Therefore, the programmer often needs to debug the PPP communication function of the communication module. When debugging the PPP function of the communication module, it is common to use an existing tool, such as a dialer provided in the windows system or a dialer PPPD of linux.
However, the windows protocol stack is integrated in the kernel, and the dialing tool has no open source, and besides several common errors, a solution can be found, and many errors cannot be solved from the bottom. In addition, the configuration items for the user configuration are fewer, and only authentication modes, user names and passwords and the like are provided.
The dialing tool PPPD of linux is relatively open compared with the dialing tool of windows, and more PPP configuration items can be configured through scripts, but linux is not friendly to windows in terms of visualization, and when debugging protocol stack parameters, a kernel may need to be recompiled, which is relatively high in requirement for a user.
How to establish an open-source and visual-interface-friendly debugging method and device for PPP communication functions becomes an urgent problem to be solved.
Disclosure of Invention
In order to solve the above problems, an embodiment of the present application discloses a debugging method and device based on an LWIP user-mode PPP communication function, so that a user can conveniently debug parameters in the PPP communication function without affecting the function of the current system, and a visual interface is more friendly on the premise of implementing the above functions.
In a first aspect, an embodiment of the present application provides a method for debugging a point-to-point protocol PPP dialing function, including: the target instance sets debugging information to a light internet protocol stack LWIP (light weight Internet protocol stack), wherein the target instance is an instance when a target program runs, the target program is used for debugging a PPP dial-up communication function in the communication module, and the target instance runs in a user mode; and testing the PPP dial-up communication function of the communication module through the PPP dial-up communication function in the LWIP according to the debugging information, thereby obtaining a test result.
In one possible implementation, before the target instance sets the debug information to the lightweight internet protocol stack LWIP, the method further comprises: under the condition that an automatic test instruction input by a user is received, the target instance acquires the debugging information from a configuration file; or; and in the case of receiving a manual test instruction input by a user, popping up a command line interface to receive the debugging information input by the user.
In one possible implementation, before the target instance sets the debug information to the lightweight internet protocol stack LWIP, the method further comprises:
the target instance configures test parameters through a configuration module, wherein the test parameters comprise one or more of serial port parameters, point-to-point protocol (PPP) parameters, debugging levels, authentication modes, user names and passwords, remote Internet Protocol (IP) addresses, local Internet Protocol (IP) addresses, internet protocol version 6 IPV6 switches, link Control Protocol (LCP) echo configuration, asynchronous Control Character Mapping (ACCM) character table configuration, maximum Transmission Unit (MTU) size, transmission Control Protocol (TCP) parameters, maximum message segment length (MSS) window size and retransmission mechanism parameters;
the target instance sets debug information to the LWIP, including: the target instance sets debug information to LWIP according to the test parameters.
In one possible implementation, the target instance runs on top of an interface operating system.
In one possible implementation, the communication module is switched from the PPP dial-up communication mode to the AT communication mode by receiving a user-entered switch command in the command line interface.
The debugging method of the point-to-point PPP dial-up communication function is based on open source LWIP, and realizes a debugging method of a user state point-to-PPP dial-up function running on windows, so that a user can conveniently debug parameters in PPP, the function of the current system cannot be influenced, and the visual interface of a debugging device corresponding to the debugging method is ensured to be more friendly on the premise of realizing the function. The method can also switch the point-to-PPP dial-up communication mode to the AT communication mode by receiving a switching command input by a user in a command line interface.
In a second aspect, an embodiment of the present application provides a device for debugging a PPP dial-up communication function, including: a sending module and a testing module, wherein the sending module is used for sending a test signal to the testing module,
the sending module is used for setting debugging information to a light internet protocol stack LWIP by a target instance, wherein the target instance is an instance when a target program runs, the target program is used for debugging a point-to-point protocol PPP dial-up communication function in the communication module, and the target instance runs in a user state;
and the test module is used for testing the PPP dial-up communication function of the communication module through the PPP dial-up communication function in the LWIP according to the debugging information so as to obtain a test result.
In a possible implementation manner, the apparatus further includes a debugging information obtaining module, where the debugging information obtaining module is configured to obtain the debugging information from a configuration file when receiving an automatic test instruction input by a user; or; the debugging information acquisition module is used for popping up a command line interface under the condition of receiving a manual test instruction input by a user so as to receive the debugging information input by the user.
In a possible implementation manner, the apparatus further includes a configuration module, where the configuration module is configured to configure test parameters, where the test parameters include one or more of a serial port parameter, a PPP parameter, a debugging level, an authentication manner, a username and password, a remote internet protocol IP address, a local internet protocol IP address, an IPV6 switch version 6 of the internet protocol, a Link Control Protocol (LCP) echo configuration, an Asynchronous Control Character Mapping (ACCM) character table configuration, a Maximum Transmission Unit (MTU) size, a Transmission Control Protocol (TCP) parameter, a maximum message segment length (MSS) window size, and a retransmission mechanism parameter; the sending module is specifically configured to set the debugging information to the LWIP according to the test parameters.
In one possible implementation, the target instance runs on top of an interface operating system.
In one possible implementation manner, the apparatus further includes a switching module, and the switching module is configured to switch the communication module from the PPP dial-up communication mode to the AT communication mode by receiving a switching command input by a user in the command line interface.
The debugging device of the PPP dial-up communication function is a debugging device which is based on an open source light internet protocol stack LWIP and realizes a user-mode PPP dial-up communication function running on windows, so that a user can conveniently debug parameters in PPP, the function of a current system cannot be influenced, and the visual interface of the debugging device is more friendly on the premise of realizing the function. The device can also switch the PPP dial-up communication mode to the AT communication mode by receiving a switching command input by a user in a command line interface.
In a third aspect, an embodiment of the present application provides a computing device, including a processor and a memory, where the memory is configured to store instructions, and the processor is configured to execute the instructions, and when the processor executes the instructions, perform the method as described in the first aspect or any specific implementation manner of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored therein, which when executed on a computing device, perform the method as described in the first aspect or any specific implementation manner of the first aspect.
The present application can further combine to provide more implementations on the basis of the implementations provided by the above aspects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for debugging a LWIP-based user-mode PPP communication function according to the present application;
FIG. 2 is a schematic flowchart of another LWIP-based user-mode PPP communication function debugging method according to the present application;
FIG. 3 is a schematic block diagram of a structure of a debugging apparatus for LWIP-based user-state PPP communication functions;
fig. 4 is a schematic structural diagram of a computing device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to solve the problems that a debugging tool of a PPP dial-up communication function is not open, configuration items are few, or a visual interface is not friendly in the prior art, an embodiment of the application provides a debugging method and a debugging device of a user-mode PPP communication function based on LWIP, and specifically, a debugging method of a user-mode PPP dial-up communication function that can be operated on an interface operating system is implemented based on an open-source light internet protocol (LWIP) protocol stack, so that a user can conveniently debug parameters in the PPP dial-up communication function without affecting the function of the current system, and the visual interface of the debugging device corresponding to the debugging method is ensured to be more friendly on the premise of realizing the functions. The method can also switch the PPP dial-up communication mode to the AT communication mode by receiving a switching command input by a user in a command line interface.
As shown in fig. 1, fig. 1 is a schematic flowchart of a debugging method based on an LWIP user-state PPP communication function, which can be applied to a debugging device for implementing a point-to-point protocol PPP dial-up communication function, and the method is applied to a debugging device based on an LWIP user-state PPP protocol stack, where the debugging device includes a target instance, an LWIP, a communication module, a configuration module, a command line interface, and the like, and the specific implementation steps of the method are as follows:
and S110, receiving an automatic test instruction input by a user by the target example.
In a specific embodiment of the present application, the target instance is an instance when an object program is running, the object program is used for debugging a point-to-point protocol PPP function of the communication module, and the target instance runs in a user mode. In the user mode state, codes executed by the computer are limited by hardware, a kernel needs to be recompiled when debugging protocol stack parameters like a dialing tool PPPD under a linux operating system, and the requirement on a user is simple. Therefore, when the target instance runs in the user mode, the debugging method based on the LWIP user mode PPP communication function is simpler and more convenient, and is convenient for user operation.
In a specific embodiment of the present application, the target instance runs on an interface operating system, where the interface operating system refers to an operating system capable of providing a friendly visual interface for a user, for example, a windows operating system or the like.
In a specific embodiment of the present application, the automatic test instruction refers to that, in a case of receiving an automatic test instruction input by a user, a target instance acquires debugging parameters and test parameters from a configuration file, where the debugging information includes the debugging parameters and the test parameters; and the debugging information is set in the LWIP, and the communication module uses the debugging information to test, so as to obtain a test result. And the automatic test is that the communication module automatically tests according to the debugging information.
And S120, acquiring debugging information from the configuration file through the automatic test instruction.
In a specific embodiment of the present application, the debugging information is used to debug a PPP dial-up communication function in the communication module, and parameters in the PPP dial-up communication function are debugged, so that the communication module can perform normal dial-up internet communication. The debugging information comprises a test parameter, specifically, the debugging information comprises a serial port parameter, a point-to-point protocol (PPP) parameter, a debugging level, an authentication mode, a user name and a password, a remote Internet Protocol (IP) address, a local IP address, an IPV6 switch version 6 of the Internet protocol, a link control protocol receipt (LCP) echo configuration, an Asynchronous Control Character Mapping (ACCM) character table configuration, a Maximum Transmission Unit (MTU) size, a Transmission Control Protocol (TCP) parameter, a maximum message segment length (MSS) window size, a retransmission mechanism parameter and the like.
S130: the target instance sets the debug information to the lightweight internet protocol stack LWIP.
In a specific embodiment of the present application, the debugging information includes a packet internet explorer (PING) program, a throughput measurement program, a File Transfer Protocol (FTP)/hypertext transfer protocol (http) standard protocol program, and the like. Specifically, the PING program is a service command working in an application layer of a TCP/IP network architecture, and mainly sends an internet message control protocol (ICMP) request message to a specific destination host, so as to test whether a destination station is reachable and know status information of the destination station. Wherein the measurement throughput procedure is a network performance testing tool. The measurement throughput program can test the maximum TCP and UDP bandwidth performance, has various parameters and UDP characteristics, can be adjusted according to the requirements, and can also report the bandwidth, delay jitter and data packet loss. Among them, the hypertext transfer protocol is a transfer protocol for transferring hypertext from a World Wide Web (WWW) server to a local browser. The hypertext transfer protocol is a protocol based on TCP/IP communication to transfer data such as hypertext markup language files, picture files and query results.
It should be noted that, because the LWIP is a set of open source code transmission control protocol/internet protocol (TCP/IP) protocol stack for the embedded system, all TCP/IP protocol processes are in one process, and there is no obvious boundary between each layer, and each layer can access the shared memory space. Each layer of protocol is implemented in the form of modules that together form an integral part of the LWIP. And the LWIP can be transplanted to an operating system or can independently run under the condition of no operating system. The key point of the implementation of the protocol stack is to reduce the occupation of a Random Access Memory (RAM) on the basis of keeping the main functions of a TCP protocol, and improve the transmission speed of data and the resource utilization rate.
S140: and testing the PPP dial-up communication function of the communication module through the PPP dial-up communication function in the LWIP according to the debugging information, thereby obtaining a test result.
In a specific embodiment of the present application, the communication module integrates a chip, a memory, a power amplifier device, and the like on a circuit board, and provides a functional module of a standard interface, and various terminal devices can realize a communication function by means of the communication module. The communication module can comprise cellular communication modules (2G/3G/4G/5G/NB-IoT, etc.) and non-cellular communication modules (WiFi/Bluetooth/LoRa, etc.). The communication module may also communicate with a modem (modem).
In a specific embodiment of the present application, the communication module is switched from the PPP dial-up communication mode to the AT communication mode by receiving a user-input switch command in the command line interface. The switch command may be "+ + + + +", but is not limited to this possibility. The PPP dial-up communication mode is switched to the AT communication mode, so that the debugging device corresponding to the debugging method can read the AT interaction information such as short message content, voice call and the like sent by the server.
As shown in fig. 2, fig. 2 is a schematic flowchart of another debugging method based on the LWIP user-state PPP communication function according to the present application, where the method can be applied to a debugging device that implements a point-to-point protocol PPP dial-up communication function, and the method is applied to a debugging device based on the LWIP user-state PPP protocol stack, where the debugging device includes a target instance, an LWIP, a communication module, a configuration module, a command line interface, and the like, and the specific implementation steps of the method are as follows:
s210, receiving a manual test instruction input by a user by the target example.
In a specific embodiment of the present application, the target instance is an instance when an object program is running, the object program is used for debugging a point-to-point protocol PPP function of the communication module, and the target instance runs in a user mode. In the user mode state, codes executed by the computer are limited by hardware, a kernel needs to be recompiled when debugging protocol stack parameters like a dialing tool PPPD under a linux operating system, and the requirement on a user is simple. Therefore, when the target instance runs in the user mode, the debugging method based on the LWIP user mode PPP communication function is simpler and more convenient, and is convenient for user operation.
In a specific embodiment of the present application, the target instance runs on an interface operating system, where the interface operating system refers to an operating system capable of providing a friendly visual interface for a user, for example, a windows operating system or the like.
In a specific embodiment of the present application, the manual test instruction refers to popping up a command line interface when the target instance receives a manual test instruction input by a user, the user inputs debugging information through the command line interface, the target instance sets the debugging information in the LWIP, and the communication module performs a test according to the debugging information, so as to obtain a test result. Wherein the debugging information comprises a function to be tested.
S220, popping up a command line interface, and receiving needed debugging information input in the command line interface by a user through a target example.
In a specific embodiment of the present application, the command line interface may also be called a shell interface, and in computer science, shell is commonly called shell (for distinguishing from core), which refers to software for providing an operation interface for a user. It receives a command input by a user and then calls a corresponding application. It is similar to the command line program cmd.exe under the Disk Operating System (DOS) in the windows environment.
In a specific embodiment of the present application, the debugging information includes a PING program, a throughput measurement program, a standard protocol program such as a file transfer protocol/hypertext transfer protocol, and the like. Specifically, the PING program is a service command working in an application layer of a TCP/IP network architecture, and mainly sends an ICMP request message to a specific destination host to test whether a destination station is reachable and know status information of the destination station. Wherein the measurement throughput procedure is a network performance testing tool. The measurement throughput program can test the maximum TCP bandwidth performance, has various parameters, can be adjusted as needed, and can also report bandwidth, delay jitter, and packet loss. Wherein the hypertext transfer protocol is a transfer protocol for transferring hypertext from the WWW server to the local browser. The hypertext transfer protocol is a protocol based on TCP/IP communication to transfer data such as hypertext markup language files, picture files and query results.
S230: the target instance sets the debug information to the lightweight internet protocol stack LWIP.
In a specific embodiment of the present application, before the target instance sets the debug information in the LWIP, the method further includes: the target instance configures test parameters through a configuration module, wherein the test parameters comprise one or more of serial port parameters, point-to-point protocol (PPP) parameters, debugging levels, authentication modes, user names and passwords, remote Internet Protocol (IP) addresses, local Internet Protocol (IP) addresses, internet protocol version 6 IPV6 switches, link Control Protocol (LCP) echo configuration, asynchronous Control Character Mapping (ACCM) character table configuration, maximum Transmission Unit (MTU) size, transmission Control Protocol (TCP) parameters, maximum message segment length (MSS) window size and retransmission mechanism parameters. The target instance sets debug information to the LWIP, including: and the target example sets the debugging information to the LWIP according to the test parameters.
It should be noted that, because LWIP is a set of open source TCP/IP protocol stack for embedded systems, all TCP/IP protocol processes are in one process, there is no obvious boundary between each layer, and each layer can access a shared memory space. Each layer of protocol is implemented in the form of modules that together form an integral part of the LWIP. And the LWIP can be transplanted to an operating system or can independently run under the condition of no operating system. The key point of the protocol stack implementation lies in that the occupation of the RAM is reduced on the basis of keeping the main functions of the TCP protocol, and the transmission speed and the resource utilization rate of data are improved.
S240: and testing the PPP dial-up communication function of the communication module through the PPP dial-up communication function in the LWIP according to the debugging information, thereby obtaining a test result.
In a specific embodiment of the present application, the communication module integrates a chip, a memory, a power amplifier device, and the like on a circuit board, and provides a functional module of a standard interface, and various terminal devices can realize a communication function by means of the communication module. The communication module can comprise cellular communication modules (2G/3G/4G/5G/NB-IoT, etc.) and non-cellular communication modules (WiFi/Bluetooth/LoRa, etc.). The communication module may also communicate with the modem.
In a specific embodiment of the present application, a switch command input by a user in a command line interface is received, and the communication module is switched from a PPP dial-up communication mode to an AT communication mode. The switch command may be "+ + + +", but is not limited to this possibility. The PPP dial-up communication mode is switched to the AT communication mode, so that the debugging device corresponding to the debugging method can read the AT interaction information such as short message content, voice call and the like sent by the server.
Referring to fig. 3, fig. 3 is a debugging apparatus for LWIP-based user-mode PPP communication functions. The device comprises: a sending module 310 and a testing module 320.
The sending module 310 is configured to set debugging information to a lightweight internet protocol stack LWIP by a target instance, where the target instance is an instance when a target program runs, the target program is configured to debug a point-to-point protocol PPP dial-up communication function in the communication module, and the target instance runs in a user state.
In a specific embodiment of the present application, the debugging information is used to debug a PPP dial-up communication function in the communication module, and parameters in the PPP dial-up communication function are debugged, so that the communication module can perform normal dial-up internet communication. The debugging information includes a test parameter, specifically, the debugging information includes a serial port parameter, a point-to-point protocol PPP parameter, a debugging level, an authentication mode, a username and password, a remote internet protocol IP address, a local internet protocol IP address, an internet protocol version 6 IPV6 switch, a link control protocol receipt LCP echo configuration, an asynchronous control character mapping ACCM character table configuration, a maximum transmission unit MTU size, a transmission control protocol TCP parameter, a maximum message segment length MSS window size, a retransmission mechanism parameter, and the like.
In a specific embodiment of the present application, the debugging information includes a packet internet explorer (PING) program, a throughput measurement program, a File Transfer Protocol (FTP)/hypertext transfer protocol (http) standard protocol program, and the like. Specifically, the PING program is a service command working in an application layer of a TCP/IP network architecture, and mainly sends an internet message control protocol (ICMP) request message to a specific destination host, so as to test whether a destination station can reach and know status information of the destination station. Wherein the measurement throughput procedure is a network performance testing tool. The measurement throughput program can test the maximum TCP and UDP bandwidth performance, has various parameters and UDP characteristics, can be adjusted as needed, and can also report bandwidth, delay jitter, and packet loss. Among them, the hypertext transfer protocol is a transfer protocol for transferring hypertext from a World Wide Web (WWW) server to a local browser. The hypertext transfer protocol is a protocol based on TCP/IP communication to transfer data such as hypertext markup language files, picture files and query results.
It should be noted that, because the LWIP is a set of open source code transmission control protocol/internet protocol (TCP/IP) protocol stack for an embedded system, all TCP/IP protocol processes are in one process, there is no obvious boundary between each layer, and each layer can access a shared memory space. Each layer of protocol is implemented in the form of modules that together form the whole of the LWIP. And the LWIP can be transplanted to an operating system or can independently run under the condition of no operating system. The key point of the protocol stack implementation lies in that occupation of a Random Access Memory (RAM) is reduced on the basis of keeping the main functions of a TCP protocol, and the transmission speed and the resource utilization rate of data are improved.
In a specific embodiment of the present application, the target instance is an instance when an object program is running, the object program is used for debugging a point-to-point protocol PPP function of the communication module, and the target instance runs in a user mode. In the user mode state, codes executed by the computer are limited by hardware, a kernel needs to be recompiled when debugging protocol stack parameters like a dialing tool PPPD under a linux operating system, and the requirement on a user is simple. Therefore, when the target instance operates in the user mode, the debugging method based on the LWIP user mode PPP communication function is simpler and more convenient, and is convenient for user operation.
In a specific embodiment of the present application, the target instance runs on an interface operating system, where the interface operating system refers to an operating system capable of providing a friendly visual interface for a user, for example, a windows operating system or the like.
In the specific embodiment of the present application, the test may be an automatic test or a manual test. The automatic test instruction is that a target instance acquires debugging parameters and test parameters from a configuration file under the condition of receiving an automatic test instruction input by a user, wherein the debugging information comprises the debugging parameters and the test parameters; and setting the debugging information in the LWIP, and testing the communication module by using the debugging information so as to obtain a test result. And the automatic test is that the communication module automatically tests according to the debugging information. The manual test instruction is that a command line interface is popped up under the condition that a target example receives a manual test instruction input by a user, the user inputs a function to be tested through the command line interface, the target example sets debugging information in the LWIP, and the communication module performs testing according to the debugging information to obtain a test result. Wherein the debugging information comprises a function to be tested.
The test module 320 is configured to test the PPP dial-up communication function of the communication module through the PPP dial-up communication function in the LWIP according to the debugging information, so as to obtain a test result.
In a specific embodiment of the present application, the communication module integrates a chip, a memory, a power amplifier device, and the like on a circuit board, and provides a functional module of a standard interface, and various terminal devices can implement a communication function with the aid of the communication module. The communication module can comprise cellular communication modules (2G/3G/4G/5G/NB-IoT, etc.) and non-cellular communication modules (WiFi/Bluetooth/LoRa, etc.). The communication module can also communicate with the modem.
Fig. 4 is a schematic structural diagram of a computing device provided in an embodiment of the present application, where the computing device 500 includes: a processor 510, a communication interface 520, and a memory 530, the processor 510, the communication interface 520, and the memory 530 being interconnected by a bus 540, wherein the processor 510 is configured to execute instructions stored by the memory 530. The memory 530 stores program code, and the processor 510 may call the program code stored in the memory 530 to perform the following operations:
the processor 510 may have various specific implementation forms, for example, the processor 510 may be any one or a combination of multiple processors such as a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Tensor Processing Unit (TPU), or a neural Network Processing Unit (NPU), and the processor 510 may also be a single-core processor or a multi-core processor. The processor 510 may be made up of a combination of a CPU (GPU, TPU, or NPU) and hardware chips. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof. The processor 510 may also be implemented solely using logic devices with built-in processing logic, such as an FPGA or a Digital Signal Processor (DSP).
Communication interface 520 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an ethernet interface, a Controller Area Network (CAN) interface, or a Local Interconnect Network (LIN) interface, and the wireless interface may be a cellular network interface or use a wireless lan interface, etc.
The memory 530 may be a non-volatile memory, such as a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. Memory 530 may also be volatile memory, which may be Random Access Memory (RAM), which acts as external cache memory.
Memory 530 may also be used to store instructions and data that facilitate processor 510 in invoking the instructions stored in memory 530 to implement the operations performed by test module 320 described above or the operations performed by the debugging apparatus for point-to-point PPP dial-up communication functionality in the above-described method embodiments.
The bus 540 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Optionally, the computing device 500 may further include an input/output interface 550, and the input/output interface 550 is connected with an input/output device for receiving input information and outputting operation results.
The embodiments of the present application further provide a non-transitory computer storage medium, where instructions are stored in the computer storage medium, and when the instructions are run on a processor, the method steps in the foregoing method embodiments may be implemented, and specific implementation of the processor of the computer storage medium in executing the method steps may refer to specific operations in the foregoing method embodiments, and details are not described herein again.
The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media that can store program code, such as a removable hard disk, a magnetic or optical disk, etc.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A debugging method of point-to-point protocol PPP dial communication function is characterized in that,
the target instance sets debugging information to a lightweight Internet protocol stack (LWIP), wherein the target instance is an instance when a target program runs, the target program is used for debugging PPP dial-up communication functions in a communication module, the target instance runs in a user state, and the debugging information comprises at least one of the following: serial port parameters, point-to-point protocol PPP parameters, debugging levels, authentication modes, user names and passwords, remote internet protocol IP addresses, local internet protocol IP addresses, internet protocol version 6 IPV6 switches, link control protocol receipt LCP echo configuration, asynchronous control character mapping ACCM character table configuration, maximum transmission unit MTU size, transmission control protocol TCP parameters, maximum message segment length MSS window size and retransmission mechanism parameters;
and testing the PPP dial-up communication function of the communication module through the PPP dial-up communication function in the LWIP according to the debugging information, thereby obtaining a test result.
2. The method in accordance with claim 1, prior to the target instance setting the debug information to a lightweight internet protocol stack, LWIP, the method further comprising:
under the condition that an automatic test instruction input by a user is received, the target instance acquires the debugging information from a configuration file;
or;
and in the case of receiving a manual test instruction input by a user, popping up a command line interface to receive the debugging information input by the user.
3. The method of claim 1, wherein before the target instance sets the debug information to the lightweight internet protocol stack, LWIP, the method further comprises:
the target instance configures test parameters through a configuration module, wherein the test parameters comprise one or more of serial port parameters, PPP parameters, debugging levels, authentication modes, user names and passwords, remote Internet Protocol (IP) addresses, local IP addresses, IPV6 (internet protocol version 6), LCP (link control protocol) echo configuration, asynchronous Control Character Mapping (ACCM) character table configuration, maximum Transmission Unit (MTU) size, transmission Control Protocol (TCP) parameters, maximum message segment length (MSS) window size and retransmission mechanism parameters;
the target instance sets debug information to the LWIP, including: the target instance sets debug information to LWIP according to the test parameters.
4. The method of any of claims 1-3, wherein the target instance runs on top of an interface operating system.
5. A method according to any one of claims 1 to 3, wherein the communications module is switched from the PPP dial-up communications mode to the AT communications mode by receiving a user-entered switch command in a command line interface.
6. A debugging device of PPP dial-up communication function is characterized by comprising: a sending module and a testing module, wherein the sending module is used for sending a test signal to the testing module,
the sending module is used for setting debugging information to a lightweight internet protocol stack LWIP by a target instance, wherein the target instance is an instance when a target program runs, the target program is used for debugging a point-to-point protocol PPP dial-up communication function in a communication module, the target instance runs in a user state, and the debugging information comprises at least one of the following: serial port parameters, point-to-point protocol PPP parameters, debugging levels, authentication modes, user names and passwords, remote internet protocol IP addresses, local internet protocol IP addresses, internet protocol version 6 IPV6 switches, link Control Protocol (LCP) echo configuration, asynchronous Control Character Mapping (ACCM) character table configuration, maximum Transmission Unit (MTU) size, transmission Control Protocol (TCP) parameters, maximum message segment length (MSS) window size and retransmission mechanism parameters;
and the test module is used for testing the PPP dial-up communication function of the communication module through the PPP dial-up communication function in the LWIP according to the debugging information so as to obtain a test result.
7. The apparatus of claim 6, further comprising a debug information acquisition module,
the debugging information acquisition module is used for acquiring the debugging information from the configuration file under the condition of receiving an automatic test instruction input by a user;
or;
the debugging information acquisition module is used for popping up a command line interface under the condition of receiving a manual test instruction input by a user so as to receive the debugging information input by the user.
8. The apparatus of claim 7, further comprising a configuration module,
the configuration module is used for configuring test parameters, wherein the test parameters comprise one or more of serial port parameters, PPP parameters, debugging levels, authentication modes, user names and passwords, remote Internet Protocol (IP) addresses, local IP addresses, IPV6 (internet protocol version 6), LCP (link control protocol) echo configuration, asynchronous Control Character Mapping (ACCM) character table configuration, maximum Transmission Unit (MTU) size, transmission Control Protocol (TCP) parameters, maximum message segment length (MSS) window size and retransmission mechanism parameters;
the sending module is specifically configured to set the debugging information to the LWIP according to the test parameters.
9. The apparatus of any of claims 6 to 8, wherein the target instance runs on top of an interface operating system.
10. The apparatus of any of claims 6-8, further comprising a switch module configured to switch the communication module from a PPP dial-up communication mode to an AT communication mode by receiving a user-entered switch command in a command line interface.
CN202011245172.7A 2020-11-10 2020-11-10 Debugging method and device based on LWIP user mode PPP communication function Active CN112583656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011245172.7A CN112583656B (en) 2020-11-10 2020-11-10 Debugging method and device based on LWIP user mode PPP communication function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011245172.7A CN112583656B (en) 2020-11-10 2020-11-10 Debugging method and device based on LWIP user mode PPP communication function

Publications (2)

Publication Number Publication Date
CN112583656A CN112583656A (en) 2021-03-30
CN112583656B true CN112583656B (en) 2022-10-04

Family

ID=75122501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011245172.7A Active CN112583656B (en) 2020-11-10 2020-11-10 Debugging method and device based on LWIP user mode PPP communication function

Country Status (1)

Country Link
CN (1) CN112583656B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005034052A1 (en) * 2003-09-29 2005-04-14 Axalto Sa Method and apparatus for secure networking between a resource-constrained device and a remote network node
CN101394401A (en) * 2002-05-17 2009-03-25 西蒙公司 System and method for provisioning universal stateless digital and computing services
CN103957233A (en) * 2014-03-26 2014-07-30 哈尔滨工业大学 Real-time communication platform based on processor nucleus dividing and virtual machine

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018035804A1 (en) * 2016-08-25 2018-03-01 华为技术有限公司 Dial testing method, dial testing system, and compute node
CN107018444B (en) * 2017-05-08 2019-12-20 无锡职业技术学院 Method for acquiring clear stream of telecommunication head end based on PPPoE dial-up access
CN108471369B (en) * 2018-06-27 2021-01-15 深圳创维数字技术有限公司 Network dialing method, device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394401A (en) * 2002-05-17 2009-03-25 西蒙公司 System and method for provisioning universal stateless digital and computing services
WO2005034052A1 (en) * 2003-09-29 2005-04-14 Axalto Sa Method and apparatus for secure networking between a resource-constrained device and a remote network node
CN103957233A (en) * 2014-03-26 2014-07-30 哈尔滨工业大学 Real-time communication platform based on processor nucleus dividing and virtual machine

Also Published As

Publication number Publication date
CN112583656A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CA3122265C (en) Maintaining continuous network service
US7428690B2 (en) Packet communication apparatus
US11800587B2 (en) Method for establishing subflow of multipath connection, apparatus, and system
CN113419812B (en) Port forwarding test method, device, equipment and medium in virtualization environment
CN110177128B (en) Data transmission system and method for establishing VPN connection, terminal and VPN proxy thereof
JP2018514101A (en) Data transmission method, apparatus, and system
CN112838966A (en) UDP link monitoring method and system and electronic equipment
US10367894B2 (en) Information processing apparatus, method for controlling the same, non-transitory computer-readable storage medium, and information processing system
WO2021134446A1 (en) Information processing method, communication device and communication system
EP4131884A1 (en) Vxlan access authentication method and vtep device
CN109587028B (en) Method and device for controlling flow of client
CN112583656B (en) Debugging method and device based on LWIP user mode PPP communication function
CN114697387A (en) Data packet transmission method, device and storage medium
TWI551100B (en) Method, server and apparatus for p2p connection
CN114697269A (en) Data communication method, apparatus, device and medium
Cisco Configuring SLIP and PPP
Cisco Configuring SLIP and PPP
CN115225652A (en) Method and system for determining edge service platform, electronic equipment and storage medium
CN116418863B (en) Communication method and device based on socks5 transparent proxy
WO2022127663A1 (en) Wireless broadband router, message processing method and apparatus, and domain name resolution method and apparatus
CN115037664B (en) Network connection testing method and device, repeater and storage medium
US20240073083A1 (en) Network device, control method, and storage medium
CN116319459A (en) Time delay detection method and related equipment
CN116389555A (en) Method, device, equipment and medium for providing service for terminal in local area network
CN115914425A (en) Network bridge transparent proxy method, device, storage medium and equipment

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
GR01 Patent grant
GR01 Patent grant