Flash control method based on LIN communication protocol and UDS transmission protocol

By writing control methods based on the LIN communication protocol and UDS transmission protocol, the problem of not matching the vehicle controller brushing in the writing of the vehicle controller is solved, the efficient and accurate brush writing process is realized, and the reliability and flexibility of the system is improved.

CN119376745AInactive Publication Date: 2025-01-28SHANGHAI TURING ELECTRONIC & SCI TECH CO LTD

Patent Information

Application Number
CN202411918608.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

At this stage, when flashing the vehicle controller, it is easy to use unofficial flashing files or mismatched versions of flashing files, resulting in functional failure or performance degradation.

Method used

Using a brush control method based on the LIN communication protocol and UDS transmission protocols, through the version information of the vehicle controller, find the corresponding brush file, and execute the UDS brush to ensure that the brush file matches the version of the vehicle controller.

Benefits of technology

The vehicle controller is achieved efficient and accurate writing, avoiding the problem of function failure and decline in performance, and improved the flexibility and reliability of brushing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376745A_ABST
    Figure CN119376745A_ABST
Patent Text Reader

Abstract

The invention discloses a flashing control method based on an LIN communication protocol and a UDS transmission protocol, relates to the field of automobile electronic control, solves the problem that efficient and accurate flashing cannot be carried out on a vehicle controller, and comprises the steps that the vehicle controller is connected with a flashing switch box through an LIN bus, and then the connection condition of the vehicle controller and the flashing switch box is judged; before flashing, the flashing switch box reads version information corresponding to the vehicle controller, searches a corresponding flashing file through the flashing database, and takes the corresponding flashing file as the flashing file corresponding to the vehicle controller; the flashing switch box executes UDS flashing for the vehicle controller according to the flashing file of the vehicle controller; after flashing, the flashing switch box reads version information corresponding to the vehicle controller, judges the UDS flashing condition of the vehicle controller and generates a flashing success signal or a flashing failure signal; and the user judges whether to re-execute the flashing process or not. According to the invention, efficient and accurate flashing of the vehicle controller is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of automobile electronic control, and in particular relates to a flash writing control method based on a LIN communication protocol and a UDS transmission protocol. Background Art

[0002] LIN communication protocol is a low-cost serial communication protocol, mainly used for data exchange between electronic control units inside automobiles; LIN protocol is based on ISO 17987 standard, which defines a master-slave communication network with only one master node and multiple slave nodes; UDS protocol belongs to application layer protocol, which can communicate based on a variety of automobile buses; UDS protocol stack mainly consists of two parts: network layer and application layer. The network layer is responsible for solving the data length mismatch problem between the data link layer and the application layer, and defines the single-frame and multi-frame transmission mechanism, while the application layer serves as the transmission mechanism for confirmation messages to ensure the reliability of communication and the integrity of data; The flashing process of combining LIN communication protocol with UDS transmission protocol can improve the flexibility and reliability of flashing control, and also reduce development and maintenance costs; However, at present, when flashing the vehicle controller, the user or 4S shop usually downloads a unified flash file and performs the flash operation. At this time, there will be problems such as using unofficial flash files or the version information of the flash file version does not match, which will be incompatible with other systems in the target vehicle, resulting in functional failure or performance degradation; To this end, the present invention proposes a flash control method based on the LIN communication protocol and the UDS transmission protocol. Summary of the invention

