Network port simulation serial port debugging method and system
By using the network port simulated serial port debugging method in embedded network devices, the problems of cumbersome use of serial ports and waste of resources are solved, and the debugging information input and output of embedded network devices are realized, simplifying the debugging process and ensuring information integrity.
Patent Information
- Application Number
- CN202411135509.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-13
AI Technical Summary
Embedded network communication equipment has low frequency of serial port use after production, resulting in equipment simplicity and cost savings. However, serial port-related circuits are no longer assembled, and serial port debugging is cumbersome and CPU pin resources are wasted.
Through the network port simulation of the serial port debugging method, the server stores the console output information during the kernel startup stage, and pushes or backups this information according to the client's connection request, realizing the input and output of the debugging information, avoiding serial cable redundancy and resource waste.
It realizes the input and output of debugging information on devices without external serial ports, solves the problems of cumbersome use of serial ports and waste of resources, ensures the integrity and real-timeness of debugging information, and simplifies the debugging process.
Smart Images

Figure CN119135766A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of communication equipment, and in particular to a method and system for debugging a network port simulating a serial port. Background Art
[0002] In the prior art, for embedded network communication devices, serial ports are usually widely present as local console output devices in these communication devices. They undertake most of the debugging information display tasks in the early stage of product development, but after the mass production of products, there are few opportunities to use them. Therefore, for the simplicity of the equipment, these mass-produced communication devices will rarely directly externalize the serial ports to the device panel. Some will directly build the serial ports into the cabin. However, for the simplicity of product design and cost saving, more serial port-related circuits of network communication devices are no longer assembled on the circuit board. Therefore, if you want to use a serial port console on such devices without an external serial port, it will inevitably be extremely cumbersome. First, you have to disassemble the casing, and then use a dedicated connection cable to connect it, and even have to prepare additional electronic components for manual soldering operations.
[0003] On the other hand, most CPU chips of embedded communication devices will reuse the functions of CPU pins, so that the CPU pins can be more flexibly configured to specified functions according to needs. However, due to the particularity of the console serial port, the serial port pins used for the console are often reserved for special use. Therefore, in mass products, even if the serial port console function is not used, the pin cannot be used for other functions, which will cause a certain waste of resources and space. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a network port simulation serial port debugging method and system, which can realize the input and output of debugging information by replacing the serial port with the network port.
[0005] In a first aspect, an embodiment of the present application provides a network port simulation serial port debugging method, which is applied to a server, comprising:
[0006] When the server is in the kernel startup phase, the console output information is stored in a preset kernel cache space; wherein the console output information includes the first console output information in the boot phase and the second console output information in the kernel startup phase;
[0007] After the system is started, if a connection request from a client is received, the console output information is pushed to the client or backed up to a preset storage space according to the connection request.
[0008] In some embodiments, when the server is in the kernel startup phase, before storing the console output information in the preset kernel cache space, the method further includes:
[0009] When the server is in the boot phase initialization, a boot phase buffer area is allocated to buffer the first console output information.
[0010] In some embodiments, when the server is in the kernel startup phase, storing the console output information in a preset kernel cache space includes:
[0011] After the server jumps from the boot phase to the kernel startup phase, the cached first console output information is transferred to the kernel cache space, and the second console output information generated in the kernel startup phase is stored after the first console output information.
[0012] In some embodiments, receiving a connection request from a client, and pushing the console output information to the client or storing it in a preset storage space according to the connection request, includes:
[0013] In response to the scan request message from the client, a response message with its own MAC address is fed back to the client;
[0014] The output information storage strategy selected by the client is received, and the console output information is pushed to the client or stored in the preset storage space in a first-in-first-out manner according to the output information storage strategy.
[0015] In some embodiments, during the communication between the server and the client, the process further includes:
[0016] The heartbeat keep-alive message sent by the client is monitored in real time. If the heartbeat keep-alive message is not received within a preset time, or an exit instruction from the client is received, the subsequent console output information is stored in the preset storage space.
[0017] In some embodiments, the scan request message is a scan request message with preset fields.
[0018] In a second aspect, an embodiment of the present application provides a network port simulation serial port debugging method, which is applied to a client, comprising:
[0019] Send a connection request to the server; wherein the connection request is used to instruct the server to push the console output information to the client or back it up to a preset storage space; the console output information includes the first console output information in the boot phase and the second console output information in the kernel startup phase.
[0020] In some embodiments, the connection request is a scan request message;
[0021] The sending of a connection request to the server includes:
[0022] A scan request message is sent to at least one of the servers, and after receiving a response message with its own MAC address from at least one of the servers, at least one of the servers is selected according to the MAC address, and an output information storage strategy is sent to the selected at least one of the servers.
[0023] In some embodiments, if the output information storage strategy is to push the console output information to the client in real time, the client is used to set a preset storage space in the memory for storing the console output information;
[0024] If the output information storage strategy is to back up to a preset storage space, the server is used to set a preset storage space in a memory for storing the console output information.
[0025] In a third aspect, an embodiment of the present application provides a network port simulation serial port debugging system, comprising a server and a client, wherein the server is used to execute the above-mentioned network port simulation serial port debugging method applied to the server; the client is used to execute the above-mentioned network port simulation serial port debugging method applied to the client.
[0026] The embodiments of the present application have the following beneficial effects: the present application caches both the first console output information and the second console output information into the kernel cache space during the kernel startup phase, thereby ensuring that the console output information of the server at any stage is complete. After the server and the client are connected, the server continuously generates the console output information, and according to the output information storage strategy selected by the client, the total console output information and the newly generated console output information are pushed to the client in real time and stored in the client's preset storage space or in the server's preset storage space, so that the console output information can be retrieved at any time when needed. In this way, the present application uses the network port instead of the serial port to realize the input and output of the debugging information (console output information), thereby solving the cable redundancy problem and the problem of no serial port available when using the serial port for debugging in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A first flow chart of the network port simulation serial port debugging method according to an embodiment of the present application is shown;
[0029] Figure 2 A second flow chart of the network port simulation serial port debugging method according to an embodiment of the present application is shown;
[0030] Figure 3 A third flow chart of the network port simulation serial port debugging method according to an embodiment of the present application is shown;
[0031] Figure 4 A structural schematic diagram of the network port simulating serial port debugging system of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0032] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0033] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0034] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0035] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0036] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0037] In the prior art, since the serial ports on embedded network communication devices are rarely used after production, in order to make the embedded communication network devices more concise and save costs, the serial ports are usually set in the cabin, which makes it more cumbersome when the serial ports are used; in addition, since the serial ports are rarely used and the pins where the serial ports of the chip are located cannot be functionally reused, if the serial ports are to be set, it will occupy the space and resources of the device to a certain extent. Based on this, the present application proposes a network port simulation serial port debugging method and system to realize the input and output of debugging information by replacing the serial port with the network port.
[0038] In the process of developing embedded communication network equipment, it is necessary to ensure the reliability, stability and performance of the software through the output debugging information. Specifically, by outputting debugging, when the program has abnormal behavior or crashes, by viewing the output debugging information, it is easier to find the root cause of the problem, such as memory leaks or out-of-bounds access. By finding information such as abnormal conditions, variable values, function call stacks, etc., it is helpful to quickly locate and solve problems; in addition, when gradually adding new functions or modifying existing functions during the development process, output debugging information can provide real-time feedback, so that developers can quickly check the effect of the modification; further, it is also possible to verify whether the code works as expected through the output debugging information, which helps to find potential problems in advance and reduce the workload of later debugging; in addition, by outputting communication information with external devices or modules, it is possible to verify whether the hardware connection is correct and whether it can communicate with external devices correctly; it is also possible to monitor the status of the system in real time through output debugging information; when it is necessary to explain, the above description of output debugging information is exemplary, and it also has some other functions, which will not be repeated here.
[0039] Based on this, in the development process of embedded network devices, it is extremely important to send debugging information to the client and ensure the integrity of the debugging information, and then be able to view the output debugging information in time when needed. The client can be a computer, mobile phone, iPad or other device terminal that can receive and store debugging information.
[0040] The network port simulation serial port debugging method is described below in conjunction with some specific embodiments.
[0041] Figure 1 A schematic diagram of a flow chart of a network port simulation serial port debugging method according to an embodiment of the present application is shown. Exemplarily, the network port simulation serial port debugging method includes the following steps:
[0042] When the server is in the kernel startup phase, the server first executes step S110 to store the console output information into a preset kernel cache space.
[0043] The startup process of an embedded system usually includes the boot phase, kernel boot phase and other startup phases; other startup phases include the app startup phase. The boot phase mainly includes functions such as system initialization, kernel boot and upgrade program, so the console output information of the boot phase will contain information of these key processes, which is indispensable information in the debugging process.
[0044] The console output information includes first console output information in the boot phase and second console output information in the kernel startup phase.
[0045] During the server kernel startup phase, the client has not yet connected to the server, but the server will continue to output console output information during the startup process. Therefore, in order to ensure the integrity of the console output information during the entire startup process, the embodiment of the present application will first store the first console output information and the second console output information in the preset kernel cache space.
[0046] When the client needs to connect to the server, the client executes step S210 to send a connection request to the server.
[0047] The connection request is used to instruct the server to push the console output information to the client or back it up to a preset storage space.
[0048] Then the server executes step S120 to receive a connection request from the client, and pushes the console output information to the client or backs it up to a preset storage space according to the connection request.
[0049] Exemplarily, after the client sends a connection request to the server, after the server receives the connection request from the client, if the client is online, the server can push the console output information stored in the preset kernel cache space to the client; if the client is offline, the server can back up the console output information to its own preset storage space.
[0050] In some embodiments, Figure 2 As shown, before the server executes step S110, it also includes: when the server is in the boot phase initialization, the server also needs to execute step S100 to allocate a boot phase buffer area to cache the first console output information.
[0051] It can be understood that the server sets a boot phase buffer of a preset size during the power-on initialization phase, which is used to cache the console output information of the boot phase before the system management right is transferred (from the boot phase to the kernel startup phase). When allocating the boot phase buffer of the preset size, the appropriate cache space size can be set according to the experience of the developer and the specific system. In this way, on the one hand, it is convenient to transfer the first console output information to the preset kernel cache space in a shared memory manner after the management right is transferred to the kernel startup phase; in addition, a fixed cache area is set, and when the console information space occupancy is about to exceed the cache capacity limit, the old console information is automatically removed, so that the rollback operation can ensure that the total console information space will not overflow, and can avoid affecting the normal operation of other programs.
[0052] In addition, when the first console output information is cached in the boot phase cache area of a preset size, the network interface device is initialized to complete the remaining startup phases and wait for the client to connect. The network interface device is initialized so that the server has at least basic Ethernet layer 2 message sending and receiving capabilities, and the device is configured with a MAC address that can be identified as its own identification.
[0053] When the server is in the kernel startup phase, the server first executes step S110 to store the console output information in the preset kernel cache space. After the system startup of the server is completed, when the client needs to connect to the server, the client executes step S210 to send a connection request to the server. Then the server executes step S120 to receive the connection request from the client, and pushes the console output information to the client or backs it up to the preset storage space according to the connection request.
[0054] Step S110, step S120 and step S210 have been described above and will not be repeated here.
[0055] In some implementations, step S110 specifically includes: after the server jumps from the boot phase to the kernel startup phase, the cached first console output information is passed to the kernel cache space, and the second console output information generated in the kernel startup phase is stored after the first console output information.
[0056] It can be understood that during the startup process of the server, if the management right subject is transferred, that is, after the server jumps from the boot stage to the kernel startup stage, the first console output information is first transferred to the kernel cache space in a shared memory manner or by copying, etc., wherein the kernel cache space can be a cache space set up before, or a kernel cache space newly set up after receiving the management right. The first console output information is first stored in the kernel cache space, and then the newly generated second console output information is appended to the end of the first console output information in the kernel cache space.
[0057] In some embodiments, Figure 3 As shown, step S120 specifically includes:
[0058] Step S121, in response to the scan request message from the client, a response message carrying its own MAC address is fed back to the client.
[0059] Step S122, receiving the output information storage strategy selected by the client, and pushing the console output information to the client or storing it in a preset storage space in a first-in-first-out manner according to the output information storage strategy.
[0060] Exemplarily, when the client needs to connect to the server, the client sends a connection request to the server; wherein the connection request is a scan request message; specifically, the client can send a scan request message containing preset fields to at least one server network port in the form of a broadcast message; after each server receives the scan request message sent by the client, it feeds back a response message with its own MAC address to the client, so that after the client receives the response messages with its own MAC address from multiple servers, it can select at least one server for communication debugging according to the MAC address, that is, in this application, the client can select multiple MAC addresses at the same time and receive debugging information from multiple servers. After the client selects the server by the MAC address, it sends an output information storage strategy to the selected server. In addition, the client sends a scan request message containing preset fields to the server, which can facilitate the server to quickly identify the message.
[0061] Among them, if the output information storage strategy is to push the console output information to the client in real time, the client is used to set a preset storage space in the memory for storing the console output information; if the output information storage strategy is to back up to the preset storage space, the server is used to set a preset storage space in the memory for storing the console output information. It should be noted that when setting a preset storage space on the client or setting a preset storage space on the server, the size of the preset storage space is set according to the experience and needs of the developer. For example, if you need to store 3 days of debugging information or 7 days of debugging information, you can set different storage spaces as needed, which can avoid wasting memory space on the client or server; in addition, a separate preset storage space is set for the console output information (debugging information) to avoid affecting the normal operation of other programs on the client or server.
[0062] After receiving the output information storage strategy selected by the client, the server pushes the console output information to the client or stores it in a preset storage space in a first-in-first-out manner according to the output information storage strategy; in this application, a first-in-first-out method is used to push the console output information, so that the actual console output information order can be restored to ensure the accuracy of debugging.
[0063] It should be noted that pushing to the client can be understood as real-time output, and backing up to the local preset storage space can meet the needs of long-term operation. The console output information can be saved autonomously in offline mode, so that the client can retrieve it from the server when specific conditions are triggered, without having to keep the client online for real-time acquisition. This makes it very convenient to carry out batch debugging of a large number of prototypes.
[0064] In some implementations, during communication between the server and the client, the heartbeat keep-alive message sent by the client is monitored in real time. If no heartbeat keep-alive message is received within a preset time, or an exit command from the client is received, the subsequent console output information is stored in a preset storage space.
[0065] It is understandable that the design of using the network port to transmit serial port output information will bring additional data throughput to the network port. In order to reduce the real-time impact of receiving console output information in the client online mode on the normal operation of the system, this application also sets an offline mode to handle long-term debugging needs. Therefore, in order to distinguish between the client online mode and offline mode, this application uses a heartbeat keep-alive message to ensure the continuity of the online mode.
[0066] Exemplarily, the client and the server use heartbeat keep-alive messages to ensure that the communication process continues during the subsequent communication process until the client actively exits, and the server stops pushing and appends the console output information to the preset storage space of the server again. Specifically, the client can be set to be idle for a first preset time, and then a heartbeat keep-alive message needs to be sent to the server to maintain the connection with the server. If the server does not receive the heartbeat keep-alive message sent by the client within the preset time, the server considers that the client has been disconnected and can automatically switch to offline mode (backed up to the preset storage space). In addition, if the client actively closes the connection message with the server, the client and the server are also disconnected. After the client is disconnected from the server, if the client reconnects to the server, the client reselects the output information storage strategy as needed. By setting different output information storage strategies, the present application can flexibly select the storage place of the console output information for easy management.
[0067] It should be noted that the console output information is a continuously output text data stream. It will continuously output information regardless of online mode or offline mode. Therefore, usually when the client is online, this information is pushed to the client. When the client is offline, this information is cached in the preset storage space of the server so that it can be retrieved the next time the client connects.
[0068] The present application transmits the first console output information to the kernel cache when the boot phase is converted to the kernel startup phase, and then the second console output information generated in the kernel startup phase is also stored in the kernel cache, thereby ensuring the integrity of the console output information in the server startup phase. After the server and the client are connected, the server continues to generate console output information, and according to the output information storage strategy selected by the client, the total console output information and the newly generated console output information are pushed to the client in real time and stored in the client and the preset storage space or stored in the preset storage space of the server, so as to retrieve the console output information at any time when needed. The present application uses the network port instead of the serial port to realize the input and output of the debugging information (console output information) in this way, thereby solving the cable redundancy problem and the problem of no serial port available when the serial port is used for debugging in the prior art. In addition, the console output information of the present application is stored in a cached manner, and is only sent to the client when the client actively obtains it, which can avoid the problem that the console output information is transmitted to the client in real time, occupies a large amount of storage space of the client, and affects the operation of other programs of the client.
[0069] Figure 4 A structural diagram of a network port simulation serial port debugging system of an embodiment of the present application is shown. Exemplarily, the network port simulation serial port debugging system includes: a server 100 and a client 200, wherein the server 100 is used to execute the part of the network port simulation serial port debugging method that needs to be executed by the server 100; the client 200 is used to execute the part of the network port simulation serial port debugging method that needs to be executed by the client 200. The present application realizes tasks such as serial port console debugging information caching, network port data conversion, network port data transmission and reception, and user console information encapsulation and restoration through the cooperation between the server 100 and the client 200.
[0070] It can be understood that the execution process of the server 100 and the client 200 in the system of this embodiment has been described in the above embodiment, so it will not be repeated here.
[0071] In some embodiments, the server and client in the present application both include a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the terminal device to execute the above-mentioned network port simulation serial port debugging method.
[0072] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.
[0073] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.
[0074] The present application also provides a computer-readable storage medium for storing the computer program used in the client or server. For example, the computer-readable storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0075] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0076] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0077] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
[0078] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A network port simulation serial port debugging method, characterized in that: Applied to the server, including: When the server is in the kernel startup phase, the console output information is stored in a preset kernel cache space; wherein the console output information includes the first console output information in the boot phase and the second console output information in the kernel startup phase; After the system is started, if a connection request from a client is received, the console output information is pushed to the client or backed up to a preset storage space according to the connection request.
2. The network port simulation serial port debugging method according to claim 1, characterized in that: When the server is in the kernel startup phase, before storing the console output information in the preset kernel cache space, the method further includes: When the server is in the boot phase initialization, a boot phase buffer area is allocated to buffer the first console output information.
3. The network port simulation serial port debugging method according to claim 2, characterized in that: When the server is in the kernel startup phase, storing the console output information in a preset kernel cache space includes: After the server jumps from the boot phase to the kernel startup phase, the cached first console output information is transferred to the kernel cache space, and the second console output information generated in the kernel startup phase is stored after the first console output information.
4. The network port simulation serial port debugging method according to claim 1, characterized in that: The receiving a connection request from a client and pushing the console output information to the client or storing it in a preset storage space according to the connection request includes: In response to the scan request message from the client, a response message with its own MAC address is fed back to the client; The output information storage strategy selected by the client is received, and the console output information is pushed to the client or stored in the preset storage space in a first-in-first-out manner according to the output information storage strategy.
5. The network port simulation serial port debugging method according to claim 4, characterized in that: The communication process between the server and the client also includes: The heartbeat keep-alive message sent by the client is monitored in real time. If the heartbeat keep-alive message is not received within a preset time, or an exit instruction from the client is received, the subsequent console output information is stored in the preset storage space.
6. The network port simulation serial port debugging method according to claim 4, characterized in that: The scan request message is a scan request message with preset fields.
7. A network port simulation serial port debugging method, characterized in that: Applied to the client, including: Send a connection request to the server; wherein the connection request is used to instruct the server to push the console output information to the client or back it up to a preset storage space; the console output information includes the first console output information in the boot phase and the second console output information in the kernel startup phase.
8. The network port simulation serial port debugging method according to claim 7, characterized in that: The connection request is a scan request message; The sending of a connection request to the server includes: A scan request message is sent to at least one of the servers, and after receiving a response message with its own MAC address from at least one of the servers, at least one of the servers is selected according to the MAC address, and an output information storage strategy is sent to the selected at least one of the servers.
9. The network port simulation serial port debugging method according to claim 7, characterized in that: If the output information storage strategy is to push the console output information to the client in real time, the client is used to set a preset storage space in the memory for storing the console output information; If the output information storage strategy is to back up to a preset storage space, the server is used to set a preset storage space in a memory to store the console output information.
10. A network port simulation serial port debugging system, characterized in that: It comprises a server and a client, wherein the server is used to execute the network port simulation serial port debugging method as described in any one of claims 1-6; the client is used to execute the network port simulation serial port debugging method as described in any one of claims 7-9.
