Debugging method of communication module and communication module

By creating a client application within the communication module and using the AT port to transmit debugging data to the server, the problem of hardware serial port dependency is solved, enabling highly applicable debugging of the wireless communication module and online editing of file data.

CN116455955BActive Publication Date: 2026-06-05FIBOCOM WIRELESS SOFTWARE INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FIBOCOM WIRELESS SOFTWARE INC
Filing Date
2023-04-23
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing communication modules rely on hardware serial ports during debugging, which limits the applicability of debugging methods, especially since wireless communication modules cannot bring out hardware serial ports.

Method used

A client application is created inside the communication module to transmit debugging data with the server via the AT port, enabling the transmission of debugging commands and results, eliminating the dependence on the hardware serial port, and using the data pass-through mode of the AT port to transmit debugging data.

Benefits of technology

It enables communication module debugging without relying on hardware serial ports, improving the applicability of the debugging method and supporting online viewing and editing of module file data, thus enhancing the convenience of debugging and the scope of functional coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116455955B_ABST
    Figure CN116455955B_ABST
Patent Text Reader

Abstract

The application provides a debugging method of a communication module and the communication module. The communication module comprises an AT port and a server. The AT port is a port for receiving an external control command. The server is used for processing a debugging command. The debugging command is a command required for debugging the communication module. The method comprises the following steps: the communication module creates a client application corresponding to the server. The client application is used for establishing communication between the AT port and the server. The communication module receives the debugging command through the AT port and sends the debugging command to the server through the client application. The communication module executes a debugging task corresponding to the debugging command through the server and sends a debugging result of the server to the AT port through the client application. Thus, the AT port, the server in the communication module and the client application are used for debugging the communication module, and the applicability of the debugging method of the communication module is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and in particular to a debugging method for a communication module and a communication module. Background Technology

[0002] As an essential component of the Internet of Things (IoT), communication modules must address the issues of data debugging and positioning.

[0003] Generally, if the communication module exposes a hardware serial port, the host computer can connect to this hardware serial port via a corresponding serial cable and access the system command line through the UART debugger for related debugging. However, this debugging method requires the communication module to expose a hardware serial port, and due to limited pin resources, most wireless communication modules do not expose a hardware serial port, thus the applicability of this debugging method needs improvement.

[0004] Therefore, how to provide a debugging method for communication modules that can eliminate the dependence on hardware serial ports and improve the applicability of debugging methods has become an important research topic in the field. Summary of the Invention

[0005] In a first aspect, this application provides a debugging method for a communication module, applied to a communication module comprising an AT port and a server. The AT port is a port for receiving external control commands, and the server is used to process debugging commands, which are commands required to debug the communication module. The method includes: the communication module creating a client application corresponding to the server, the client application being used to establish communication between the AT port and the server; the communication module receiving debugging commands through the AT port and sending the debugging commands to the server through the client application; the communication module executing a debugging task corresponding to the debugging commands through the server and sending the debugging results of the server to the AT port through the client application.

[0006] The debugging method for the communication module provided in this application involves creating a client application within the communication module that connects to a server. Based on this client application, debugging data (including debugging commands and results) is transmitted between the AT port and the server, thus enabling debugging of the communication module. This can also be understood as using the AT port to log into the server inside the communication module for system debugging. This debugging method eliminates the reliance on hardware serial ports for debugging the communication module. Furthermore, since communication modules are generally equipped with AT ports, this improves the applicability of the debugging method.

[0007] In one possible implementation, before the communication module receives the debugging command based on the AT port, the method further includes: the communication module configuring the AT port's operating mode to a data pass-through mode, wherein the AT port is used to receive and send data without parsing the data as AT commands; sending the debugging command to the server through the client application includes: sending the debugging command to the client application through the data pass-through mode of the AT port, and then sending the debugging command to the server through the client application; sending the server's debugging result to the AT port through the client application includes: sending the debugging result to the client application through the server, and then sending the debugging result to the AT port through the client application.