[0003] The purpose of the present invention is to propose a flash control method based on the LIN communication protocol and the UDS transmission protocol to solve the problem of being unable to flash the vehicle controller efficiently and accurately as mentioned in the above background technology.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions: The flash writing control method based on the LIN communication protocol and the UDS transmission protocol includes the following steps: Step S1, obtaining a vehicle controller corresponding to a target vehicle, connecting the vehicle controller to a flashing switch box via a LIN bus, and then determining the connection status between the vehicle controller and the flashing switch box; Step S2, before flashing, the flashing switch box reads the version information corresponding to the vehicle controller, and then searches for the corresponding flashing file through the flashing database, and uses it as the flashing file corresponding to the vehicle controller; Step S3, the flashing switch box performs UDS flashing for the vehicle controller according to the flashing file of the vehicle controller; Step S4, after flashing, the flashing switch box reads the version information corresponding to the vehicle controller, and determines the UDS flashing status of the vehicle controller, and generates a flashing success signal or a flashing failure signal; Step S5, receiving a flash success signal or a flash failure signal corresponding to the vehicle controller, and the user knows the status of the vehicle controller based on the flash success signal or the flash failure signal; if it is a flash failure signal, the user determines whether to re-execute the flash process.

[0005] Furthermore, the step S1 includes the following sub-steps: Step S11, obtaining the model of the target vehicle, and reading the location of the corresponding vehicle controller according to the model of the target vehicle; Step S12, selecting a LIN connection line, and connecting the LIN connection line to the LIN interface of the vehicle controller and the LIN interface of the flash switch box respectively; Step S13, initialize LIN communication, use a LIN communication initialization tool to set LIN bus related parameters.

[0006] Furthermore, the step S1 further includes: Step S14, sending a test message to the vehicle controller by flashing the switch box; and then receiving a response message sent by the vehicle controller; Step S15, match the response information with the expected response information. If the match is successful, the LIN bus connection is deemed normal; if the match fails, the LIN bus connection is deemed abnormal. Check whether the LIN connection line, vehicle controller and LIN interface of the flash switch box are damaged or loose, and reconnect them.

[0007] Furthermore, the UDS flashing in step S3 is divided into a first UDS flashing, a second UDS flashing and a third UDS flashing.

[0008] Furthermore, the first UDS flashing specifically includes the following sub-steps: Step S311, obtaining the real-time session state of the vehicle controller, and if the real-time session state is not an extended session, adjusting the real-time session state to an extended session; Among them, the real-time session status of the vehicle controller includes three states: default session, extended session and programming session; Step S312: if the real-time session state is an extended session, proceed to the next step; Step S313, obtaining vehicle information of the target vehicle, determining the ignition status and driving status of the target vehicle, if any one of the ignition status and driving status of the target vehicle does not meet the flashing requirement, adjusting the ignition status and driving status of the target vehicle; if both the ignition status and driving status of the target vehicle meet the flashing requirement, proceeding to the next step; Step S314, if the network communication function of the vehicle controller is turned off, the fault code diagnosis function of the vehicle controller is turned off.

[0009] Furthermore, the second UDS flashing includes the following sub-steps: Step S321, reading the real-time session state of the vehicle controller, and adjusting the real-time session state of the vehicle controller from the expansion session to the programming session; Step S322, the flash switch box requests a security authentication seed from the vehicle controller. After receiving the request, the vehicle controller generates a security authentication seed and sends it to the flash switch box; the security authentication seed is a random number or a specific data sequence; Step S323, the flashing switch box receives the security authentication seed, calculates the authentication key according to an algorithm known to both parties and sends the authentication key to the vehicle controller; the vehicle controller receives the authentication key and compares it with the standard key.

[0010] Furthermore, the second UDS flashing further includes: Step S324, if the authentication key is the same as the standard key, the switch box authentication is deemed to be successful; if the authentication key is different from the standard key, the switch box authentication is deemed to have failed; if the authentication fails for multiple times in a row, the vehicle controller will suspend service for a period of time; Step S325, reading the area where the vehicle controller corresponds to the memory, and then erasing the existing data in the area where the memory is located; The operation code is: 31 01 FF 00 erase start address erase length; where 31 is the service identifier, indicating routine control service; 01 is the sub-function identifier, indicating normal operation; FF 00 indicates erase memory operation; Step S326, the flashing switch box sends the size of the flashing file to the vehicle controller, and the vehicle controller sends a download request instruction to the flashing switch box; The operation code is: 34 00 44 memory address flash file size; 34 is the service identifier, indicating a request for download service; 00 is the data format identifier, indicating general flash; 44 is the address and length format identifier, indicating that the memory size and address each occupy 4 bytes.

