Baud rate self-adaptive remote downloading method
Through the remote download method adaptive baud rate, the optimal baud rate is dynamically negotiated, which solves the compatibility and stability problems caused by hardware replacement, and realizes efficient data transmission without manual intervention, improving the reliability and maintenance convenience of remote downloads.
Patent Information
- Application Number
- CN202510482280.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, the remote download method has hardware compatibility problems caused by fixed baud rate settings in the data transmission between the communication module and the security chip, and cannot be dynamically adjusted to adapt to hardware performance differences.
The baud rate adaptive remote download method is adopted to establish a connection through the initial baud rate, dynamically negotiate the optimal baud rate, and use test data and encryption verification mechanism to automatically adjust the baud rate to adapt to hardware changes and ensure communication stability and efficiency.
It realizes automatic adaptation of the optimal baud rate without manual intervention after hardware replacement, improves communication stability and transmission efficiency, reduces software management costs, and ensures the accuracy and reliability of data transmission.
Smart Images

Figure CN120263882A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a remote download method with baud rate adaptability. Background Art
[0002] With the rapid development of Internet of Things technologies, the application of remote download functions in embedded devices has become increasingly widespread. In the prior art, remote download is usually achieved through data transmission between a communication module and a security chip, and its core process includes: the communication module obtains data from a server through TCP / HTTP / HTTPS protocols, and then transmits the data to the security chip through a serial port at a fixed baud rate (for example, 115200 baud), and finally completes the download.
[0003] However, the prior art has significant defects: (1) The setting of the fixed baud rate depends on the performance and compatibility of specific hardware models. When the communication module or the security chip is replaced, the original baud rate may not match the new hardware, resulting in communication failures or reduced efficiency. (2) Different hardware requires corresponding software versions to adapt to different baud rates, leading to fragmentation of software versions, high management difficulty, and the risk of version confusion during the upgrade process. (3) The fixed baud rate cannot be dynamically adjusted according to the actual performance of the hardware. If set too high, it may cause unstable communication, and if set too low, the transmission rate will be sacrificed. Summary of the Invention
[0004] The present invention provides a remote download method with baud rate adaptability to eliminate the influence of hardware differences, achieve high-speed transmission while ensuring communication stability, and avoid the additional costs brought by manual intervention.
[0005] The technical solution adopted by the present invention is as follows: A remote download method with baud rate adaptability, which is applied to data transmission between a communication module and a security chip, includes the following steps:
[0006] Step 1: The communication module and the security chip establish a communication connection through an initial baud rate;
[0007] Step 2: The communication module sends a baud rate negotiation request to the security chip, triggering both parties to enter the baud rate adaptation mode;
[0008] Step 3: The communication module sends test data to the security chip at a preset first baud rate;
[0009] Step 4: After receiving the test data, the security chip performs encryption processing and returns the encrypted data to the communication module;
[0010] Step 5: The communication module verifies the returned encrypted data. If the verification passes, the first baud rate is determined as the current communication baud rate; if the verification fails, the baud rate is reduced to the second baud rate and Steps 3 to 5 are repeated until the verification passes or the preset minimum baud rate threshold is reached.
[0011] Step 6: Complete the data transmission between the communication module and the security chip through the finally determined baud rate.
[0012] As a further improvement of the present invention, the initial baud rate is 9600 baud.
[0013] As a further improvement of the present invention, in Step 3, the first baud rate is 921600 baud, the second baud rate is 460800 baud, and the baud rate adjustment step size is dynamically set according to hardware compatibility.
[0014] As a further improvement of the present invention, the test data is a fixed byte sequence, and the encryption process uses a symmetric encryption algorithm.
[0015] As a further improvement of the present invention, in Step 5, the condition for passing the verification is that the encrypted data received continuously for multiple times is consistent with the expected result and no timeout occurs.
[0016] As a further improvement of the present invention, the baud rate adaptation mode is triggered by a specific protocol instruction, and the protocol instruction includes adaptation parameters and a timeout threshold.
[0017] As a further improvement of the present invention, after the communication module and the security chip are replaced, the method automatically re-executes the baud rate adaptation process without manual intervention and software update.
[0018] An electronic device includes a communication module and a security chip, and the device is configured to execute the baud rate adaptive remote download method as described above.
[0019] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the baud rate adaptive remote download method as described above.
[0020] Advantages of the present invention: Through the dynamic baud rate adaptive negotiation mechanism, the present invention automatically adapts the optimal baud rate when the communication module and the security chip are first connected, effectively eliminating compatibility problems caused by hardware differences, avoiding manual debugging and multi-version software management costs, and at the same time ensuring the optimal balance between communication stability and transmission efficiency through multi-level verification, significantly improving the reliability and maintenance convenience of remote download. Brief Description of the Drawings
[0021] Figure 1It is a schematic flowchart of a baud rate adaptive remote download method of the present invention. Detailed implementation manners
[0022] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0023] The present invention provides a baud rate adaptive remote download method, which is applied to data transmission between a communication module and a security chip, and includes the following steps:
[0024] Step 1: The communication module and the security chip establish a communication connection through an initial baud rate, and the initial baud rate is 9600 baud;
[0025] Step 2: The communication module sends a baud rate negotiation request to the security chip, triggering both parties to enter the baud rate adaptation mode. The baud rate adaptation mode is triggered by a specific protocol instruction, and the protocol instruction includes adaptation parameters and a timeout threshold;
[0026] Step 3: The communication module sends test data to the security chip at a preset first baud rate. The test data is a fixed byte sequence, and the encryption process uses a symmetric encryption algorithm;
[0027] Step 4: After receiving the test data, the security chip performs encryption processing and returns the encrypted data to the communication module;
[0028] Step 5: The communication module verifies the returned encrypted data. If the verification passes, the first baud rate is determined as the current communication baud rate; if the verification fails, the baud rate is reduced to a second baud rate and steps 3 to 5 are repeated until the verification passes or the preset minimum baud rate threshold is reached;
[0029] Step 6: Complete the data transmission between the communication module and the security chip through the finally determined baud rate.
[0030] In step 3 of the present invention, the first baud rate is 921600 baud, the second baud rate is 460800 baud, and the baud rate adjustment step size is dynamically set according to hardware compatibility.
[0031] In step 5 of the present invention, the condition for passing the verification is that the encrypted data received continuously for multiple times is consistent with the expected result and no timeout occurs.
[0032] After the communication module and the security chip are replaced, the method of the present invention automatically re-executes the baud rate adaptation process without manual intervention and software update.
[0033] An electronic device includes a communication module and a security chip, and the device is configured to execute the baud rate adaptive remote download method as described above.
[0034] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the baud rate adaptive remote download method as described above.
[0035] Embodiment:
[0036] (I) Hardware configuration
[0037] Communication module: A 4G communication module with the model number SIM7600 is adopted, supporting the TCP / IP protocol stack.
[0038] Security chip: A security encryption chip with the model number ATECC608A is selected, supporting the AES-128 symmetric encryption algorithm.
[0039] Initial baud rate: 9600 baud.
[0040] (II) Baud rate adaptation process
[0041] Step 1, Establish initial connection:
[0042] The communication module and the security chip establish a serial communication connection at 9600 baud rate to ensure compatibility at the lowest rate.
[0043] Step 2, Trigger baud rate adaptation mode:
[0044] The communication module sends the protocol instruction 0xAA 0x55 0x01 (including adaptation parameters: maximum number of attempts 3 times, timeout threshold 500 ms). After receiving the instruction, the security chip replies with the confirmation signal 0xAA 0x55 0xACK, and both parties enter the baud rate adaptation mode.
[0045] Step 3, Test data transmission:
[0046] The communication module switches to 921600 baud rate and sends the fixed test data 0x01 0x02 0x03 0x04 0x05 to the security chip.
[0047] Step 4, Data encryption and return:
[0048] After receiving the data, the security chip encrypts it using the AES-128 algorithm to generate the ciphertext 0x8A 0x9B 0xC7 0xD2 0xE6 and returns it to the communication module at 921600 baud rate.
[0049] Step 5, Data verification and baud rate adjustment:
[0050] Scenario of successful verification: After the communication module decrypts the returned data and compares it with the original data, if the decryption results of the ciphertext received continuously for 3 times are all consistent with the test data and there is no timeout, it is confirmed that the baud rate of 921600 is the effective baud rate, and subsequent communications will be carried out at this rate.
[0051] Scenario of failed verification: If a certain verification fails (such as data mismatch or timeout), the communication module will reduce the baud rate to 460800, and repeat steps three to five. If it fails again, continue to adjust the baud rate in steps (such as decreasing by half speed) until the lowest threshold (such as 9600 baud) is reached or the verification is successful.
[0052] Step six, data transmission stage:
[0053] After finally determining that the baud rate is 921600, the communication module downloads the firmware data from the server and stably transmits it to the security chip at this baud rate to complete the remote update.
[0054] (3) Verification of hardware replacement scenario
[0055] Replace the communication module: Replace SIM7600 with the communication module of model EC200T. The baud rate adaptation process is automatically triggered during the first connection. After testing, the two parties negotiate and select 614400 baud rate as the optimal rate.
[0056] Replace the security chip: Replace ATECC608A with model ATECC508A. During the adaptation process, it is determined through dynamic adjustment that 460800 baud rate is the stable rate.
[0057] Result: Without modifying the software configuration or manual intervention, the new hardware combination can still automatically adapt the baud rate to ensure communication stability.
[0058] As can be seen from the above embodiments, the method of the present invention effectively solves the compatibility problem after hardware replacement. When replacing the communication module or the security chip, there is no need to perform cumbersome updates on the software version or manually adjust the baud rate. The system automatically executes the baud rate adaptation process to quickly find and apply the optimal baud rate. This not only improves the stability and efficiency of communication, but also greatly reduces the cost of manual intervention and software management. In addition, through the multi-level verification mechanism, the accuracy and reliability of data transmission are ensured, and communication failures or data loss problems caused by baud rate mismatch are avoided.
[0059] Therefore, for the baud rate adaptive remote download method of the present invention, whether the communication module is replaced with a different model or the security chip is upgraded or replaced, this method can automatically trigger the baud rate adaptation process, and can quickly determine and apply the optimal baud rate without manual intervention. This feature greatly improves the compatibility and communication stability after hardware replacement, bringing great convenience to users. In addition, the baud rate adaptive remote download method of the present invention also ensures the accuracy and reliability of data transmission through a multi-level verification mechanism. During the baud rate adaptation process, by continuously receiving encrypted data multiple times and performing verification, it effectively avoids communication failures or data loss problems caused by baud rate mismatches. This not only improves the efficiency of data transmission, but also further enhances the reliability and security of the system.
[0060] In summary, the baud rate adaptive remote download method of the present invention has significant superiority and practicality in the hardware replacement scenario, can effectively solve the compatibility problems caused by hardware differences, improve communication stability and efficiency, reduce manual intervention and the cost of software management. At the same time, through the multi-level verification mechanism, it ensures the accuracy and reliability of data transmission, providing strong technical support for the wide application of the remote download function.
[0061] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A baud rate adaptive remote download method, which is applied to data transmission between a communication module and a security chip, and is characterized in that, It includes the following steps: Step 1: The communication module establishes a communication connection with the security chip through the initial baud rate; Step 2: The communication module sends a baud rate negotiation request to the security chip, triggering both sides to enter the baud rate adaptation mode; Step 3: The communication module sends test data to the security chip at a preset first baud rate; Step 4: After receiving the test data, the security chip performs encryption processing and returns the encrypted data to the communication module; Step 5: The communication module verifies the returned encrypted data. If the verification passes, the first baud rate is determined as the current communication baud rate; if the verification fails, the baud rate is reduced to the second baud rate and steps 3 to 5 are repeated until the verification passes or the preset minimum baud rate threshold is reached; Step 6: Complete the data transmission between the communication module and the security chip through the finally determined baud rate.
2. The remote download method with baud rate self - adaptation according to claim 1, characterized in that, The initial baud rate is 9600 baud.
3. A baud rate adaptive remote download method according to claim 1, characterized in that, In step 3, the first baud rate is 921600 baud, the second baud rate is 460800 baud, and the baud rate adjustment step size is dynamically set according to hardware compatibility.
4. A baud rate adaptive remote download method according to claim 1, characterized in that, The test data is a fixed byte sequence, and the encryption processing uses a symmetric encryption algorithm.
5. A baud rate adaptive remote download method according to claim 1, characterized in that, In step 5, the condition for passing the verification is that the encrypted data received continuously for multiple times is consistent with the expected result and no timeout occurs.
6. A baud rate adaptive remote download method according to claim 1, characterized in that, The baud rate adaptation mode is triggered by a specific protocol instruction, and the protocol instruction includes adaptation parameters and a timeout threshold.
7. A baud rate adaptive remote download method according to claim 1, characterized in that, After the communication module and the security chip are replaced, the method automatically re-executes the baud rate adaptation process without manual intervention or software update.
8. An electronic device, comprising a communication module and a security chip, characterized in that, The device is configured to execute the baud rate adaptive remote download method according to any one of claims 1-7.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the baud rate adaptive remote download method according to any one of claims 1-7.