[0008] In one possible implementation, before the communication module creates a client application corresponding to the server, the method further includes: the communication module receiving a preset AT command through the AT port, the preset AT command indicating that the user needs to debug the communication module; the communication module configuring the working mode of the AT port to a data pass-through mode, including: in response to the preset AT command, the communication module configuring the working mode of the AT port to a data pass-through mode; the communication module creating a client application corresponding to the server, including: in response to the preset command, the communication module creating the client application.

[0009] Understandably, after receiving the preset AT command, configuring the AT port's working mode to data pass-through mode allows for debugging of the communication module without affecting the normal use of the AT port.

[0010] In one possible implementation, before the communication module receives the debugging command through the AT port, the method further includes: in response to the preset instruction, the communication module runs an application corresponding to the server; the communication module executes a debugging task corresponding to the debugging command through the server, including: the communication module receives the debugging command through the application and executes a debugging task related to the debugging command through the application.

[0011] Understandably, starting the application corresponding to the server and creating the client application corresponding to the server after receiving the preset AT command, that is, starting the relevant application when debugging the communication module is required, can improve the applicability of the debugging method and further reduce performance loss.

[0012] In one possible implementation, the method further includes: the communication module detecting whether target data is stored in a preset storage path, wherein the target data stored in the preset storage path indicates that the user expects to end the debugging of the communication module; if the target data is stored in the preset storage path, the communication module switches the data pass-through mode of the AT port to the command mode, wherein the AT port is used to receive and parse AT commands in the command mode.

[0013] In one possible implementation, the method further includes: when the target data is stored in the preset storage path, the communication module stops running the server-related application and deletes the processes related to the aforementioned client application.

[0014] Understandably, if the user wishes to end the debugging of the communication module, configuring the AT port to data pass-through mode allows for debugging of the communication module using the AT port, improving the applicability of the debugging method, without affecting the normal use of the AT port. Furthermore, stopping the running of server-related applications and processes other than the aforementioned client applications when the user wishes to end the debugging of the communication module can further reduce performance overhead.

[0015] In one possible implementation, the target data is file data corresponding to a preset file name, and the method further includes: when the server receives a first configuration command, the communication module creates file data corresponding to the preset file name in the preset storage path based on the first configuration command, wherein the first configuration command is used to indicate that the user expects to end the debugging of the communication module.

[0016] In this application, the server described above can be used not only to process debugging commands, but also to process configuration commands, which refer to configuration commands corresponding to viewing and editing file data in the communication module.

[0017] The debugging method provided in this application, upon determining that file data corresponding to a preset file name is stored in the preset storage path, determines that the user intends to end the current debugging. The configuration commands used are based on the server's existing protocol content and functional support, without requiring modification to the server's existing protocol content and functions. For example, it does not require adding a debugging command to end debugging or adding software logic such as 'exiting the AT port data pass-through mode after the server receives the debugging command to end debugging through the AT port and the client application'. The implementation of the end-debugging function does not depend on the communication module developer's definition of the server's protocol content and functions, further improving the applicability of the debugging method.

[0018] In one possible implementation, after the communication module switches the data pass-through mode of the AT port to command mode, stops running server-related applications, and deletes the processes related to the aforementioned client applications, the method further includes: deleting file data corresponding to a preset file name under the preset storage path. This can also be understood as deleting the file data generated during this debugging process and resetting the device state after the current debugging work is completed, thus ensuring the correct operation of the next debugging task.

[0019] In one possible implementation, the debugging method for the communication module provided in this application can also receive requests from the host computer for online querying, editing, and saving of files within the communication module, based on the AT port, the client application, and the server. Specifically, the client application receives a second configuration command based on the data pass-through mode of the AT port and sends the second configuration command to the server. The server responds to the second configuration command by executing tasks related to the second configuration command, which is a command related to querying, editing, or saving files within the module.

[0020] The debugging method provided in this application, based on the data pass-through mode of the AT port and the client application, can send all debugging commands supported by the communication module to the server, eliminating any limitation on debugging functionality. Furthermore, configuration commands can also be sent to the server through the AT port and the client application, enabling online viewing or editing of file data within the communication module. The debugging method supports a wide range of functions, further addressing the convenience of viewing and editing file data within the communication module. For example, users can use the debugging method provided in this application to locate the source of a problem in the communication module. If the source of the problem can be resolved by editing file data, users can also use the debugging method provided in this application, based on the aforementioned AT port, client application, and server, to resolve the source of the problem by online viewing and editing of file data, further facilitating the debugging and troubleshooting work of engineers.