[0011] Furthermore, the second UDS flashing further includes: Step S327, the flash switch box sends the flash file to the vehicle controller, and saves the flash file to the specified memory address until the data transmission is completed; The operation code is: 36 XX data; 36 is the service identifier, indicating the data transmission service; XX is the data block sequence counter, indicating which data block is currently being sent; Step S328, executing the authentication determination operation shown in step S324, if the authentication is passed, exiting the data transmission; if the authentication fails, re-execute steps S325 to S327; Step S329, after the flashing is completed, the vehicle controller is reset to make the flashing file effective; The operation code is: 11 01; 11 is the service identifier, indicating the reset service; 01 is the sub-function identifier, indicating the hardware reset.

[0012] Furthermore, the third UDS flashing includes the following sub-steps: Step S331, obtaining the real-time session state of the vehicle controller, and adjusting the real-time session state of the vehicle controller from the programming session to the extended session; Step S332, enabling the network communication function of the vehicle controller and enabling the fault code diagnosis function of the vehicle controller; Step S333, adjusting the real-time session state of the vehicle controller from the extended session to the default session, completing the flashing process.

[0013] Furthermore, the step S4 includes the following sub-steps: Step S41, obtaining version information corresponding to the vehicle controller, and comparing the version information of the vehicle controller with the version information corresponding to the flash file; Step S42, if the version information corresponding to the vehicle controller is the same as the version information corresponding to the flash file, a flash success signal is generated; Step S43: If any item of the version information corresponding to the vehicle controller is different from the version information corresponding to the flash file, a flash failure signal is generated.

[0014] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: The present invention first obtains a vehicle controller corresponding to a target vehicle, connects the vehicle controller to a flashing switch box through a LIN bus, and determines the connection status between the vehicle controller and the flashing switch box; then before flashing, the flashing switch box reads the version information corresponding to the vehicle controller, searches for the corresponding flashing file through a flashing database, and uses it as the flashing file corresponding to the vehicle controller; and further, the flashing switch box executes UDS flashing for the vehicle controller according to the flashing file of the vehicle controller; in addition, after flashing, the flashing switch box reads the version information corresponding to the vehicle controller, and determines the UDS flashing status of the vehicle controller, and generates a flashing success signal or a flashing failure signal; finally, the flashing success signal or the flashing failure signal corresponding to the vehicle controller is received, and the user learns the status of the vehicle controller according to the flashing success signal or the flashing failure signal; if it is a flashing failure signal, the user determines whether to re-execute the flashing process; the present invention realizes efficient and accurate flashing of the vehicle controller. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0016] Figure 1 It is a schematic diagram of the method flow of the present invention; Figure 2 It is a schematic diagram of the process of flashing the first UDS in the present invention; Figure 3 It is a schematic diagram of the process of flashing the second UDS in the present invention; Figure 4 It is a schematic diagram of the process of flashing the third UDS in the present invention; Figure 5 It is a schematic diagram of the structure of the computer device in the present invention. DETAILED DESCRIPTION

[0017] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Embodiment 1:

