Method and system for automated testing of TBOX through UDS
Automatic testing is realized in TBOX through UDS protocol, and key verification and self-test are used to use MCU, 4G-LET module and TSP platform to perform key verification and self-test, solving the problem of low manual testing efficiency in the existing technology, improving detection efficiency and automation level, and reducing the degree of The cost.
Patent Information
- Application Number
- CN202210629060.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-06-06
AI Technical Summary
Existing TBOXs are usually tested manually when using UDS, which leads to inefficiency and is not conducive to repair and makes it difficult to respond to changes in demand quickly.
Through the UDS protocol, automated testing is achieved using MCU, 4G-LET module and TSP platform, including key verification, read voltage and current values, IO pin testing, special routine service testing, signal strength and position information acquisition, self-testing And output the test results.
It greatly improves the detection efficiency, reduces the cost of manual testing, and improves the comprehensiveness and automation of testing.
Smart Images

Figure CN115022223B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle networking, and in particular to a method and system for performing automatic testing of a TBOX through a UDS. Background Art
[0002] TBOX (telematics box, vehicle-mounted intelligent terminal) has a 4G wireless module, which provides data collection, remote query, control, detection and other services for the car. It is generally equipped with a USB interface to provide network signals to IVI (In-Vehicle Infotainment, vehicle-mounted information entertainment system), or a WIFI module to provide network signals to the equipment and personnel on the vehicle. Generally, the automated test of TBOX usually uses external interfaces such as USB and WIFI. However, when TBOX shields the USB and WIFI functions, the automated test of TBOX needs to use other external interfaces. The most common external interface on the car is the CAN bus. With the increasing degree of automobile electrification, network communication based on the CAN bus network is widely used in automotive electronic control units, and there are more and more scenarios using the UDS (Unified Diagnostics Services, unified diagnostic services) protocol, such as troubleshooting, offline learning, final inspection test and program flashing. Therefore, during the development process of automotive component products, detailed testing of the formulated protocols is required to ensure the use of these functions.
[0003] The actual application of the UDS protocol involves many services and customized contents, so test cases and test environments need to be manually written before testing. And when the requirements change, the completed preparations need to be manually modified repeatedly, which is not conducive to maintaining the improvement of diagnostic requirements. Summary of the invention
[0004] The purpose of the present invention is to provide a method and system for automatic testing of TBOX through UDS, so as to solve the technical problem that the existing TBOX testing through UDS is often carried out manually, resulting in low efficiency and inconvenience for maintenance. The preferred technical solutions among the many technical solutions provided by the present invention can produce many technical effects as described below.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] The present invention provides a method for performing automatic testing of a TBOX through a UDS, wherein the TBOX includes an MCU, a 4G-LET module, and a TSP platform connected in sequence, and the steps of performing automatic testing of the TBOX through the UDS are as follows:
[0007] S10, when the startup state of the 4G-LET module is startup, key verification is performed;
[0008] S20, verify whether the result is successful; if so, execute step S30; otherwise, return to step S10;
[0009] S30, the TBOX performs automatic testing;
[0010] S40, returning the automatic test result, and the automatic test ends.
[0011] Furthermore, step S10 includes the following steps:
[0012] S100, querying the startup status of the 4G-LET module;
[0013] S101: Is the 4G-LET module started? If yes, execute step S102; otherwise, return to step S100;
[0014] S102, storing the key and the key algorithm in the TSP platform;
[0015] S103, downloading the key and key algorithm to the MCU;
[0016] S104, the TSP platform and the MCU perform mutual authentication through the key and key algorithm;
[0017] S105: Obtain the verification result.
[0018] Further, step S30 includes the following steps:
[0019] S300, reading the voltage and current values of the TBOX, and obtaining the angle signal of the IMU and the real-time time of the RTC;
[0020] S301, write the vendor hardware version number and the production date of the TBOX;
[0021] S302, testing the IO pins of the TBOX;
[0022] S303: Test the special routine service of the TBOX.
[0023] Furthermore, step S30 further includes the following steps:
[0024] S304: Whether the IO pins and special routine services of the TBOX have passed the test; if so, execute step S305; otherwise, execute step S310;
[0025] S305, obtaining the signal strength, networking information, GPS signal strength, and location information of the 4G-LET module;
[0026] S306, writing the 4G-LET module version, sleep time and strategy, and remote control initial key;
[0027] S307, writing the key certificate and public and private VPN required for the TSP platform connection;
[0028] S308, requesting the TBOX to start self-test according to the written information, and returning the self-test result;
[0029] S309, executing step S40, outputting the self-test result as an automatic test result;
[0030] S310, executing step S40, outputting the IO pins and special routine service test results of the TBOX as automatic test results.
[0031] According to another aspect of the present invention, a system for performing automated testing of a TBOX through a UDS is provided, which is applied to the method for performing automated testing of a TBOX through a UDS described above, and is used to collect TBOX data of a vehicle and request the TBOX to perform a self-test, and includes a control module, a communication module, a positioning module, a voice module, a storage module, and a remote upgrade module; the communication module is connected to the control module, the positioning module, the voice module, the storage module, and the remote upgrade module; and the control module is connected to the TBOX.
[0032] Furthermore, the control module is connected to the MCU; the control module is used to store the key and the key algorithm on the TSP platform during the key verification process, download the key and the key algorithm to the MCU through the test equipment, request the TBOX self-check after the key verification is successful, and return the test result; the voice module is used to warn of abnormal conditions of the vehicle during the TBOX self-check process, and can obtain and display the current real-time position of the vehicle on the electronic map through the positioning module; the storage module is used to store the test results.
[0033] Furthermore, the communication module is also connected to the TSP platform for communication, and the remote upgrade module automatically upgrades the test software through the communication module and the TSP platform or the mobile terminal, and stores the upgrade package, diagnostic and log data through the storage module; the diagnostic and log data are used for data reissue or problem analysis.
[0034] Furthermore, the control module is a host computer or MCU.
[0035] Furthermore, the control module is connected to the MCU of the TBOX via a CAN bus or RS232, and communicates with the MCU via a UDS protocol.
[0036] Furthermore, the positioning module is a Beidou positioning module or a GPS positioning module; the storage module is an emmc memory
[0037] Implementing one of the above technical solutions of the present invention has the following advantages or beneficial effects:
[0038] The present invention requests automatic detection of the TBOX of a vehicle through a host computer based on the UDS protocol, and can perform a more comprehensive detection of the TBOX, greatly improving the detection efficiency and reducing the cost caused by manual detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. It is obvious that the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0040] Figure 1 This is a flow chart of a method for performing automated testing of a TBOX through UDS according to an embodiment of the present invention;
[0041] Figure 2 is a flowchart of step S10 in a method for performing automated testing of a TBOX through a UDS according to an embodiment of the present invention;
[0042] Figure 3 is a flow chart of step S30 in a method for performing automated testing of a TBOX through a UDS according to an embodiment of the present invention;
[0043] Figure 4 This is a structural diagram of a TBOX automatic testing system through UDS according to an embodiment of the present invention;
[0044] Figure 5 This is a connection relationship diagram between a TBOX automatic test system through UDS and a TBOB according to an embodiment of the present invention.
[0045] In the figure: 1. Control module; 2. Communication module; 3. Positioning module; 4. Voice module; 5. Storage module; 6. Remote upgrade module; 7. TBOX; 71. TSP platform; 72. 4G-LET module; 73. MCU. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the present invention clearer, the various exemplary embodiments to be described below will refer to the corresponding drawings, which constitute a part of the exemplary embodiments, wherein various exemplary embodiments that may be used to implement the present invention are described. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present disclosure. It should be understood that they are only examples of processes, methods, devices, etc. that are consistent with some aspects of the present disclosure as detailed in the attached claims, and other embodiments may also be used, or the embodiments listed herein may be modified in structure and function without departing from the scope and essence of the present invention.
[0047] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", etc. indicate the orientation or positional relationship based on the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the elements referred to must have a specific orientation, be constructed and operated in a specific orientation. The terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. The term "multiple" means two or more. The terms "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, an integral connection, a mechanical connection, an electrical connection, a communication connection, a direct connection, an indirect connection through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0048] In order to illustrate the technical solution of the present invention, a specific embodiment is used below for description, and only the parts related to the embodiment of the present invention are shown.
[0049] Embodiment 1:
[0050] like Figure 1-3 As shown, the present invention provides a method for performing automatic testing of a TBOX through a UDS, wherein the TBOX includes an MCU, a 4G-LET module, and a TSP platform connected in sequence, and the steps of performing automatic testing of the TBOX through the UDS are as follows:
[0051] S10, when the startup state of the 4G-LET module is startup, key verification is performed. The further steps are as follows:
[0052] S100, query the startup status of the 4G-LET module. Obtain whether the 4G-LET module is started through the control module (see the second embodiment below). The startup judgment method can be whether the upload and download data packets of the 4G-LET module are obtained. If the corresponding data packets are received, the 4G-LET module is successfully started;
[0053] S101, whether the 4G-LET module is started; if so, execute step S102; otherwise, return to step S100;
[0054] S102, storing the key and key algorithm on the TSP platform. The control module generates the key and key algorithm required for verification, and stores them on the TSP platform through the communication module in the second embodiment below, so as to be used for security authentication in the following steps;
[0055] S103, downloading the key and key algorithm to the MCU. The MCU downloads the stored key and key algorithm from the TSP platform;
[0056] S104, the TSP platform and the MCU perform mutual authentication through the key and key algorithm. After the MCU download is completed, the authentication process is automatically executed. The authentication process is an existing technology and will not be described in detail here;
[0057] S105, obtaining verification results. The control module obtains the corresponding verification results and starts the relevant self-checking program according to the verification results;
[0058] S20, whether the verification result is successful; if so, execute step S30; otherwise, return to step S10. In this step, if the control module obtains the verification result, it is considered that the verification is successful, if not, it is considered that the verification fails;
[0059] S30, TBOX performs automatic testing. Specifically, the TBOX automatic test data mainly includes two parts; the first part is the data related to the car (steps S300-303), and the second part is the data related to the 4G-LET module (such as 4G-LTE) and TSP platform (steps S304-310), and its detailed steps are as follows:
[0060] S300, read the voltage and current values of TBOX, obtain the angle signal of IMU (Inertial Measurement Unit) and the real-time time of RTC (Real_Time Clock). Specifically, after reading the voltage, determine whether the voltage is overvoltage or undervoltage, and after reading the current, determine whether the current is overcurrent, obtain IMU for further posture detection, and RTC is used for accurate timing. This step and the following steps are written by the control module through MCU, and the vehicle status information is obtained through the above data;
[0061] S301, write the vendor hardware version number and the production date of the TBOX, which is used to automatically detect the version of the TBOX;
[0062] S302, test the IO pins of TBOX. Specifically, test the IO pins by pulling them up (high potential) or pulling them down (low potential);
[0063] S303, test the special routine service of TBOX. Specifically, this step writes the SC code and SK code of TBOX, and writes and reads the SC and SK codes through corresponding instructions, i.e., testing;
[0064] S304, whether the IO pins and special routine services of TBOX have passed the test; if so, execute step S305; otherwise, execute step S310. Specifically, the condition for passing the special routine service test is that the SC and SK codes can be correctly written and read; if the IO pin test passes, it can be pulled up and down normally, and an external LED can be used to indicate the test result;
[0065] S305, obtain the signal strength, networking information (whether it is connected to the network), GPS signal strength, and location information of the 4G-LET module. This step is used to verify whether the 4G-LET module and GPS module are operating normally;
[0066] S306, write 4G-LET module version, sleep time and strategy, remote control initial key;
[0067] S307, write the key certificate and public and private VPN required for TSP platform connection. By writing the public key and VPN, the corresponding TSP platform can be accessed;
[0068] S308. According to the written information, request TBOX to start self-test and return the self-test result. The specific process of this step is: IO pin self-test, RTC time self-test, CAN bus self-test, MCU other peripheral self-test, 4G-LET module self-test;
[0069] S309, executing step S40, outputting the self-test result as the automatic test result;
[0070] S310, executing step S40, outputting the IO pins and special routine service test results of the TBOX as automatic test results.
[0071] S40, returning the automatic test result, and the automatic test ends.
[0072] It should be noted that the UDS protocol includes the UDS application layer (ISO14229-3), the CAN transport layer (ISO15765-2) and the CAN physical layer (connected to the CAN bus). The present invention requests the automatic detection of the TBOX of the vehicle through the host computer based on the UDS protocol, and can perform a more comprehensive detection of the TBOX, greatly improving the detection efficiency and reducing the cost and maintenance difficulties caused by manual detection.
[0073] Embodiment 2:
[0074] like Figure 4-5 As shown, a system for automatic testing of TBOX through UDS is applied to the method for automatic testing of TBOX through UDS described in Example 1, which is used to collect TBOX data of the vehicle and request TBOX to perform self-test, including control module 1, communication module 2, positioning module 3, voice module 4, storage module 5 and remote upgrade module. Specifically, communication module 2 is connected to control module 1, positioning module 3, voice module 4, storage module 5 and remote upgrade module, and control module 1 is connected to TBOX. Further, control module 1 is connected to MCU, and control module 1 is used to store the key and key algorithm on TSP platform during key verification, download the key and key algorithm to MCU through test equipment, request TBOX self-test after key verification is successful, and return test results; voice module 4 is used to warn of abnormal conditions of the vehicle during TBOX self-test, and can obtain and display the current real-time position of the vehicle on the electronic map through positioning module 3; storage module 5 is used to store the test results.
[0075] Furthermore, the communication module 2 is also connected to the TSP platform for communication. The remote upgrade module automatically upgrades the test software through the communication module 2 and the TSP platform or the mobile terminal, and stores the upgrade package, diagnostic and log data through the storage module 5; the diagnostic and log data are used for data reissue or problem analysis. The communication module 2 is a 4G communication module, a 5G communication module or an LTE communication module, the positioning module 3 is a Beidou positioning module or a GPS positioning module, and the storage module 5 is an emmc memory. Among them, the emmc memory can meet higher standards of performance, stability, ease of use and other user requirements. The control module 1 is a host computer or MCU. The control module 1 is connected to the MCU 73 of TBOX7 through a CAN bus or RS232, and communicates with the MCU 73 through the UDS protocol.
[0076] The above description is only the preferred embodiment of the present invention. It is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application belong to the protection scope of the present invention.
Claims
1. A method for automated testing of TBOX through UDS, characterized in that: The TBOX includes an MCU, a 4G-LET module, and a TSP platform which are connected in sequence. The steps of performing an automated test on the TBOX through the UDS are as follows: S10, when the startup state of the 4G-LET module is startup, key verification is performed; S20, verify whether the result is successful; if so, execute step S30; Otherwise, return to step S10; S30, the TBOX performs automatic testing; S40, returning the automatic test result, and the automatic test ends; Step S30 includes the following steps: S300, reading the voltage and current values of the TBOX, and obtaining the angle signal of the IMU and the real-time time of the RTC; S301, write the vendor hardware version number and the production date of the TBOX; S302, testing the IO pins of the TBOX; S303, testing the special routine service of the TBOX; S304, whether the IO pins and special routine services of the TBOX have passed the test; if so, execute step S305; otherwise, execute step S310; wherein, the condition for passing the special routine service test is that the SC and SK codes can be correctly written and read; if the IO pin test passes, it can be pulled up and down normally; S305, obtaining the signal strength, networking information, GPS signal strength, and location information of the 4G-LET module; S306, writing the version, sleep time and strategy, and remote control initial key of the 4G-LET module; S307, writing the key certificate and public and private VPN required for the TSP platform connection; S308. According to the written information, request the TBOX to start self-test and return the self-test result; the self-test process includes: IO pin self-test, RTC time self-test, MCU other peripheral self-test except IO pin, RTC, CAN bus, 4G-LET module self-test; S309, executing step S40, outputting the self-test result as an automatic test result; S310, executing step S40, outputting the IO pins and special routine service test results of the TBOX as automatic test results.
2. The method for automated testing of TBOX by UDS according to claim 1, characterized in that: Step S10 includes the following steps: S100, querying the startup status of the 4G-LET module; S101: Is the 4G-LET module started? If yes, execute step S102; Otherwise, return to step S100; S102, storing the key and the key algorithm in the TSP platform; S103, downloading the key and key algorithm to the MCU; S104, the TSP platform and the MCU perform mutual authentication through the key and key algorithm; S105: Obtain the verification result.
3. A system for automated testing of TBOX through UDS, characterized in that: The method for performing automated testing of a TBOX through a UDS according to any one of claims 1 to 2 is used to collect TBOX data of a vehicle and request the TBOX to perform a self-test, comprising a control module, a communication module, a positioning module, a voice module, a storage module and a remote upgrade module; The communication module is connected to the control module, the positioning module, the voice module, the storage module and the remote upgrade module; and the control module is connected to the TBOX.
4. The system for automated testing of TBOX by UDS according to claim 3, characterized in that: The control module is connected to the MCU; The control module is used to store the key and the key algorithm on the TSP platform during the key verification process, download the key and the key algorithm to the MCU through the test equipment, request the TBOX to perform self-test after the key verification is successful, and return the test result; The voice module is used to warn of abnormal conditions of the vehicle during the TBOX self-check process, and the positioning module can obtain and display the current real-time position of the vehicle on the electronic map; The storage module is used to store the test result.
5. The system for performing automated testing of TBOX by UDS according to claim 4, characterized in that: The communication module is also connected to the TSP platform for communication. The remote upgrade module automatically upgrades the test software through the communication module and the TSP platform or the mobile terminal, and stores the upgrade package, diagnostic and log data through the storage module; the diagnostic and log data are used for data reissue or problem analysis.
6. The system for automated testing of TBOX by UDS according to claim 3, characterized in that: The control module is a host computer or MCU.
7. The system for automated testing of TBOX by UDS according to claim 3, characterized in that: The control module is connected to the MCU of the TBOX via a CAN bus or RS232, and communicates with the MCU via a UDS protocol.
8. The system for performing automated testing of TBOX by UDS according to claim 3, characterized in that: The positioning module is a Beidou positioning module or a GPS positioning module; The storage module is an emmc memory.