[0021] In one possible implementation, the server communicates with the client application based on the telnet protocol, and the debugging commands are shell script commands.

[0022] In one possible implementation, after the communication module switches the working module of the AT port from the data pass-through mode to the command mode, the method further includes: the communication module receiving a second debugging command through the AT port; if the second debugging command does not meet the format of the AT command, the communication module does not respond to the second debugging command.

[0023] Secondly, this application provides a communication module, which includes an AT port and a server module. The AT port is a port for receiving external control commands, and the server module is an application for processing debugging commands. The debugging commands are commands used to debug the communication module. The communication module further includes: a creation unit for creating a client application corresponding to the server module, the client application being used to establish communication between the AT port and the server module; a communication unit for receiving debugging commands through the AT port and sending the debugging commands to the server module through the client application; and a processing unit for executing debugging tasks corresponding to the debugging commands through the server module and sending the debugging results of the server module to the AT port through the client application.

[0024] Thirdly, this application provides an electronic device, including: a memory and a processor, wherein the memory stores program instructions; when the program instructions are executed by the processor, the processor performs the method described in the first aspect and any possible implementation thereof.

[0025] Fourthly, embodiments of this application provide a chip system applied to an electronic device. The chip system includes one or more processors, which are configured to invoke computer instructions to cause the electronic device to perform the method shown in the first aspect or any possible implementation thereof.

[0026] Fifthly, this application provides a computer-readable storage medium storing a computer program; when the computer program is run on one or more processors, it causes the electronic device to perform the method described in the first aspect and any possible implementation thereof.

[0027] In a sixth aspect, this application provides a computer program product containing instructions that, when run on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation thereof.

[0028] It is understood that the communication module provided in the second aspect, the electronic device provided in the third aspect, the chip system provided in the fourth aspect, the computer storage medium provided in the fifth aspect, and the computer program product provided in the sixth aspect are all used to execute the method shown in the first aspect or any implementation thereof of the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below.

[0030] Figure 1 A flowchart illustrating a debugging method for a communication module provided in an embodiment of this application;

[0031] Figure 2 A schematic diagram illustrating the communication relationship between an external device and the AT port, client application, and server in a communication module, provided for this application;

[0032] Figure 3 A flowchart illustrating another debugging method for a communication module provided in an embodiment of this application;

[0033] Figure 4 This is a schematic diagram of the structure of a communication module provided in an embodiment of this application;

[0034] Figure 5 This is a schematic diagram of the structure of another communication module provided in an embodiment of this application;

[0035] Figure 6 This is a schematic diagram of the structure of another communication module provided in an embodiment of this application. Detailed Implementation

[0036] The present application will now be described in further detail with reference to the accompanying drawings.

[0037] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise.

[0038] In this application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items. For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c".

[0039] The following combination Figure 1This application describes a debugging method for a communication module provided in its embodiments. For example... Figure 1 As shown, the method includes:

[0040] S101, the communication module creates a client application corresponding to the server.

[0041] In this embodiment, the communication module includes an AT port and a server.

[0042] The AT port is used to receive external control commands. In this application, the AT port can be a hardware port included in the serial bus of the communication module, for example, the AT port can be a hardware port in a universal serial bus (USB).

[0043] In this embodiment, the server is used to process debugging commands, which are commands required to debug the communication module. For example, the server may be a software module for processing debugging commands or a combination of such a software module and related hardware. The server can access the operating system command line in the communication module, and based on this command line, can receive debugging commands and execute tasks related to those commands to obtain debugging results.

[0044] Understandably, if a program executing the debugging method of the communication module of this application wants to communicate with the aforementioned server and use the related functions provided by the server (such as sending debugging commands to the aforementioned server and obtaining the debugging results obtained after the server executes the debugging commands), it needs to create the aforementioned client application corresponding to the server. This client application is the client corresponding to the server in the protocol communication. The server and the client application can communicate via the TCP protocol. For example, the server and the client application communicate via the telnet protocol within the TCP protocol. Accordingly, the server can be called a telnet server, and the client application can be called a telnet client application or simply a telnet client; this document does not impose any limitations on this.