[0018] See also Figure 1 - Figure 4 As shown, the technical solution provided by the present invention is: a flash control method based on the LIN communication protocol and the UDS transmission protocol. The LIN communication protocol is a network protocol used for internal communication in a car, which adopts a single-line transmission form; the full name of the UDS transmission protocol is the application layer protocol of the unified diagnostic service, which standardizes the flash process based on the Bootloader; The method of the present invention is applied to the scenario where a flash switch box flashes files to a vehicle controller. The flash control method based on the LIN communication protocol and the UDS transmission protocol is as follows: Step S1, obtaining a vehicle controller corresponding to a target vehicle, connecting the vehicle controller to a flashing switch box via a LIN bus, and then determining the connection status between the vehicle controller and the flashing switch box; The step S1 includes the following sub-steps: Step S11, obtaining the model of the target vehicle, and reading the location of the corresponding vehicle controller according to the model of the target vehicle; Step S12, selecting a LIN connection line, and connecting the LIN connection line to the LIN interface of the vehicle controller and the LIN interface of the flash switch box respectively; Step S13, initializing LIN communication, using a LIN communication initialization tool to set LIN bus related parameters; specifically, the LIN bus related parameters are the baud rate, message format, etc. of the LIN bus; Step S14, sending a test message to the vehicle controller by flashing the switch box; and then receiving a response message sent by the vehicle controller; specifically, the test message can be a simple LIN frame including a specific identifier and a data field; Step S15, matching the response information with the expected response information, if the match is successful, it is determined that the LIN bus connection is normal; if the match fails, it is determined that the LIN bus connection is abnormal, and the LIN connection line, the vehicle controller and the LIN interface of the flash switch box are checked for damage or looseness, and reconnected; Step S2, before flashing, the flashing switch box reads the version information corresponding to the vehicle controller, and then searches for the corresponding flashing file through the flashing database, and uses it as the flashing file corresponding to the vehicle controller; The version information specifically includes the software version number, VIN version and hardware version of the vehicle controller; the flash file refers to the file used to write new program code or data to the device storage medium during the firmware or software update process.

[0019] Step S3, the flashing switch box performs UDS flashing for the vehicle controller according to the flashing file of the vehicle controller; In the present invention, UDS flashing is divided into three major processes, which are respectively recorded as the first UDS flashing, the second UDS flashing and the third UDS flashing; In this embodiment, the first UDS flashing includes the following sub-steps: Step S311, obtaining the real-time session state of the vehicle controller, and if the real-time session state is not an extended session, adjusting the real-time session state to an extended session; Among them, the real-time session status of the vehicle controller includes three states: default session, extended session and programming session; Step S312: If the real-time session state is an extended session, proceed to the next step; Step S313, obtaining vehicle information of the target vehicle, determining the ignition status and driving status of the target vehicle, if any one of the ignition status and driving status of the target vehicle does not meet the flashing requirement, adjusting the ignition status and driving status of the target vehicle; if both the ignition status and driving status of the target vehicle meet the flashing requirement, proceeding to the next step; The flashing requirement is specifically: the ignition status of the target vehicle is in the IGN ON state and the target vehicle is stationary, that is, the speed of the target vehicle is zero; Step S314, if the network communication function of the vehicle controller is turned off, the fault code diagnosis function of the vehicle controller is turned off.

