Data transmission method of single-chip microcomputer
Through the 4G communication module and the PPP data mode and LwIP protocol stack of the cloud server, the problem of low communication efficiency of traditional AT instruction sets is solved, efficient and stable data transmission is achieved, and the needs of large data communication in the Internet of Things is met.
Patent Information
- Application Number
- CN202511073858.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-08-01
AI Technical Summary
In existing Internet of Things terminals, the communication method between traditional microcontrollers and cellular communication modules relies on the AT instruction set, resulting in low communication efficiency and weak fault tolerance, making it difficult to support the data transmission needs of large data volumes or high frequency.
The 4G communication module is used to establish data communication with the cloud server, and runs in coordination with the LwIP protocol stack through point-to-point protocol (PPP) data mode to realize link control, identity authentication and network parameter negotiation. Combined with the exception detection mechanism, the communication status is automatically adjusted to ensure stability and fault tolerance.
It improves the stability and fault tolerance of the communication system, improves the real-time and reliability of data transmission, and meets the communication needs of large data volumes in the Internet of Things scenarios.
Smart Images

Figure CN120583095A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission of a single chip microcomputer, and in particular to a data transmission method of a single chip microcomputer. Background Art
[0002] Currently, if Figure 1 As shown in Figure 1, in existing Internet of Things (IoT) terminals, traditional communication solutions generally use a single-chip microcontroller (such as the STM32, MSP430, or 51 series) in conjunction with a cellular communication module (such as 2G, 4G, or NB-IoT modules) to achieve remote data upload and network access. This type of communication system typically relies on the AT command set for control. That is, the single-chip microcontroller sends AT commands to the communication module via the serial port (UART). The communication module then performs operations such as connection, dialing, and data upload, and then feeds the execution results back to the single-chip microcontroller via the serial port. Although this communication method has the advantages of simple implementation, low power consumption, and wide adaptability, its communication principle relies on serial port interaction and command parsing, and still has the following technical bottlenecks: First, the serial port rate is limited and the communication structure is half-duplex, resulting in low overall communication efficiency and difficulty in supporting large data volume or high-frequency data transmission needs; second, AT command parsing relies on the serial execution logic of the state machine, the information interaction is complex and the fault tolerance is weak. The slightest error may lead to connection interruption or system deadlock.
[0003] Therefore, there is an urgent need for a data transmission method that can break through the AT command communication bottleneck to improve communication efficiency. Summary of the Invention
[0004] In order to solve the problems in the prior art of relying on AT instruction sets for control, which leads to low communication efficiency and complex state management, the present application provides a data transmission method for a single-chip microcomputer.
[0005] A data transmission method for a single-chip microcomputer, which performs data communication with a cloud server by providing a 4G communication module, includes: Checking the communication connection status of the 4G communication module; If the communication connection state is normal, sending a dialing instruction to the 4G communication module, the dialing instruction including at least an access point name parameter, the access point name parameter being used to instruct the 4G communication module to access the target network channel to initiate a point-to-point protocol dialing request; When the 4G communication module switches to the point-to-point protocol data mode based on the received dialing instruction, a point-to-point protocol session is established based on the LwIP protocol stack, wherein the 4G communication module in the point-to-point protocol data mode automatically suspends the AT command parsing mechanism and detects in real time whether it is in an abnormal scenario. If it is in an abnormal scenario, an escape sequence is sent to the 4G communication module to control the 4G communication module to exit the point-to-point protocol data mode and then resume the AT command parsing mechanism; performing a negotiation operation based on the point-to-point protocol session; If the negotiation operation is successful, the point-to-point protocol session is determined as a point-to-point data link, and data communication is performed with the cloud server based on the point-to-point data link.
[0006] By adopting the above technical solution and introducing a 4G communication module to establish a data communication connection with the cloud server, stable data interaction between the single-chip microcomputer system and the remote server is achieved. It has a dynamic sending mechanism for dialing instructions and the ability to judge the communication status in real time, ensuring that the point-to-point protocol mode can be exited in time under abnormal scenarios, thereby improving the stability and fault tolerance of the communication system.
[0007] Preferably, the step of performing a negotiation operation based on the point-to-point protocol session specifically includes: The negotiation operation at least includes a link control negotiation operation, an identity authentication negotiation operation and a network parameter negotiation operation; The link control negotiation operation is used to negotiate frame structure parameters in the point-to-point data link based on a link control protocol; The identity authentication negotiation operation is used to authenticate the access identity when accessing the target network channel based on the identity authentication protocol, and the identity authentication protocol is a password authentication protocol or a challenge handshake authentication protocol; The network parameter negotiation operation is used to obtain and verify network layer communication parameters based on a network control protocol, and the network layer communication parameters are allocated through the operator network side equipment corresponding to the target network channel.
[0008] By adopting the above technical solution, by negotiating the link control, identity authentication and network parameters in the point-to-point protocol, it is ensured that the link structure, access identity and communication parameters are verified and configured before establishing the data link, which helps to establish a secure and reliable point-to-point data link and improve the quality and security of data communication.
[0009] Preferably, the step of detecting in real time whether an abnormal scenario is present includes: Constructing a discriminant matrix including multiple communication status dimensions, wherein the communication status dimensions include at least the response status of the point-to-point protocol session and the number of negotiation rounds of the link control protocol, as well as the SIM card status and network registration status response time in the 4G communication module; Scoring is performed according to the preset scoring rules corresponding to each of the communication status dimensions to generate a corresponding scoring dimension value, and each of the scoring dimension values is added together to generate a corresponding communication anomaly score value; Dynamically set a communication anomaly fault tolerance threshold. When the communication anomaly score exceeds the communication anomaly fault tolerance threshold, it is determined that an abnormal scenario has been detected. The communication anomaly fault tolerance threshold is calculated based on the weighted average of the network registration response time, negotiation failure frequency, and number of broken link retransmissions recorded by the 4G communication module during historical dialing.
[0010] By adopting the above technical solution, by constructing a discriminant matrix containing multiple communication status parameters and combining it with a scoring mechanism to determine in real time whether an abnormal state has been entered, it is possible to accurately identify abnormal scenarios based on the comprehensive performance of the communication status, and then trigger a protection mechanism to effectively prevent point-to-point communication failures or system deadlocks.
[0011] Preferably, after the step of performing a negotiation operation based on the point-to-point protocol session, the method further includes: If the negotiation operation fails, calling the dynamically updated access point name sequence to determine the optimal access point name parameters; A new dialing instruction is generated based on the optimal access point name parameter, the network environment identification parameter associated with the optimal access point name parameter, and the communication anomaly score value.
[0012] By adopting the above technical solution, the optimized access point strategy is automatically called after negotiation fails, and the dialing behavior is adjusted based on the communication status scoring results. It has the ability to adapt to changes in the network environment and improves the dialing success rate and communication recovery capability of the system in multiple network environments.
[0013] Preferably, the method for establishing the access point name sequence comprises the following steps: Preset multiple access point name parameters, configure access credential information and dial-up operation parameters for each access point name parameter, the access credential information is used to determine whether the corresponding access point name parameter is successfully authenticated; Assigning an initial priority value to each of the access point name parameters, wherein the initial priority value is set based on the access channel type, the network level, and a user-defined rule; Acquire historical usage data of each access point name parameter, the historical usage data being a connection success rate, dialing response time, and abnormal interruption frequency of the access point name parameter in all previous point-to-point protocol dialing processes; According to a preset scoring model, the access point name parameters are dynamically updated in priority according to the historical usage data to generate an access point name sequence arranged in priority.
[0014] By adopting the above technical solution, by pre-setting access points and combining historical dialing data for priority evaluation and dynamic sorting, an optimized sequence of access points is formed, enabling the system to select the most appropriate network channel based on actual communication performance, significantly improving the dialing success rate and network connection efficiency.
[0015] Preferably, the step of generating a new dialing instruction based on the optimal access point name parameter, the network environment identification parameter associated with the optimal access point name parameter, and the communication anomaly score value includes: Calling a constructed dialing instruction template pool, wherein the dialing instruction template pool includes multiple preset dialing instruction templates configured for different access scenarios; Acquire a network environment identification parameter associated with the optimal access point name parameter, the network environment identification parameter including at least a SIM card operator identifier, a base station identifier, and a historical signal strength average; Input the network environment identification parameter and the communication anomaly score value into the policy matching engine to match the dialing instruction template most suitable for the current scenario; A new dialing instruction is generated based on the matched dialing instruction template and the optimal access point name parameter.
[0016] By adopting the above technical solution, network environment parameters and anomaly score values are input into the policy engine for dialing template matching, making the dialing instructions more adaptable in the actual network environment, avoiding the instability of general templates in complex environments, and realizing intelligent customization and refined control of the dialing process.
[0017] Preferably, the step of obtaining and verifying network layer communication parameters includes: Acquire network layer communication parameters, wherein the network layer communication parameters include at least IP address parameters and DNS address parameters; Check whether the IP address parameters and the DNS address parameters are legal; Checking whether the number of the DNS address parameters is consistent with the required number of the Point-to-Point Protocol dial request; Determine in real time whether the network parameter negotiation operation exceeds a preset negotiation time threshold; if the network parameter negotiation operation does not exceed the preset negotiation time threshold, determine that the network parameter negotiation operation is successful; if the network parameter negotiation operation exceeds the preset negotiation time threshold, close the point-to-point data link or restart the 4G communication module.
[0018] By adopting the above technical solution, the legality and consistency of IP addresses and DNS parameters are checked, and an upper limit on the negotiation time is set to ensure the correctness and timeliness of the network parameter negotiation process. At the same time, in abnormal timeout scenarios, the link is automatically disconnected or restarted to ensure that the communication process will not fall into a long waiting or abnormal state.
[0019] Preferably, if the network parameter negotiation operation exceeds a preset negotiation time threshold, the step of closing the point-to-point data link or restarting the 4G communication module includes: If the network parameter negotiation operation exceeds a preset negotiation time threshold, sending a broken link data frame to the 4G communication module and recording the current number of times the broken link data frame has been sent; detecting whether the returned broken link data frame is received within a preset response time threshold, and if the returned broken link data frame is received, closing the point-to-point data link; If the returned broken link data frame is not received, it is determined whether the current number of transmissions is greater than the preset transmission number threshold. If it is not greater than the preset transmission number threshold, the broken link data frame is resent to the 4G communication module. If it is greater than the preset transmission number threshold, the 4G communication module is restarted.
[0020] By adopting the above technical solution and setting the broken link frame retry mechanism and the sending number threshold, an effective processing path is realized after the network negotiation abnormality timeout. When there is no response after multiple attempts to break the link, the module is automatically restarted to avoid the persistent existence of the dead link state, thereby enhancing the system's self-recovery capability and operational stability.
[0021] Preferably, the step of checking the communication connection status of the 4G communication module includes: When the 4G communication module is powered on, checking whether it is synchronized with the 4G communication module, and if not, performing a corresponding synchronization operation; If synchronization is maintained, determining whether the SIM card in the 4G communication module is in a normal state; if the SIM card is in an abnormal state, exiting the point-to-point protocol dialing process; If the SIM card status is normal, then check the network registration status of the 4G communication module; If the network registration status of the 4G communication modules is all registered, it is determined that the communication connection status is normal.
[0022] By adopting the above technical solution, the communication module status is detected and synchronized step by step during the system power-on phase, ensuring that the SIM card status and network registration status are both in normal state before entering the dialing process. This fundamentally ensures that the necessary conditions before the communication process is established have been met, thereby improving the reliability of the communication initialization phase.
[0023] Preferably, the step of checking the network registration status of the 4G communication module includes: Sending a first verification instruction to the 4G communication module, wherein the first verification instruction is used to verify whether the call network of the 4G communication module is registered; receiving in real time a first return value sent by the 4G communication module, the first return value being used to determine whether the call network registration of the 4G communication module has been completed, and controlling the 4G communication module to perform a restart operation if the first return value is not received within a first preset time threshold; If the first return value of the 4G communication module is received, a second check instruction is sent to the 4G communication module, wherein the second check instruction is used to check whether the Internet access network of the 4G communication module is registered; A second return value sent by the 4G communication module is received in real time, where the second return value is used to determine that the Internet network of the 4G communication module has completed registration. If the second return value is not received within a second preset time threshold, the 4G communication module is controlled to perform a restart operation.
[0024] By adopting the above technical solution, the registration status is judged through staged registration inspection of the call network and the Internet network, and a time threshold for receiving a response is set. If a timeout occurs, the communication module is restarted in time, thereby effectively avoiding the problem of dialing failure due to network registration anomalies and ensuring the initialization success rate and response speed of the communication system.
[0025] In summary, this application includes at least one of the following beneficial technical effects: By introducing the Point-to-Point Protocol (PPP) data mode in conjunction with the LwIP protocol stack, the system replaces the traditional AT command-based serial communication mode, achieving a more efficient and stable communication mechanism between the microcontroller and the 4G communication module. A status check mechanism first ensures that the 4G communication module is in an available state, preventing invalid dialing due to SIM card anomalies or network unregistered connections. The microcontroller then switches the 4G communication module to PPP data mode by sending a dial command containing the access point name parameter, automatically suspending the AT command parsing process to ensure that the communication link is dedicated to data transmission. Furthermore, the LwIP protocol stack is used to establish a PPP session and complete the necessary link negotiation, authentication, and network parameter allocation, ultimately establishing a point-to-point data link to support efficient data communication with the cloud server. Furthermore, an escape mechanism is implemented. Upon detecting a communication anomaly, the system controls the module to exit PPP data mode and restore the AT command channel by sending a specific escape command, thereby improving the system's fault tolerance and resilience. It not only solves the problems of low communication efficiency and slow status response in traditional solutions, but also avoids frequent reliance on instruction-level interactions, significantly enhances the real-time and stability of data transmission, and meets the communication needs of large data volumes and high-reliability connections in IoT scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a principle block diagram of the prior art of this application.
[0027] Figure 2 This is a flow chart of an implementation of a data transmission method of a single chip microcomputer in one embodiment of the present application. DETAILED DESCRIPTION
[0028] The present application is further described in detail below with reference to the accompanying drawings.
[0029] In one embodiment, the present application discloses a data transmission method for a single-chip microcomputer, which performs data communication with a cloud server by providing a 4G communication module. The data transmission method for a single-chip microcomputer includes: S10, checking the communication connection status of the 4G communication module; the communication connection status refers to the connection between the single chip microcomputer and the 4G communication module and between the module itself and the mobile communication network; S20. If the communication connection status is normal, a dialing instruction is sent to the 4G communication module. The dialing instruction includes at least an access point name parameter, which is used to instruct the 4G communication module to access the target network channel to initiate a point-to-point protocol dialing request. The dialing instruction is a set of commands used by the microcontroller to control the 4G communication module to enter data transmission mode. The included access point name parameter is identification information used to identify and access a specific data channel allocated by the operator, which affects the module's ultimate data access routing selection. The target network channel represents the cellular network channel that the 4G communication module will access for data transmission. The establishment of this channel depends on the access point name and the operator's network resource allocation.
[0030] S30. When the 4G communication module switches to the point-to-point protocol data mode based on the received dial-up command, a point-to-point protocol session is constructed based on the LwIP protocol stack, wherein the 4G communication module in the point-to-point protocol data mode automatically suspends the AT command parsing mechanism and detects in real time whether it is in an abnormal scenario. If it is in an abnormal scenario, an escape sequence is sent to the 4G communication module to control the 4G communication module to exit the point-to-point protocol data mode and then restore the AT command parsing mechanism; the point-to-point protocol data mode refers to the communication module switching from the AT command control mode to the mode of transmitting only the original PPP data packet. In this mode, the module suspends parsing of AT commands and focuses on establishing and maintaining the data link. The LwIP protocol stack is a lightweight embedded TCP / IP protocol stack that usually runs in a resource-constrained single-chip microcomputer environment and is used to handle data communication tasks above the IP layer. A point-to-point protocol session refers to the logical connection process between the single-chip microcomputer and the communication module based on the PPP protocol. The session needs to complete operations such as link negotiation, identity authentication and IP configuration. The AT command parsing mechanism is a set of command parsing systems used by the 4G communication module by default to receive and interpret microcontroller control commands. This mechanism is typically suspended in data mode to avoid interfering with data transmission. Abnormal scenarios refer to abnormal conditions such as connection loss, negotiation failure, and module freeze during communication. These conditions require real-time monitoring to ensure system stability. An escape sequence is a specific character sequence that, when sent by the microcontroller to the communication module, triggers the module to exit the current data mode and return to command interaction mode, thereby resuming or restarting communication.
[0031] S40. Perform a negotiation operation based on the point-to-point protocol session. Negotiation refers to the process of bidirectionally agreeing on the link structure, access rights, and network configuration through methods such as the link control protocol, identity authentication protocol, and network control protocol during the PPP session. A point-to-point data link is a stable communication path established after successful negotiation. This path allows for bidirectional data transmission between the microcontroller and the cloud server using the standard IP protocol.
[0032] If the negotiation operation succeeds, the point-to-point protocol session is determined as a point-to-point data link, and data communication is performed with the cloud server over the point-to-point data link. A cloud server is a remote data center device deployed on the Internet or a private network. It is typically used to receive data reports from edge devices (such as single-chip microcomputer terminals) and can return corresponding control instructions or perform data analysis and storage operations.
[0033] Specifically, the microcontroller uses USB Host connectivity to connect to a 4G communication module (such as the Quectel EC20 or EG91 series) to enable data communication with a cloud server. The microcontroller runs an embedded real-time operating system (such as FreeRTOS), which provides scheduling support for multiple tasks, including network management, USB management, data collection and reporting, serial communication, and remote upgrades. The USB management task initializes and enumerates connected 4G communication modules, identifies the module type, and establishes a virtual serial communication channel via the USB CDC / ACM driver. The microcontroller then sends AT commands to the 4G communication module via this channel to dial up. These commands include an access point name (APN) parameter, instructing the 4G communication module to connect to a specified cellular data channel and enter point-to-point protocol data mode. After successful PPP dialup, the 4G communication module switches from the default AT command parsing state to point-to-point protocol data mode. The microcontroller then establishes a PPP session using the LwIP protocol stack, calls the pppos_create interface to establish the connection, and processes data packets received from the USB CDC port through the pppos_input interface. To ensure real-time data transmission, the system triggers the pppos_poll function through interrupts or timer polling to keep the point-to-point data link active.
[0034] During the negotiation phase of a point-to-point data link, the system first completes LCP negotiation to establish a reliable frame structure. It then performs AUTH authentication, supporting PAP or CHAP protocols to verify the legitimacy of the access identity. IPCP negotiation then automatically allocates and obtains valid network layer parameters, such as IP address parameters and DNS address parameters, from the carrier network corresponding to the target network channel. If the IPCP process is not completed within the set time during the negotiation, the system controls the transmission of the escape sequence "+++" to the 4G communication module, causing it to exit point-to-point protocol data mode and restore the AT command parsing mechanism to facilitate redialing or restarting the 4G communication module process. After obtaining the network layer communication parameters, the LwIP protocol stack establishes IP layer communication capabilities, allowing the system to perform high-level data communication tasks over the point-to-point data link.
[0035] In this embodiment, the upper-layer protocols include MQTT, HTTP, and Modbus. The system uses lightweight MQTT client libraries such as Paho Embedded C to connect to the cloud server via TCP / IP for remote data reporting and command issuance. At the same time, the system supports the Modbus RTU protocol to collect operating data of industrial equipment through the serial port, and also supports the Modbus TCP protocol to directly read or control data from remote devices through LwIP. To improve system reliability, the device supports OTA remote upgrade function. While ensuring uninterrupted business, the dual-partition design realizes breakpoint resumption and redundant backup of firmware, effectively improving the security and success rate of the upgrade process.
[0036] In one embodiment, in step S10, i.e., the step of checking the communication connection status of the 4G communication module, the following steps are included: S101. When the 4G communication module is powered on, check whether it is synchronized with the 4G communication module. If not, perform the corresponding synchronization operation. Serial port (UART) communication is an asynchronous communication method without a dedicated clock signal line. Therefore, both parties must agree on the baud rate before communication. Otherwise, the bit sequence sent by one party will not be correctly parsed into bytes by the other party. Therefore, synchronization is required. However, for modules using the USB CDC interface, such as EC20 and EG91, baud rate synchronization is not required in USB interface communication because USB CDC simulates a serial port but is a packet transmission mechanism in hardware and does not rely on the baud rate of the traditional serial port.
[0037] S102: If synchronization is maintained, determining whether the SIM card in the 4G communication module is in a normal state; if the SIM card is in an abnormal state, exiting the point-to-point protocol dialing process; S103: If the SIM card status is normal, check the network registration status of the 4G communication module; S104: If the network registration status of the 4G communication module is all registered, determine that the communication connection status is normal.
[0038] Specifically, after the 4G communication module completes power-on initialization, the main control microcontroller first sends a synchronization command to the 4G communication module at the preset serial port baud rate to confirm whether it has maintained synchronization with it. If synchronization is not maintained, it switches to different baud rate combinations and attempts until a valid response from the module is received, completing synchronization. After maintaining synchronization, the system sends a SIM card status check command to the 4G communication module, such as AT+CPIN?, to determine whether the SIM card in the 4G communication module is in normal condition. If the SIM card is not detected within the set response waiting time threshold (for example, 20 seconds) as being inserted or ready, the SIM card status is considered abnormal, and the control system exits the current point-to-point protocol dialing process and performs a module restart operation. If the SIM card status is normal, it continues to check the network registration status of the 4G communication module.
[0039] In one embodiment, in step S103, i.e., the step of checking the network registration status of the 4G communication module, the following steps are included: S1031. Send a first verification instruction to the 4G communication module, where the first verification instruction is used to verify whether the call network of the 4G communication module has been registered; S1032, receiving in real time a first return value sent by the 4G communication module, the first return value being used to determine whether the call network registration of the 4G communication module has been completed, and if the first return value is not received within a first preset time threshold, controlling the 4G communication module to perform a restart operation; S1033: If the first return value of the 4G communication module is received, a second check instruction is sent to the 4G communication module, where the second check instruction is used to check whether the Internet access network of the 4G communication module is registered; S1034. Receive in real time a second return value sent by the 4G communication module, where the second return value is used to determine whether the Internet access network of the 4G communication module has been registered. If the second return value is not received within a second preset time threshold, control the 4G communication module to perform a restart operation.
[0040] Specifically, the first verification command is a control command proactively sent by the MCU to the 4G communication module to check whether it has successfully connected to the cellular communication network (i.e., the call network). This command is typically implemented as a standard AT command, such as AT+CREG?, which queries whether the module has completed base station registration and is capable of making calls or receiving text messages. The first return value is the status value returned by the 4G communication module in response to the first verification command. It indicates whether the module has successfully connected to the call network. For example, a return value of "1" or "5" indicates a registered status. The main control system uses this value to determine whether to proceed to the next step. The first preset time threshold is the maximum response time set by the master microcontroller after sending the first verification command. If no valid first return value is received within this time, it generally indicates that the module is unable to register with the network. The system then controls the module to reboot to clear the fault state and reinitialize. The second verification command, after confirming successful network registration, is a control command sent by the master microcontroller to verify whether the 4G communication module has successfully registered with the packet-switched network (i.e., the Internet access network). In implementation, this command is often AT+CGREG?, used to determine whether data communication is possible. The second return value is the 4G communication module's response to the second verification command. The returned registration status value indicates whether the connection to the PS network has been successful, with "1" or "5" indicating a successful registration. The second preset time threshold is the maximum response time set by the system after sending the second verification command. If no second return value is received within this time limit, it is also considered a network anomaly and the system automatically controls the module to reboot, restarting the entire communication connection process.
[0041] In one embodiment, in step S40, i.e., the step of performing a negotiation operation based on a point-to-point protocol session, specifically: The negotiation operation includes a link control negotiation operation, which is used to negotiate frame structure parameters in a point-to-point data link based on a link control protocol.
[0042] Specifically, after establishing a point-to-point protocol session, the MCU calls the pppos_create interface in the LwIP protocol stack to initialize the PPP session and continuously receives link negotiation frame data from the 4G communication module through the pppos_input function. The negotiation operation begins with link control negotiation, which uses the Link Control Protocol to bidirectionally negotiate the frame structure parameters of the point-to-point data link, including parameters such as the maximum receive unit size, whether to enable protocol compression, and asynchronous control character mapping. This negotiation is carried out by sending and responding to LCP configuration request (Configure-Request) and acknowledgment frames (Configure-Ack), ensuring that the data link layer configuration between the main control MCU and the 4G communication module remains consistent, laying the foundation for subsequent authentication and network parameter negotiation.
[0043] In one embodiment, in step S40, i.e., the step of performing a negotiation operation based on a point-to-point protocol session, specifically: The negotiation operation includes an identity authentication negotiation operation, which is used to authenticate the access identity when accessing the target network channel based on the identity authentication protocol. The identity authentication protocol is a password authentication protocol or a challenge handshake authentication protocol.
[0044] Specifically, after completing the link control negotiation, the MCU continues to perform the identity authentication negotiation operation through the LwIP protocol stack. This operation verifies the access identity of the MCU when accessing the target network channel based on the identity authentication protocol. The identity authentication protocol can be a password authentication protocol or a challenge handshake authentication protocol. The former directly authenticates through a combination of user name and password, while the latter completes the authentication process by sending a random challenge code through the server and the MCU calculating the response value based on the preset password. The authentication process starts with the 4G communication module sending an authentication request frame, and the MCU responds based on the configured access credentials and waits for authentication confirmation. If the authentication is successful, the system continues to enter the network layer negotiation process to ensure that it has a legal access identity before the data communication channel is established.
[0045] In one embodiment, in step S40, i.e., the step of performing a negotiation operation based on a point-to-point protocol session, specifically: The negotiation operation includes a network parameter negotiation operation, which is used to obtain and verify network layer communication parameters based on a network control protocol. The network layer communication parameters are allocated through the operator network side equipment corresponding to the target network channel.
[0046] Specifically, after completing the identity authentication negotiation operation, the single-chip microcomputer continues to perform the network parameter negotiation operation, which is based on the network control protocol, and the network control protocol is the IP control protocol. Through this process, the single-chip microcomputer initiates a network control protocol negotiation request to the 4G communication module to obtain network layer communication parameters including IP address, subnet mask, gateway address and DNS server address. The network layer communication parameters are dynamically allocated to the currently established point-to-point protocol session by the operator network side device corresponding to the target network channel. The single-chip microcomputer receives the negotiation response of the network control protocol through the pppos module in the LwIP protocol stack, and performs a validity check on the network layer communication parameters allocated in the point-to-point protocol session. If the allocated parameters are complete and legal, the network layer initialization of the point-to-point protocol session is completed, providing stable network support for subsequent data communication based on the point-to-point data link and the cloud server.
[0047] In one embodiment, step S40, i.e., the step of obtaining and verifying network layer communication parameters, includes: S401. Acquire network layer communication parameters, which include at least IP address parameters and DNS address parameters. S402: Check whether the IP address parameters and DNS address parameters are legal; S403, checking whether the number of DNS address parameters is consistent with the required number of the point-to-point protocol dial-up request; S404. Determine in real time whether the network parameter negotiation operation exceeds a preset negotiation time threshold. If the network parameter negotiation operation does not exceed the preset negotiation time threshold, determine that the network parameter negotiation operation is successful. If the network parameter negotiation operation exceeds the preset negotiation time threshold, close the point-to-point data link or restart the 4G communication module.
[0048] Specifically, the network control protocol is the Internet Protocol Control Protocol, and the network layer communication parameters include IP address parameters and DNS address parameters. The network layer communication parameters are dynamically allocated by the operator network side equipment corresponding to the target network channel. After receiving the network layer communication parameters fed back by the 4G communication module, the single-chip microcomputer verifies the legitimacy of the IP address parameters and the matching of the number of DNS address parameters. If the IP address parameters do not conform to the format specification, or the number of DNS address parameters is inconsistent with the number of requests preset by the single-chip microcomputer, it is determined that the current network parameter negotiation has failed. If the network parameter negotiation is not completed within the set negotiation time limit, for example, the acquisition of the network layer communication parameters is not completed within 90 seconds, the single-chip microcomputer controls the 4G communication module to actively terminate the current point-to-point protocol session, and regenerates the dialing instruction to initiate a new point-to-point protocol dialing request, thereby ensuring that the new network parameter negotiation operation can be successfully completed, providing effective support for subsequent data communication with the cloud server.
[0049] In one embodiment, in step S30, the step of detecting in real time whether an abnormal scenario is present includes: S301. Construct a discriminant matrix including multiple communication status dimensions, where the communication status dimensions include at least a response status of a point-to-point protocol session and a number of negotiation rounds of a link control protocol, as well as a SIM card status and a network registration status response time in the 4G communication module; S302: Score each communication status dimension according to a preset scoring rule corresponding to each dimension to generate a corresponding scoring dimension value, and add the respective scoring dimension values to generate a corresponding communication anomaly score value; S303. Dynamically set a communication anomaly fault tolerance threshold. When the communication anomaly score exceeds the communication anomaly fault tolerance threshold, it is determined that an abnormal scenario has been detected. The communication anomaly fault tolerance threshold is calculated based on a weighted average of the network registration response time, negotiation failure frequency, and link break retransmission times recorded by the 4G communication module during historical dialing.
[0050] Specifically, to automatically identify abnormalities in the 4G communication module's operation, the system built an abnormality discrimination mechanism based on multi-dimensional communication status indicators. First, a multi-dimensional discrimination matrix was designed to capture key communication status parameters. Each dimension in the matrix corresponds to an important indicator reflecting the stability of the communication process. Examples include the response status during the Point-to-Point Protocol (PPP) session phase, which indicates whether data link initialization has received effective feedback; the number of Link Control Protocol (LCP) negotiation rounds, which characterizes the number of retries during link establishment; the SIM card status, which reflects whether the communication module has valid identity access credentials; and the network registration status response time, which measures the time it takes for the module to establish a communication connection with the operator's core network.
[0051] The system then configures scoring criteria for each of these dimensions. For example, if a PPP session remains unresponsive within a preset timeframe, the dimension is assigned a high risk rating and a higher score. If LCP requires multiple renegotiations, scores are accumulated based on the number of rounds. Invalid or abnormal SIM card status is assigned the highest risk rating. Furthermore, network registration response time is assigned multiple scoring levels based on latency intervals, providing a detailed reflection of connection quality.
[0052] All scores are quantified and accumulated to form a communication anomaly score. To dynamically adapt to network fluctuations, the system uses a weighted average algorithm to set a communication anomaly tolerance threshold. This threshold is calculated based on key data metrics recorded by the 4G communication module during previous dial-up processes, including average network registration delay, negotiation failure statistics, and number of retransmission attempts after link breakdowns. Ultimately, when the current score exceeds this dynamic threshold, the current communication process is deemed abnormal, and the system triggers an escape mechanism or other recovery actions to ensure the stability and reliability of the communication link.
[0053] In one embodiment, in step S404, that is, if the network parameter negotiation operation exceeds a preset negotiation time threshold, the step of closing the point-to-point data link or restarting the 4G communication module includes: S4041. If the network parameter negotiation operation exceeds the preset negotiation time threshold, a disconnection data frame is sent to the 4G communication module and the current number of disconnection data frame transmissions is recorded. A disconnection data frame is a data frame used to indicate the termination of the current point-to-point protocol session. This data frame is sent by the microcontroller and sent to the 4G communication module. It is intended to proactively close the current point-to-point data link in the event of negotiation failure or an abnormality, thereby freeing up communication resources and preparing for the next redial process. The current number of transmissions refers to the cumulative number of disconnection data frames sent by the microcontroller to the 4G communication module. This value is updated after each disconnection data frame transmission and is used to determine whether to proceed to the next retry or directly restart the module.
[0054] S4042. Check whether a returned disconnected data frame is received within a preset response time threshold. If so, close the point-to-point data link. The preset response time threshold refers to the maximum time allowed by the system to wait for the 4G communication module to return a response, starting from the time the disconnected data frame is sent. If no response is received after this time, the communication is considered to have timed out. Closing the point-to-point data link means that when the microcontroller detects that the disconnected condition has been met, it will actively call the protocol stack interface to release the point-to-point protocol session resources, returning the current communication state to the initial dial-up state and re-establishing the dial-up environment for the next communication.
[0055] S4043. If the returned broken link data frame is not received, determine whether the current number of transmissions is greater than the preset transmission number threshold. If it is not greater than the preset transmission number threshold, resend the broken link data frame to the 4G communication module. If it is greater than the preset transmission number threshold, restart the 4G communication module. The preset transmission number threshold refers to the maximum number of attempts allowed to send broken link data frames set in advance by the system. If the threshold is reached or exceeded, it is considered that the current communication is abnormal and cannot be restored by the broken link data frame method. More mandatory measures such as restarting the module are required. The preset transmission number threshold refers to the maximum number of attempts allowed to send broken link data frames set in advance by the system. If the threshold is reached or exceeded, it is considered that the current communication is abnormal and cannot be restored by the broken link data frame method. More mandatory measures such as restarting the module are required. Specifically, when the MCU establishes a point-to-point protocol session through the 4G communication module and detects a link anomaly or negotiation failure, it can control the 4G communication module to exit point-to-point protocol data mode by sending an escape sequence, restoring the AT command parsing mechanism, thereby terminating the current dialing process and retrieving module status information. The escape sequence is a data control instruction consisting of specific characters (for example, +++) that is used to switch the 4G communication module from point-to-point protocol data mode to AT command mode.
[0056] In another scenario, when a point-to-point protocol session has been successfully negotiated and a point-to-point data link has been established, and the MCU needs to proactively release communication resources, it can send a PPP session termination request frame (known as a TerminateRequest frame in the standard PPP protocol) to the 4G communication module via the LwIP protocol stack. If a TerminateAck frame is received back within a preset time, the link is considered released normally, and the communication process ends. Otherwise, if no response is received, the MCU can choose to resend the message or force a disconnection using the escape sequence mechanism.
[0057] In one embodiment, after step S10, i.e., performing a negotiation operation based on the point-to-point protocol session, the method further includes: S41. If the negotiation operation fails, calling the dynamically updated access point name sequence to determine the optimal access point name parameters; S42: Generate a new dialing instruction based on the optimal access point name parameter, the network environment identification parameter associated with the optimal access point name parameter, and the communication anomaly score.
[0058] In one embodiment, in step S10, the method for establishing an access point name sequence includes the following steps: S01. Preset multiple access point name parameters. For each access point name parameter, configure access credential information and dial-up operation parameters. The access credential information is used to determine whether the corresponding access point name parameter has been successfully authenticated. The dial-up operation parameters include a retry threshold and a run time threshold. Each access point name parameter typically includes an access point identifier provided by the operator, such as "cmnet" or "uninet." Its function is to determine which network channel the module will subsequently use to initiate data communication. Access credential information is authentication information that accompanies the access point name parameter and is used to determine whether the network corresponding to the parameter can successfully complete the authentication process. This credential information may include a username, password, or identity code. Dial-up operation parameters refer to a set of parameters used to control dial-up behavior, including restrictions on failed retries and time management strategies. The retry threshold is used to limit the maximum number of dial-up attempts for a single access point, and the run time threshold represents the maximum allowable time from the start of dialing to establishing a connection.
[0059] S02. Assign an initial priority value to each access point name parameter. The initial priority value is set based on the access channel type, network level, and user-configured rules. The initial priority value is the system's preset priority level for the access point name parameter when there is no historical data. The initial priority value is set based on the access channel type (e.g., public / private network), network level (e.g., 4G / 5G), or user-configured rules (e.g., preferences or costs).
[0060] S03. Obtain historical usage data for each access point name parameter. The historical usage data includes the connection success rate, dial response time, and abnormal interruption frequency of the access point name parameter in previous point-to-point protocol dialing processes. The historical usage data refers to the operational records generated during the past use of each access point name parameter, including the successful connection ratio of the parameter, the average time required to respond to establish a connection, and the number of abnormalities such as connection interruptions that occurred during the communication process.
[0061] S04. Dynamically update the priority of the access point name parameters based on historical usage data according to a preset scoring model to generate a prioritized access point name sequence. The scoring model converts historical usage data into a scoring basis for comparison and ranking based on pre-set rules and weights, thereby dynamically updating the priority of each access point name parameter. The access point name sequence is a collection of all access point name parameters arranged in order of current priority, and is used to select a backup strategy in the event of a dialing failure or anomaly.
[0062] Specifically, the system presets three access point name parameters: "apn_a," "apn_b," and "apn_c," each configured with a username and password, a maximum retry count of three, and a maximum dial-up time of 30 seconds. Initially, "apn_a" was given the highest priority because it corresponds to a high-speed public network channel. However, in actual operation, "apn_a" failed to connect in three of the last five attempts and took a long time to respond, while "apn_b" had a high success rate and stable connections. Therefore, the system reassessed the system based on the scoring model, raising the priority of "apn_b" and adjusting the access point name sequence to "apn_b," "apn_a," and "apn_c." Subsequent dial-up attempts will prioritize the "apn_b" parameter.
[0063] More specifically, in step S02, the process of assigning an initial priority value to each access point name parameter includes: the system pre-setting a priority evaluation rule table, which lists priority scoring factors corresponding to various access channel types, network levels, and user-defined rules. Access channel types include public network access, private network access, and virtual private network access, with corresponding base scores of 30, 50, and 70, respectively; network levels include 2G, 3G, 4G, and 5G, with corresponding base scores of 10, 30, 50, and 80; and user-defined rules include user-defined preferences (e.g., prioritizing a certain carrier) and connection cost weights (e.g., prioritizing those with lower data costs). The system converts user rules into bonus or deduction items, with each bonus item weighted between 5 and 20 points. When configuring each access point name parameter, the system reads its access channel type, supported network level, and whether it matches the user-defined rules, and assigns a score to each factor according to the rule table. The weighted sum of these three factors is ultimately used as the initial priority value for the access point name parameter.
[0064] More specifically, the process of constructing and using a preset scoring model in step S04 includes: The system builds a scoring model that is used to calculate the current dynamic priority value of each access point name parameter based on historical usage data. The scoring model includes a connection success rate scoring module, a dial response time scoring module, and an abnormal interruption frequency scoring module. The connection success rate scoring module divides the number of successful connections for each access point name parameter during the last N dialing attempts by the total number of dialing attempts to obtain a success rate, and then maps this rate to a score range of 0 to 40. For example, a success rate greater than or equal to 90% is assigned a score of 40, while a success rate less than 60% is assigned a score of 20. The dial response time scoring module records the average system response time during the last N dialing attempts. The shorter the response time, the higher the score. For example, a response time of less than 3 seconds is scored as 30, while a response time exceeding 10 seconds is scored as 10. The abnormal interruption frequency scoring module records the number of non-user-initiated interruptions that occurred within a unit of time. The fewer abnormalities, the higher the score. For example, no abnormalities for three consecutive days is scored as 30, while three or more abnormalities are scored as 10.
[0065] After the scores for the three modules are calculated, the system combines them according to a weighted ratio: connection success rate: dial response time: abnormal interruption frequency = 4:3:3. The system uses this combined score as the current dynamic priority value for the access point name parameter, with the higher the dynamic priority value, the higher the ranking. When updating the access point name sequence, the system uses this scoring model to calculate the combined score for each access point and sorts them from high to low, thus forming a prioritized access point name sequence that can be used in the dial retry process.
[0066] In one embodiment, in step S42, that is, the step of generating a new dialing instruction based on the optimal access point name parameter, the network environment identification parameter associated with the optimal access point name parameter, and the communication anomaly score value, includes: S421. Calling a constructed dialing instruction template pool, wherein the dialing instruction template pool includes a plurality of preset dialing instruction templates configured for different access scenarios; S422: Obtain a network environment identification parameter associated with the optimal access point name parameter, where the network environment identification parameter includes at least a SIM card operator identifier, a base station identifier, and a historical signal strength average; S423: Input the network environment identification parameter and the communication anomaly score value into a policy matching engine to match the dialing instruction template most suitable for the current scenario; S424: Generate a new dialing instruction based on the matched dialing instruction template and the optimal access point name parameter.
[0067] Specifically, the dialing instruction template pool consists of multiple preset templates, each corresponding to a specific communication access scenario. These templates are stored in a storage unit in a predefined format and contain complete dialing parameter configuration content, such as dialing type, access point name, verification method, maximum allowed dialing retries, dialing time limit, whether to enable the automatic reconnection mechanism after disconnection, and DNS configuration method. Each template also comes with a scenario label to indicate the type of network environment it is applicable to, such as mobile networks, weak signal environments, or high packet loss environments.
[0068] During communication, if the system determines that there is an anomaly in the current communication or detects a negotiation failure, the access point management module first selects the optimal access point name parameters. These parameters are selected based on the performance of each access point in the communication module's historical dial-up records, taking into account indicators such as the number of successful connections, dial-up response time, and disconnection frequency.
[0069] The system then activates the environment perception module to collect network environment identification parameters for the current communication scenario. These parameters include, but are not limited to: the operator information of the SIM card used by the communication module, which determines the type of operator currently connected by reading the user identification data; the base station number information connected to, which reflects the current wireless communication area; and the average signal quality level of the base station, which is obtained by the communication module continuously collecting and calculating the average value over a period of time.
[0070] The aforementioned network environment identification parameters, along with the current communication anomaly score, are transmitted to the policy matching module. Using an embedded rule comparison table and a weighted scoring model, the module screens the multiple templates in the dialing instruction template pool. Initially, the module performs a preliminary filter based on scenario tags and network environment identification parameters, eliminating templates that are clearly inappropriate for the current network conditions. Next, it prioritizes each template based on its corresponding usage conditions and the current score, selecting the most suitable dialing template.
[0071] After selecting a template, the system combines its parameters with those of the currently selected optimal access point name to generate a new dialing instruction. This dialing instruction contains all the parameters the communication module needs to perform the dialing operation, ensuring that it can adaptively dial based on the current network characteristics and system status. The generated dialing instruction is then sent to the communication module, which initiates a new point-to-point dialing process based on it.
[0072] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A data transmission method for a single chip microcomputer, characterized in that: By providing a 4G communication module to communicate data with a cloud server, the data transmission method of the single-chip microcomputer includes: Checking the communication connection status of the 4G communication module; If the communication connection state is normal, sending a dialing instruction to the 4G communication module, the dialing instruction including at least an access point name parameter, the access point name parameter being used to instruct the 4G communication module to access the target network channel to initiate a point-to-point protocol dialing request; When the 4G communication module switches to the point-to-point protocol data mode based on the received dialing instruction, a point-to-point protocol session is established based on the LwIP protocol stack, wherein the 4G communication module in the point-to-point protocol data mode automatically suspends the AT command parsing mechanism and detects in real time whether it is in an abnormal scenario. If it is in an abnormal scenario, an escape sequence is sent to the 4G communication module to control the 4G communication module to exit the point-to-point protocol data mode and then resume the AT command parsing mechanism; performing a negotiation operation based on the point-to-point protocol session; If the negotiation operation is successful, the point-to-point protocol session is determined as a point-to-point data link, and data communication is performed with the cloud server based on the point-to-point data link.
2. The data transmission method of a single chip microcomputer according to claim 1, characterized in that: The step of performing a negotiation operation based on the point-to-point protocol session specifically includes: The negotiation operation at least includes a link control negotiation operation, an identity authentication negotiation operation and a network parameter negotiation operation; The link control negotiation operation is used to negotiate frame structure parameters in the point-to-point data link based on a link control protocol; The identity authentication negotiation operation is used to authenticate the access identity when accessing the target network channel based on the identity authentication protocol, and the identity authentication protocol is a password authentication protocol or a challenge handshake authentication protocol; The network parameter negotiation operation is used to obtain and verify network layer communication parameters based on a network control protocol, and the network layer communication parameters are allocated through the operator network side equipment corresponding to the target network channel.
3. The data transmission method of a single chip microcomputer according to claim 2, characterized in that: The step of detecting in real time whether an abnormal scenario is present includes: Constructing a discriminant matrix including multiple communication status dimensions, wherein the communication status dimensions include at least the response status of the point-to-point protocol session and the number of negotiation rounds of the link control protocol, as well as the SIM card status and network registration status response time in the 4G communication module; Scoring is performed according to the preset scoring rules corresponding to each of the communication status dimensions to generate a corresponding scoring dimension value, and each of the scoring dimension values is added together to generate a corresponding communication anomaly score value; Dynamically set a communication anomaly fault tolerance threshold. When the communication anomaly score exceeds the communication anomaly fault tolerance threshold, it is determined that an abnormal scenario has been detected. The communication anomaly fault tolerance threshold is calculated based on the weighted average of the network registration response time, negotiation failure frequency, and number of broken link retransmissions recorded by the 4G communication module during historical dialing.
4. The data transmission method of a single chip microcomputer according to claim 3, characterized in that: After the step of performing a negotiation operation based on the point-to-point protocol session, the method further includes: If the negotiation operation fails, calling the dynamically updated access point name sequence to determine the optimal access point name parameters; A new dialing instruction is generated based on the optimal access point name parameter, the network environment identification parameter associated with the optimal access point name parameter, and the communication anomaly score value.
5. The data transmission method of a single chip microcomputer according to claim 4, characterized in that: The method for establishing the access point name sequence comprises the following steps: Preset multiple access point name parameters, configure access credential information and dial-up operation parameters for each access point name parameter, the access credential information is used to determine whether the corresponding access point name parameter is successfully authenticated; Assigning an initial priority value to each of the access point name parameters, wherein the initial priority value is set based on the access channel type, the network level, and a user-defined rule; Acquire historical usage data of each access point name parameter, the historical usage data being a connection success rate, dialing response time, and abnormal interruption frequency of the access point name parameter in all previous point-to-point protocol dialing processes; According to a preset scoring model, the access point name parameters are dynamically updated in priority according to the historical usage data to generate an access point name sequence arranged in priority.
6. The data transmission method of a single chip microcomputer according to claim 4, characterized in that: The step of generating a new dialing instruction based on the optimal access point name parameter, the network environment identification parameter associated with the optimal access point name parameter, and the communication anomaly score value includes: Calling a constructed dialing instruction template pool, wherein the dialing instruction template pool includes multiple preset dialing instruction templates configured for different access scenarios; Acquire a network environment identification parameter associated with the optimal access point name parameter, the network environment identification parameter including at least a SIM card operator identifier, a base station identifier, and a historical signal strength average; Input the network environment identification parameter and the communication anomaly score value into the policy matching engine to match the dialing instruction template most suitable for the current scenario; A new dialing instruction is generated based on the matched dialing instruction template and the optimal access point name parameter.
7. The data transmission method of a single chip microcomputer according to claim 2, characterized in that: The step of obtaining and verifying network layer communication parameters includes: Acquire network layer communication parameters, wherein the network layer communication parameters include at least IP address parameters and DNS address parameters; Check whether the IP address parameters and the DNS address parameters are legal; Checking whether the number of the DNS address parameters is consistent with the required number of the Point-to-Point Protocol dial request; Determine in real time whether the network parameter negotiation operation exceeds a preset negotiation time threshold; if the network parameter negotiation operation does not exceed the preset negotiation time threshold, determine that the network parameter negotiation operation is successful; if the network parameter negotiation operation exceeds the preset negotiation time threshold, close the point-to-point data link or restart the 4G communication module.
8. The data transmission method of a single chip microcomputer according to claim 7, characterized in that: If the network parameter negotiation operation exceeds a preset negotiation time threshold, the step of closing the point-to-point data link or restarting the 4G communication module includes: If the network parameter negotiation operation exceeds a preset negotiation time threshold, sending a broken link data frame to the 4G communication module and recording the current number of times the broken link data frame has been sent; detecting whether the returned broken link data frame is received within a preset response time threshold, and if the returned broken link data frame is received, closing the point-to-point data link; If the returned broken link data frame is not received, it is determined whether the current number of transmissions is greater than the preset transmission number threshold. If it is not greater than the preset transmission number threshold, the broken link data frame is resent to the 4G communication module. If it is greater than the preset transmission number threshold, the 4G communication module is restarted.
9. The data transmission method of a single chip microcomputer according to claim 1, characterized in that: The step of checking the communication connection status of the 4G communication module includes: When the 4G communication module is powered on, checking whether it is synchronized with the 4G communication module, and if not, performing a corresponding synchronization operation; If synchronization is maintained, determining whether the SIM card in the 4G communication module is in a normal state; if the SIM card is in an abnormal state, exiting the point-to-point protocol dialing process; If the SIM card status is normal, then check the network registration status of the 4G communication module; If the network registration status of the 4G communication modules is all registered, it is determined that the communication connection status is normal.
10. The data transmission method of a single chip microcomputer according to claim 9, characterized in that: The step of checking the network registration status of the 4G communication module includes: Sending a first verification instruction to the 4G communication module, wherein the first verification instruction is used to verify whether the call network of the 4G communication module is registered; receiving in real time a first return value sent by the 4G communication module, the first return value being used to determine whether the call network registration of the 4G communication module has been completed, and controlling the 4G communication module to perform a restart operation if the first return value is not received within a first preset time threshold; If the first return value of the 4G communication module is received, a second check instruction is sent to the 4G communication module, wherein the second check instruction is used to check whether the Internet access network of the 4G communication module is registered; A second return value sent by the 4G communication module is received in real time, where the second return value is used to determine that the Internet network of the 4G communication module has completed registration. If the second return value is not received within a second preset time threshold, the 4G communication module is controlled to perform a restart operation.
Citation Information
Patent Citations
Multi-protocol stack connection device and method
CN101102317A
Method for selecting wireless access point and FTM session, terminal and server
CN108024312A
Method and system for remotely maintaining STM32 equipment based on LwIP protocol stack
CN113347044A
Self-adaptive wireless dialing method applied to power grid fusion type terminal
CN113938972A
Method for supporting PPP dialing, PPP dialing method and terminal equipment
CN114584569A