[0045] S102, the communication module receives debugging commands through the AT port and sends the debugging commands to the server through the aforementioned client application.

[0046] In this embodiment, the AT port operates in a data pass-through mode. In this mode, the AT port is used to receive and send data without parsing the data as AT commands. Specifically, the AT port only serves as a data transmission port for receiving data input from external devices and sending data to external devices. It does not process the received data as AT commands, parse the data, or make any decision-making responses to the data. For example, the data (also called external control commands) can be debugging commands or configuration commands. Debugging commands refer to shell commands used when debugging the communication module, and configuration commands refer to shell commands used to view or edit file data in the communication module.

[0047] S103, the communication module executes the debugging task corresponding to the debugging command through the above-mentioned server, and sends the debugging result of the server to the above-mentioned AT port through the client application.

[0048] Specifically, the server calls the operating system command line in the communication module and runs the debugging task related to the debugging command based on the operating system command line to obtain the above debugging results.

[0049] For example, the communication relationships between the aforementioned external devices, communication modules, AT ports, client applications, and servers are as follows: Figure 2 As shown, the external device is a device that has established a wired connection with the communication module through the AT port. This external device can also be understood as a host computer.

[0050] exist Figure 2 In this configuration, the AT port is used to establish communication between the external device and the aforementioned client application, while the client application is used to establish communication between the AT port and the server. For example, after receiving a first debugging command from the external device, the AT port, based on its data pass-through mode, forwards the first debugging command to the client application. Alternatively, the client application can be understood as receiving the first debugging command based on the AT port's data pass-through mode. Upon receiving the first debugging command, the client application sends it to the aforementioned server. Upon receiving the first debugging command, the server executes the operating system command line, performs the debugging task related to the first debugging command, obtains the debugging result, and sends the result to the client application. Upon receiving the debugging result, the client application sends it to the aforementioned AT port, which then forwards the result to the aforementioned external device based on its data pass-through mode. This can also be understood as the client application sending the debugging result to the aforementioned external device based on the AT port's data pass-through mode.

[0051] In some other debugging methods for communication modules, the host computer can connect to the hardware serial port in the communication module through a corresponding serial cable, and access the system command line through the hardware serial port based on the UART debugger for related debugging.

[0052] Alternatively, in some other debugging methods for communication modules, a telnet client application can be created on the host computer to connect to the telnet server in the communication module via the hardware serial port or Ethernet port on the communication module for relevant testing.

[0053] However, these debugging methods rely on the communication module bringing out a hardware serial port or Ethernet port. Due to limited pin resources, most wireless communication modules do not bring out hardware serial ports and Ethernet ports, resulting in poor applicability of the debugging methods.

[0054] Alternatively, in other debugging methods for communication modules, if the communication module includes an Android debug bridge (ADB) port and supports ADB debugging, the host computer can also debug the communication module by installing the ADB driver and related applications, and through the ADB port in the communication module. However, this method requires the host computer to be compatible with the ADB driver and related applications. If the host computer is not compatible with the ADB driver and related applications, debugging is not possible, which also presents certain limitations.

[0055] However, the debugging method for the communication module provided in this application involves creating a telnet client application within the communication module. Based on this telnet client application, debugging data (including debugging commands and debugging results) is transmitted between the AT port and the telnet server, thus enabling debugging of the communication module. This can also be understood as using the AT port to log into the telnet server inside the communication module to perform related debugging on the communication module's operating system and / or applications. This debugging method eliminates the dependence on hardware serial ports for debugging the communication module. Furthermore, communication modules are generally equipped with AT ports, meaning the debugging method has strong applicability.

[0056] In one possible implementation, the debugging method for the communication module provided in this application can also receive requests from the host computer for online querying, editing, and saving of files within the communication module, based on the AT port, the client application, and the server. Specifically, the client application receives a second configuration command based on the data pass-through mode of the AT port and sends the second configuration command to the server. The server responds to the second configuration command by executing tasks related to the second configuration command, which is a command related to querying, editing, or saving files within the module.