[0020] In this embodiment, the second UDS flashing includes the following sub-steps: Step S321, reading the real-time session state of the vehicle controller, and adjusting the real-time session state of the vehicle controller from the expansion session to the programming session; Step S322, the flash switch box requests a security authentication seed from the vehicle controller. After receiving the request, the vehicle controller generates a security authentication seed and sends it to the flash switch box; the security authentication seed is a random number or a specific data sequence; Step S323, the flashing switch box receives the security authentication seed, calculates the authentication key according to the algorithm known to both parties and sends the authentication key to the vehicle controller; the vehicle controller receives the authentication key and compares it with the standard key; optionally, the algorithm known to both parties may be an AES encryption algorithm AES or an RSA encryption algorithm; Step S324, if the authentication key is the same as the standard key, the switch box authentication is deemed to have passed; if the authentication key is different from the standard key, the switch box authentication is deemed to have failed; if the authentication fails for multiple times in a row, the vehicle controller will suspend service for a period of time; Specifically, each time the authentication fails, the security access failure counter of the vehicle controller will increase by 1. When the number of errors reaches 3, a negative response code of the number of attempts exceeded will be received, and a delay of 10 seconds will be received. Within 10 seconds, the request will receive a negative response code of the delay time not expired, and the authentication request can be initiated again after 10 seconds; Step S325, reading the area where the vehicle controller corresponds to the memory, and then erasing the existing data in the area where the memory is located; when specifically implemented, it is realized through the erase memory function in the routine control service ($31) provided in the vehicle controller; The specific operation code is: 31 01 FF 00 erase start address erase length; where 31 is the service identifier, indicating routine control service; 01 is the sub-function identifier, indicating normal operation; FF 00 indicates erase memory operation; Step S326, the flashing switch box sends the size of the flashing file to the vehicle controller, and the vehicle controller sends a download request instruction to the flashing switch box; The specific operation code is: 34 00 44 memory address flash file size; 34 is the service identifier, indicating a request for download service; 00 is the data format identifier, indicating a general flash (no compression or encryption); 44 is the address and length format identifier, indicating that the memory size and address each occupy 4 bytes; Step S327, the flash switch box sends the flash file to the vehicle controller, and saves the flash file to the specified memory address until the data transmission is completed; The specific operation code is: 36 XX data; 36 is the service identifier, indicating the data transmission service; XX is the data block sequence counter, indicating which data block is currently being sent; Step S328, executing the authentication determination operation shown in step S324, if the authentication is passed, exiting the data transmission; if the authentication fails, re-execute steps S325 to S327; Step S329, after the flashing is completed, the vehicle controller is reset to make the flashing file effective; The specific operation code is: 11 01; 11 is the service identifier, indicating reset service; 01 is the sub-function identifier, indicating hardware reset; In this embodiment, the third UDS flashing includes the following sub-steps: Step S331, obtaining the real-time session state of the vehicle controller, and adjusting the real-time session state of the vehicle controller from the programming session to the extended session; Step S332, enabling the network communication function of the vehicle controller and enabling the fault code diagnosis function of the vehicle controller; Step S333, adjusting the real-time session state of the vehicle controller from the extended session to the default session, completing the flashing process.

[0021] Step S4, after flashing, the flashing switch box reads the version information corresponding to the vehicle controller, and determines the UDS flashing status of the vehicle controller, and generates a flashing success signal or a flashing failure signal; The step S4 includes the following sub-steps: Step S41, obtaining version information corresponding to the vehicle controller, and comparing the version information of the vehicle controller with the version information corresponding to the flash file; Step S42, if the version information corresponding to the vehicle controller is the same as the version information corresponding to the flash file, a flash success signal is generated; Step S43: If any item of the version information corresponding to the vehicle controller is different from the version information corresponding to the flash file, a flash failure signal is generated.

[0022] Step S5, receiving a flash success signal or a flash failure signal corresponding to the vehicle controller, and the user knows the status of the vehicle controller based on the flash success signal or the flash failure signal; if it is a flash failure signal, the user determines whether to re-execute the flash process.

[0023] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value. Embodiment 2:

[0024] Figure 5 The schematic diagram of the structure of a computer device is illustrated. The computer device may include: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The processor can call the logic instructions in the memory to execute the flash control method based on the LIN communication protocol and the UDS transmission protocol, the method including: obtaining the vehicle controller corresponding to the target vehicle, connecting the vehicle controller to the flash switch box through the LIN bus, and then judging the connection status between the vehicle controller and the flash switch box; before flashing, the flash switch box reads the version information corresponding to the vehicle controller, and then searches for the corresponding flash file through the flash database, and uses it as the flash file corresponding to the vehicle controller; the flash switch box executes UDS flashing for the vehicle controller according to the flash file of the vehicle controller; after flashing, the flash switch box reads the version information corresponding to the vehicle controller, and judges the UDS flash status of the vehicle controller, and generates a flash success signal or a flash failure signal; receives the flash success signal or the flash failure signal corresponding to the vehicle controller, and the user knows the status of the vehicle controller according to the flash success signal or the flash failure signal; if it is a flash failure signal, the user judges whether to re-execute the flash process.