[0057] For example, the host computer sends a configuration command A to the server via the AT port and client application to view (obtain) document data. In response to configuration command A, the server sends the corresponding document data back to the host computer via the client application and AT port. Then, the host computer sends a configuration command B to the server via the AT port and client application to edit (modify) and save the document data. In response to configuration command B, the server returns an agreement to the editing and updates the old document data accordingly based on the edited document data sent by the host computer via the AT port and client application. For instance, if the host computer finds vulnerable file data in the communication module via the AT port, telnet client application, telnet server, and the aforementioned debugging commands, it can directly send the corresponding view or edit command to the server via the AT port and client application to edit the vulnerable file data online.

[0058] In other communication module debugging methods, AT commands contain instructions that correspond one-to-one with debugging commands. For example, AT command 'a' represents debugging command 'a' (hereinafter, for ease of description, these AT commands will be referred to as debugging-type AT commands). The host computer can also debug the communication module by sending these debugging-type AT commands to the AT port. However, this method has two drawbacks. First, the correspondence between AT commands and debugging commands is incomplete; that is, debugging-type AT commands cannot completely cover debugging commands, thus limiting the debugging function. Second, this AT port cannot recognize configuration commands, and file data cannot be viewed or edited online through this AT port.

[0059] However, using the debugging method for the communication module provided in this application, based on the data pass-through mode of the AT port and the aforementioned client application, debugging commands can be sent to the server, and there is no issue of limited debugging functionality. Furthermore, configuration commands can also be sent to the server through the AT port and the aforementioned client application, enabling online viewing or editing of file data within the communication module. The debugging method supports a wide range of functions, further resolving the issue of convenience in viewing and editing file data within the communication module.

[0060] In some possible implementations, the AT port typically operates in two modes: data pass-through mode and normal command mode. The following combines these modes... Figure 3 Describe how to trigger the execution of the debugging method of the communication module provided in this application when the AT port's default operating mode is command mode. Figure 3 As shown, the method includes:

[0061] S301, when the AT port is in command mode, the communication module receives preset AT commands through the AT port.

[0062] In this embodiment, the communication module includes an AT port and a server. The AT port is used to receive external control commands. Specifically, when the AT port is in command mode, it receives and parses AT commands and executes related control tasks based on these commands. When the AT port is in data pass-through mode, it passes received data to a designated unit or device. The server is an application program for processing debug commands, which are shell commands used to debug the communication module.

[0063] In this embodiment, the preset AT command is a newly added AT command indicating that the user needs to debug the communication module, or it can be understood as an AT command indicating that the debugging method of the communication module provided in this application needs to be executed. The preset AT command conforms to the general data format of AT commands. For example, the preset AT command is an AT command input by the user through a host computer (the host computer refers to an external device connected to the communication module through an AT port), such as the 'AT+GTSHELLOPEN' command.

[0064] S302, in response to the preset AT command, the communication module configures the AT port to the data pass-through mode, starts the application corresponding to the server, and creates the client application corresponding to the server.

[0065] For example, when the AT port is in command mode, after the communication module receives a preset AT command through the AT port, it triggers the execution of the target program, which is the program corresponding to the debugging method of the communication module provided in this application. In response to the preset AT command, the target program configures the AT port's operating mode to data pass-through mode, starts and runs the application corresponding to the server, and creates a client application corresponding to the server.

[0066] In this embodiment, the client application is used to establish communication between the AT port and the server, and the AT port is used to establish communication between the external device and the client application. The specific communication relationship can be found in [reference needed]. Figure 2 This will not be elaborated upon here.

[0067] In this embodiment, the server and client application can communicate via the TCP protocol. For details, please refer to the relevant description in S101 above, which will not be elaborated upon here.

[0068] S303, the communication module receives debugging commands through the AT port and sends the debugging commands to the server through the client application; and the communication module executes the debugging task corresponding to the debugging command through the server and sends the server's debugging results to the AT port through the client application.

[0069] For example, after configuring the AT port's operating mode to data pass-through mode, the communication module sets the receiving entity that receives data input from the AT port as the aforementioned client application. Specifically, after configuring the AT port's operating mode to data pass-through mode, the target program sets the receiving entity as the aforementioned client application. Thus, the client application can receive debugging commands based on the AT port's data pass-through mode, send debugging commands to the server, and send the server's debugging results to external devices based on the AT port's data pass-through mode. Further details can be found in the descriptions of steps S102 and S103 above, which will not be elaborated upon here.

[0070] S304, the communication module receives the first configuration command through the aforementioned AT port, client application, and server, and creates file data corresponding to the preset file name in the preset storage path based on the first configuration command.

[0071] In this embodiment, the server can be used not only to process debugging commands but also to process configuration commands for viewing and / or editing file data in the communication module. In some interpretations, the configuration command may also be included within the debugging command. For example, if the protocol content related to the debugging command already includes debugging commands for viewing and / or editing file data in the communication module, then the aforementioned configuration command can also be understood as a debugging command, depending on the specific design.

[0072] For example, the first configuration command described above is a shell script command that creates file data corresponding to a preset file name under a preset storage path. This file data can be document data, image data, audio / video data, etc., and this document does not limit its scope. For example, the preset storage path is ' / tmp', and the preset file name is 'exit_at_telent'.

[0073] S305, the communication module periodically checks whether there is file data corresponding to the preset file name stored in the preset storage path. If so, the communication module switches the AT port working mode from data pass-through mode to command mode, and stops running the application corresponding to the server and the application corresponding to the client.

[0074] In this embodiment, a preset storage path stores file data corresponding to a preset file name to indicate that the user expects to end the debugging of the communication module.

[0075] For example, the communication module includes a first thread and a second thread. In the first thread, the client application and the server process the data received from the AT port (including the aforementioned first debugging command and / or the aforementioned first configuration command). The second thread is used to periodically check whether file data corresponding to the preset file name is stored in the aforementioned preset storage path. If so, the AT port working mode is switched from data pass-through mode to command mode, and the application corresponding to the aforementioned server and the application corresponding to the aforementioned client application are stopped from running.

[0076] For example, after receiving the first configuration command, the first thread in the communication module creates file data corresponding to a preset file name in a preset storage path based on the first configuration command. After the file data corresponding to the preset file name is created, the second thread detects that the file data is stored in the preset storage path, switches the AT port working mode from data pass-through mode to command mode, and stops running the application corresponding to the server and the application corresponding to the client.

[0077] Generally, in command mode, the AT port is only used to process data that conforms to the AT command format. If the data input to the AT port does not belong to the AT command, the AT port will not process or respond to the data. For example, if the AT port inputs the above-mentioned debugging command or the above-mentioned first configuration command, the communication module will not respond. That is to say, the debugging of the communication module ends. If the debugging of the communication module needs to be initiated again, the above-mentioned preset AT command needs to be input through the AT port.

[0078] In this embodiment of the application, the step S305 above, 'the communication module periodically detects whether there is file data corresponding to the preset file name stored under the preset storage path', can be executed in any step after S302, or it can be executed together with S302.

[0079] In one possible implementation, the debugging method for the communication module provided in this application can also receive requests from the host computer to query, edit, and save internal files of the communication module online, based on the AT port, client application, and server. For details, please refer to the relevant descriptions in other embodiments herein, which will not be elaborated upon here.

[0080] In some other possible implementations, the aforementioned preset storage path stores identification information, and the aforementioned first configuration command can also be a shell command used to configure the value of the identification information in the preset storage path. Accordingly, S304 can be replaced with: "The communication module receives the first configuration command through the aforementioned AT port, client application, and server, and sets the identification information stored in the preset storage path as the target identifier based on the first configuration command." S305 can be replaced with: "The communication module periodically checks whether the identification information stored in the aforementioned preset storage path is the target identifier. If so, the communication module switches the AT port working mode from data pass-through mode to command mode, and stops running the application corresponding to the aforementioned server and the application corresponding to the aforementioned client application."

[0081] In this application, the communication module can be a wireless communication module. The wireless communication module can be a communication module in the whole machine (e.g., the whole machine is a terminal device, computer or other electronic device), or it can be a communication module independent of the whole machine. This article does not limit it.

[0082] The following combination Figure 4 This invention provides a schematic diagram of the structure of a communication module according to an embodiment of the invention.