[0025] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0026] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the flash control method based on the LIN communication protocol and the UDS transmission protocol provided by the above methods, and the method includes: obtaining a vehicle controller corresponding to the target vehicle, connecting the vehicle controller to a flash switch box through a LIN bus, and then judging the connection status between the vehicle controller and the flash switch box; before flashing, the flash switch box reads the version information corresponding to the vehicle controller, and then searches for the corresponding flash file through a flash database, and uses it as the flash file corresponding to the vehicle controller; the flash switch box executes UDS flashing for the vehicle controller according to the flash file of the vehicle controller; after flashing, the flash switch box reads the version information corresponding to the vehicle controller, and judges the UDS flash status of the vehicle controller, and generates a flash success signal or a flash failure signal; receiving the flash success signal or the flash failure signal corresponding to the vehicle controller, and the user knows the status of the vehicle controller according to the flash success signal or the flash failure signal; if it is a flash failure signal, the user judges whether to re-execute the flash process.

[0027] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned flash control methods based on the LIN communication protocol and the UDS transmission protocol, the method comprising: obtaining a vehicle controller corresponding to the target vehicle, connecting the vehicle controller to a flash switch box via a LIN bus, and then determining the connection status between the vehicle controller and the flash switch box; before flashing, the flash switch box reads the version information corresponding to the vehicle controller, and then searches for the corresponding flash file through a flash database, and uses it as the flash file corresponding to the vehicle controller; the flash switch box executes UDS flashing for the vehicle controller based on the flash file of the vehicle controller; after flashing, the flash switch box reads the version information corresponding to the vehicle controller, and determines the UDS flashing status of the vehicle controller, and generates a flashing success signal or a flashing failure signal; receiving the flashing success signal or the flashing failure signal corresponding to the vehicle controller, and the user learns the status of the vehicle controller based on the flashing success signal or the flashing failure signal; if it is a flashing failure signal, the user determines whether to re-execute the flashing process.

[0028] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0029] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0030] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. 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. However, 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 embodiments of the present application.

Claims

1. A flash control method based on LIN communication protocol and UDS transmission protocol, characterized in that: The flash control method includes the following steps: Step S1, obtaining a vehicle controller corresponding to a target vehicle, connecting the vehicle controller to a flashing switch box via a LIN bus, and then determining the connection status between the vehicle controller and the flashing switch box; Step S2, before flashing, the flashing switch box reads the version information corresponding to the vehicle controller, and then searches for the corresponding flashing file through the flashing database, and uses it as the flashing file corresponding to the vehicle controller; Step S3, the flashing switch box performs UDS flashing for the vehicle controller according to the flashing file of the vehicle controller; Step S4, after flashing, the flashing switch box reads the version information corresponding to the vehicle controller, and determines the UDS flashing status of the vehicle controller, and generates a flashing success signal or a flashing failure signal; Step S5, receiving a flashing success signal or a flashing failure signal corresponding to the vehicle controller, and the user learns the status of the vehicle controller according to the flashing success signal or the flashing failure signal; If it is a flash failure signal, the user determines whether to re-execute the flash process.

2. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 1 is characterized in that: The step S1 includes the following sub-steps: Step S11, obtaining the model of the target vehicle, and reading the location of the corresponding vehicle controller according to the model of the target vehicle; Step S12, selecting a LIN connection line, and connecting the LIN connection line to the LIN interface of the vehicle controller and the LIN interface of the flash switch box respectively; Step S13, initialize LIN communication, use a LIN communication initialization tool to set LIN bus related parameters.

3. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 2 is characterized in that: The step S1 further comprises: Step S14, sending a test message to the vehicle controller by flashing the switch box; and then receiving a response message sent by the vehicle controller; Step S15, match the response information with the expected response information. If the match is successful, the LIN bus connection is deemed normal; if the match fails, the LIN bus connection is deemed abnormal. Check whether the LIN connection line, vehicle controller and LIN interface of the flash switch box are damaged or loose, and reconnect them.

4. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 1 is characterized in that: The UDS flashing in step S3 is divided into a first UDS flashing, a second UDS flashing and a third UDS flashing.

5. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 4 is characterized in that: The first UDS flashing specifically includes the following sub-steps: Step S311, obtaining the real-time session state of the vehicle controller, and if the real-time session state is not an extended session, adjusting the real-time session state to an extended session; Among them, the real-time session status of the vehicle controller includes three states: default session, extended session and programming session; Step S312: if the real-time session state is an extended session, proceed to the next step; Step S313, obtaining vehicle information of the target vehicle, determining the ignition status and driving status of the target vehicle, if any one of the ignition status and driving status of the target vehicle does not meet the flashing requirement, adjusting the ignition status and driving status of the target vehicle; if both the ignition status and driving status of the target vehicle meet the flashing requirement, proceeding to the next step; Step S314, if the network communication function of the vehicle controller is turned off, the fault code diagnosis function of the vehicle controller is turned off.

6. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 4 is characterized in that: The second UDS flashing includes the following sub-steps: Step S321, reading the real-time session state of the vehicle controller, and adjusting the real-time session state of the vehicle controller from the expansion session to the programming session; Step S322, the flash switch box requests a security authentication seed from the vehicle controller, and after receiving the request, the vehicle controller generates a security authentication seed and sends it to the flash switch box; The security authentication seed is a random number or a specific data sequence; Step S323, the flashing switch box receives the security authentication seed, calculates the authentication key according to an algorithm known to both parties and sends the authentication key to the vehicle controller; the vehicle controller receives the authentication key and compares it with the standard key.

7. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 6 is characterized in that: The second UDS flashing also includes: Step S324, if the authentication key is the same as the standard key, the switch box authentication is deemed to be successful; if the authentication key is different from the standard key, the switch box authentication is deemed to have failed; if the authentication fails for multiple times in a row, the vehicle controller will suspend service for a period of time; Step S325, reading the area where the vehicle controller corresponds to the memory, and then erasing the existing data in the area where the memory is located; Step S326, the flash switch box sends the size of the flash file to the vehicle controller, and the vehicle controller sends a download request instruction to the flash switch box.

8. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 7 is characterized in that: The second UDS flashing also includes: Step S327, the flash switch box sends the flash file to the vehicle controller, and saves the flash file to the specified memory address until the data transmission is completed; Step S328, executing the authentication determination operation shown in step S324, if the authentication is passed, exiting the data transmission; if the authentication fails, re-execute steps S325 to S327; Step S329, the flashing is completed, and the vehicle controller reset operation is executed to make the flashing file effective.

9. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 4, characterized in that: The third UDS flashing includes the following sub-steps: Step S331, obtaining the real-time session state of the vehicle controller, and adjusting the real-time session state of the vehicle controller from the programming session to the extended session; Step S332, enabling the network communication function of the vehicle controller and enabling the fault code diagnosis function of the vehicle controller; Step S333, adjusting the real-time session state of the vehicle controller from the extended session to the default session, completing the flashing process.

10. The flash control method based on LIN communication protocol and UDS transmission protocol according to claim 1, characterized in that: The step S4 includes the following sub-steps: Step S41, obtaining version information corresponding to the vehicle controller, and comparing the version information of the vehicle controller with the version information corresponding to the flash file; Step S42, if the version information corresponding to the vehicle controller is the same as the version information corresponding to the flash file, a flash success signal is generated; Step S43: If any item of the version information corresponding to the vehicle controller is different from the version information corresponding to the flash file, a flash failure signal is generated.

Citation Information

Patent Citations

  • Automobile controller software flashing method and system based on UDS protocol and upper computer

    CN116661832A

  • Program upgrading method and device, VCU, program upgrading system and medium

    CN117111990A

  • Software flashing method and device of vehicle-mounted controller, electric vehicle and medium

    CN118484212A

  • Method and device for flashing LIN (Local Interconnect Network) slave node and electronic equipment

    CN118827274A

  • Vehicle module update, protection and diagnostics

    US20160197932A1

Cited By

  • SOVD protocol-based line brush service method and server

    CN119906707A