[0083] like Figure 4 As shown, the communication module may include an AT port 401 and a server module 402, which is an application program for processing debugging commands. Additionally, the communication module also includes:

[0084] The first creation unit 403 is used to create a client application corresponding to the server module 402. The client application is used to establish communication between the AT port and the server module 402.

[0085] The communication unit 404 is used to receive debugging commands through the AT port and send the debugging commands to the server module 402 through the client application;

[0086] The processing unit 405 is used to execute the debugging task corresponding to the debugging command through the server module 402, and send the debugging result of the server module 402 to the AT port through the client application.

[0087] In one possible implementation, such as Figure 5As shown, the communication module further includes a configuration unit 406, which is used to configure the AT port's operating mode to a data pass-through mode. The communication unit 404 is specifically used to send debugging commands to the client application via the AT port in data pass-through mode, and to send the debugging commands to the server module 402 after the client application receives the debugging commands. The processing unit 405 is specifically used to send debugging results to the client application via the server module 402, and after the client application receives the debugging results, to send the debugging results back to the AT port.

[0088] In one possible implementation, the communication unit 404 is further configured to receive a preset AT command via the AT port. The configuration unit 406 is specifically configured, in response to the preset AT command, to configure the AT port's operating mode to a data pass-through mode. The first creation unit 403 is specifically configured, in response to the preset command, to create a client application using the communication module.

[0089] In one possible implementation, the processing unit 405 is further configured to respond to a preset instruction, run an application corresponding to the server module 402, receive debugging commands through the application, and perform debugging tasks related to the debugging commands through the application.

[0090] In one possible implementation, the communication module further includes a detection unit 407, used to detect whether target data is stored in a preset storage path. The configuration unit 406 is also used to switch the data pass-through mode of the AT port to command mode when target data is stored in the preset storage path.

[0091] In one possible implementation, the communication module further includes a second creation unit 408, which is used to create file data corresponding to a preset file name in a preset storage path based on the first configuration command.

[0092] Explanations of terms such as AT port, server, client application, debugging command, data pass-through mode, AT command, target data, and first configuration command can be found in the relevant descriptions in the above method embodiments, and will not be elaborated here.

[0093] It should be noted that the specific execution process can be found in [link to relevant documentation]. Figure 1 or Figure 3 The specific details of the embodiments shown are not elaborated here.

[0094] Understandably, the above Figure 4 or Figure 5 The communication module shown can come in various product forms. For example, the communication module can also be as follows: Figure 6The communication module shown includes a processor, communication interface, memory, and communication bus. The communication bus includes an AT port. The software program within this communication module contains an application program corresponding to the server. The processor can execute the functions required by the server based on this application program. Specifically, as shown... Figure 6 As shown, the communication module 60 may include:

[0095] The system includes at least one processor 601, such as a CPU, at least one communication interface 603, a memory 604, and at least one communication bus 602. The communication bus 602 is used to enable communication between these components. The communication interface 603 may optionally include a standard wired interface, a wireless interface (such as a Wi-Fi interface or a Bluetooth interface), etc. The memory 604 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 604 may also be at least one storage device located remotely from the aforementioned processor 601. Figure 6 As shown, the memory 604, which serves as a computer storage medium, may include an operating system and program instructions.

[0096] For example, processor 601 can be used to implement the above. Figure 6 The steps or methods executed by the first creation unit 403, communication unit 404, processing unit 405, configuration unit 406, detection unit 407, and second creation unit 408.

[0097] Understandably, the above method is merely an example, and it can also be executed by the processor 601 and other modules in the aforementioned communication module 60. Figure 6 The steps or methods executed by the first creation unit 403, communication unit 404, processing unit 405, configuration unit 406, detection unit 407, and second creation unit 408 are not limited herein.

[0098] exist Figure 6 In the communication module 60 shown, the processor 601 can be used to load program instructions stored in the memory 604 and specifically perform the following operations:

[0099] Create a client application corresponding to the server;

[0100] Receive debugging commands via the AT port and send them to the server via the client application;

[0101] The server executes the debugging task corresponding to the debugging command, and sends the server's debugging results to the AT port through the client application.

[0102] Explanations of terms such as AT port, server, client application, debugging command, data pass-through mode, AT command, target data, and first configuration command can be found in the relevant descriptions in the above method embodiments, and will not be elaborated here.

[0103] It should be noted that the specific execution process can be found in [link to relevant documentation]. Figure 1 or Figure 3 The specific details of the embodiments shown are not elaborated here.

[0104] This invention also provides a computer storage medium that can store multiple instructions adapted for loading and execution by a processor as described above. Figures 1 to 3 The method steps of the illustrated embodiment can be found in the detailed execution process. Figures 1 to 3 The specific details of the illustrated embodiments will not be elaborated here.

[0105] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0106] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0107] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A debugging method for a communication module, characterized in that, The method is applied to a communication module, which includes an AT port and a server. The AT port is used to receive external control commands, and the server is used to process debugging commands, which are commands used to debug the communication module. The communication module creates a client application corresponding to the server within the communication module. The client application is used to establish communication between the AT port and the server. The AT port operates in a data pass-through mode and is used to establish communication between external devices and the client application. The communication module receives debugging commands from external devices through the AT port and sends the debugging commands to the server through the client application. The communication module executes the debugging task corresponding to the debugging command through the server, and sends the debugging result of the server to the AT port through the client application; based on the data pass-through mode of the AT port, the debugging result is sent to the external device.

2. The method according to claim 1, characterized in that, Before the communication module receives debugging commands based on the AT port, the method further includes: The communication module configures the AT port to a data pass-through mode. In the data pass-through mode, the AT port is used to receive and send data and does not parse the data as AT commands. Sending the debugging command to the server through the client application includes: The debugging command is sent to the client application through the data pass-through mode of the AT port, and then sent to the server through the client application. Sending the debugging results of the server to the AT port through the client application includes: The server sends the debugging results to the client application, and the client application sends the debugging results to the AT port.

3. The method according to claim 2, characterized in that, Before the communication module creates a client application corresponding to the server, the method further includes: The communication module receives preset AT commands through the AT port. The preset AT commands are used to indicate that the user needs to debug the communication module. The communication module configures the AT port to a data pass-through mode, including: In response to the preset AT command, the communication module configures the working mode of the AT port to data pass-through mode; The communication module creates a client application corresponding to the server, including: In response to the preset instruction, the communication module creates the client application.

4. The method according to claim 3, characterized in that, Before the communication module receives debugging commands through the AT port, the method further includes: In response to the preset instruction, the communication module runs the application corresponding to the server; The communication module executes the debugging task corresponding to the debugging command through the server, including: The communication module receives the debugging command through the application and executes the debugging task related to the debugging command through the application.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: The communication module detects whether target data is stored in a preset storage path. The presence of target data in the preset storage path indicates that the user wishes to end the debugging of the communication module. When the target data is stored in the preset storage path, the communication module switches the data pass-through mode of the AT port to the command mode. In the command mode, the AT port is used to receive and parse AT commands.

6. The method according to claim 5, characterized in that, The target data is file data corresponding to a preset file name, and the method further includes: When the server receives the first configuration command, the communication module creates file data corresponding to the preset file name in the preset storage path based on the first configuration command. The first configuration command is used to indicate that the user expects to end the debugging of the communication module.

7. The method according to claims 1-6, characterized in that, The server communicates with the client application based on the telnet communication protocol, and the debugging commands are shell script commands.

8. A communication module, characterized in that, The communication module includes an AT port and a server module. The AT port is used to receive external control commands, and the server module is an application program used to process debugging commands. The debugging commands are used to debug the communication module. The communication module also includes: A creation unit is used to create a client application corresponding to the server module within the communication module. The client application is used to establish communication between the AT port and the server module. The AT port operates in a data pass-through mode and is used to establish communication between external devices and the client application. The communication unit is used to receive debugging commands from external devices through the AT port and send the debugging commands to the server module through the client application; The processing unit is configured to execute the debugging task corresponding to the debugging command through the server module, and send the debugging result of the server module to the AT port through the client application; and send the debugging result to the external device based on the data pass-through mode of the AT port.

9. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores program instructions; when the program instructions are executed by the processor, the processor performs the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program; when the computer program is run on one or more processors, it performs the method as described in any one of claims 1-8.