Method and device for realizing intelligent communication with vehicle ECU (Electronic Control Unit) through ELM327 equipment
By using the intelligent communication method between the ELM327 device and the vehicle ECU, user function requests are detected and encoded to enable non-OBD function expansion. This solves the problem of the functional limitations of the ELM327 device, realizes ECU communication expansion without additional hardware, reduces user costs, and improves system compatibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 深圳鼎匠科技有限公司
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-01
AI Technical Summary
The ELM327 device is limited to the OBD-II protocol and cannot support ECU flashing or custom program uploading. It requires dedicated software and hardware binding, resulting in wasted resources and increased costs.
The ELM327 device communicates with the vehicle's ECU, detects the target function triggered by the user, encodes and transmits matching data, realizes interactive operation with the target function, decodes feedback data, and supports non-OBD function expansion.
No additional hardware purchase is required to expand ECU communication functions, ensure compatibility with multiple operating systems, support multiple connection methods, lower the user threshold, and improve versatility and practicality.
Smart Images

Figure CN121967503A_ABST
Abstract
Description
Method and apparatus for achieving intelligent communication with vehicle ECU via ELM327 device Technical Field
[0001] This invention relates to the field of vehicle ECU communication technology, and in particular to a method and apparatus for achieving intelligent communication with a vehicle ECU via an ELM327 device. Background Technology
[0002] The ELM327 is a universal automotive diagnostic tool based on the OBD-II protocol. It connects to computers and mobile devices via USB, Bluetooth, or WiFi, supporting mainstream vehicles manufactured after 1996 that comply with the OBD-II standard. Its core functions include reading / clearing vehicle fault codes, real-time monitoring of engine speed, coolant temperature, and other data, and it is compatible with communication protocols such as ISO15765-4 (CAN) and ISO14230-4 (KWP2000). Currently, the ELM327 communicates with the vehicle's ECU via built-in OBD commands. Users need to use dedicated software (such as Scantool or Torque) to complete the data reading and display of standard OBD functions. Hardware versions include plastic / USB, Bluetooth, and aluminum casings, and must meet the J1962 OBD connection requirements and the ELM327 command standard. However, in practice, it has been found that the ELM327 device is limited to the standard diagnostic functions defined by the OBD-II protocol. It cannot support non-OBD functions such as ECU flashing and custom program uploading. Furthermore, it requires dedicated software and hardware binding. If users need to expand the functions, they need to purchase hardware repeatedly, resulting in wasted resources and increased costs.
[0003] Therefore, it is particularly important to propose a new method for communicating with the vehicle ECU via the ELM327 device, so that when users need to expand functions, they do not need to purchase new hardware, and to support non-OBU functions other than the OBD-II protocol. Summary of the Invention
[0004] This invention provides a method and apparatus for intelligent communication with a vehicle ECU via an ELM327 device. It provides a new communication method between the ELM327 device and the vehicle ECU, so that when users need to expand functions, they do not need to purchase new hardware, and supports non-OBU functions other than the OBD-II protocol.
[0005] To address the aforementioned technical problems, a first aspect of this invention discloses a method for intelligent communication with a vehicle ECU via an ELM327 device. The ELM327 device is inserted into the vehicle's DLC interface. The method includes: detecting a target function triggered by a user for the vehicle, and determining, based on the target function, first data matching the target function to be transmitted; encoding the first data based on an instruction format matching the ELM327 device to obtain second data whose format is an instruction format matching the ELM327 device; transmitting the second data to the ELM327 device to trigger the ELM327 device to perform an interactive operation with the control unit of the target function through the vehicle's DLC interface based on the second data, obtaining third data matching the target function; obtaining the third data from the ELM327 device, and decoding the third data based on the target call interface to obtain fourth data matching the target call interface.
[0006] As an optional implementation, in the first aspect of the present invention, determining the first data to be transmitted that matches the target function according to the target function includes: filtering target calling interfaces that match the target function from a predetermined set of calling interfaces; and determining the first data to be transmitted that matches the target function according to the target calling interface and the target function.
[0007] As an optional implementation, in a first aspect of the present invention, the first data includes configuration data matching the target calling interface and vehicle function data matching the target function; wherein, the step of performing an encoding operation on the first data based on the instruction format matching the ELM327 device to obtain second data whose format is the instruction format matching the ELM327 device includes: performing a conversion operation on the configuration data matching the target calling interface based on the instruction format matching the ELM327 device to obtain target configuration data matching the configuration data; performing a conversion operation on the vehicle function data matching the target function based on the instruction format matching the ELM327 device to obtain target vehicle function data matching the vehicle function data; and performing an encapsulation operation on the target configuration data and the target vehicle function data based on the data transmission conditions of the ELM327 device to obtain second data whose format is the instruction format matching the ELM327 device.
[0008] As an optional implementation, in the first aspect of the present invention, the step of performing a decoding operation on the third data based on the target calling interface to obtain fourth data matching the target calling interface includes: identifying the status code of the ELM327 from the third data to obtain a status code identification result; when the status code identification result is used to indicate successful identification of the ELM327 status code, performing a data decomposition operation on the vehicle function data in the third data based on the protocol format corresponding to the target calling interface to obtain decomposition data; and performing format conversion on the decomposition data based on the data conversion conditions corresponding to the target calling interface to obtain fourth data matching the target calling interface.
[0009] As an optional implementation, in the first aspect of the present invention, the detection of a target function triggered by the user for the vehicle includes: after the ELM327 device successfully connects to the ECU application corresponding to the vehicle, detecting the vehicle identifier input by the user through the ECU application corresponding to the vehicle, determining a set of control units matching the vehicle identifier based on the vehicle identifier, and outputting the set of control units to the user; detecting unit operations triggered by the user for the set of control units, and determining the target control unit required by the user based on the unit operations; determining a set of functions matching the target control unit, and outputting the set of functions to the user; detecting function operations triggered by the user for the set of functions, and determining a function matching the function operation based on the function operation, as the target function triggered by the user for the vehicle.
[0010] As an optional implementation, in the first aspect of the present invention, the method further includes: after the ELM327 device is inserted into the DLC interface of the vehicle, detecting a connection request triggered by the user for the ELM327 device; after detecting the connection request, performing a connection operation matching the ELM327 device through a preset connection method to obtain a connection result of the ELM327 device; when the connection result of the ELM327 device indicates that the ELM327 device is successfully connected to the ECU application corresponding to the vehicle, performing the operation of detecting the target function triggered by the user for the vehicle.
[0011] A second aspect of this invention discloses another method for achieving intelligent communication with a vehicle ECU via an ELM327 device. The ELM327 device is inserted into the vehicle's DLC interface. The method includes: the ELM327 device acquiring target data sent by the vehicle's corresponding ECU application, the target data being data in an instruction format matched by the ELM327 device, determined by the vehicle's corresponding ECU application based on a target function triggered by a user for the vehicle; the ELM327 device sending the target data to a target control unit matching the target data via the vehicle's DLC interface, triggering the target control unit to perform the following operations: the target control unit performing an operation matching the target data to obtain feedback data, and transmitting the feedback data to the ELM327 device; the ELM327 device transmitting the feedback data to the vehicle's corresponding ECU application, enabling the vehicle's corresponding ECU application to perform a decoding operation on the feedback data based on a calling interface matching the target control unit, obtaining decoded data matching the target function.
[0012] A third aspect of this invention discloses a device for intelligent communication with a vehicle ECU via an ELM327 device. The ELM327 device is inserted into the vehicle's DLC interface. The device includes: a detection module for detecting a target function triggered by a user for the vehicle; a determination module for determining, based on the target function, first data matching the target function to be transmitted; an encoding module for encoding the first data based on an instruction format matching the ELM327 device to obtain second data in an instruction format matching the ELM327 device; a communication module for transmitting the second data to the ELM327 device to trigger the ELM327 device to perform an interactive operation with the control unit of the target function through the vehicle's DLC interface based on the second data, obtaining third data matching the target function; the communication module is also used to obtain the third data from the ELM327 device; and a decoding module for decoding the third data based on the target call interface to obtain fourth data matching the target call interface.
[0013] As an optional implementation, in a third aspect of the present invention, the determining module determines the specific method of transmitting the first data matching the target function according to the target function, including: filtering target calling interfaces matching the target function from a pre-determined set of calling interfaces; and determining the first data matching the target function according to the target calling interface and the target function.
[0014] As an optional implementation, in a third aspect of the present invention, the first data includes configuration data matching the target calling interface and vehicle function data matching the target function; wherein, the specific method by which the encoding module performs an encoding operation on the first data based on an instruction format matching the ELM327 device to obtain second data whose format is an instruction format matching the ELM327 device includes: performing a conversion operation on the configuration data matching the target calling interface based on an instruction format matching the ELM327 device to obtain target configuration data matching the configuration data; performing a conversion operation on the vehicle function data matching the target function based on an instruction format matching the ELM327 device to obtain target vehicle function data matching the vehicle function data; and performing an encapsulation operation on the target configuration data and the target vehicle function data based on the data transmission conditions of the ELM327 device to obtain second data whose format is an instruction format matching the ELM327 device.
[0015] As an optional implementation, in a third aspect of the present invention, the specific method by which the decoding module performs a decoding operation on the third data based on the target calling interface to obtain fourth data matching the target calling interface includes: identifying the status code of the ELM327 from the third data to obtain a status code identification result; when the status code identification result is used to indicate successful identification of the ELM327 status code, performing a data decomposition operation on the vehicle function data in the third data based on the protocol format corresponding to the target calling interface to obtain decomposition data; and performing format conversion on the decomposition data based on the data conversion conditions corresponding to the target calling interface to obtain fourth data matching the target calling interface.
[0016] As an optional implementation, in a third aspect of the present invention, the detection module detects the specific method by which it detects the target function triggered by the user for the vehicle, including: after the ELM327 device is successfully connected to the ECU application corresponding to the vehicle, detecting the vehicle identifier input by the user through the ECU application corresponding to the vehicle, determining a set of control units matching the vehicle identifier based on the vehicle identifier, and outputting the set of control units to the user; detecting unit operations triggered by the user for the set of control units, and determining the target control unit required by the user based on the unit operations; determining a set of functions matching the target control unit, and outputting the set of functions to the user; detecting function operations triggered by the user for the set of functions, and determining a function matching the function operation based on the function operation, as the target function triggered by the user for the vehicle.
[0017] As an optional implementation, in a third aspect of the present invention, the detection module is further configured to detect a connection request triggered by a user for the ELM327 device after the ELM327 device is inserted into the DLC interface of the vehicle; the communication module is further configured to, after detecting the connection request, perform a connection operation matching the ELM327 device through a preset connection method to obtain a connection result of the ELM327 device; when the connection result of the ELM327 device indicates that the ELM327 device is successfully connected to the ECU application corresponding to the vehicle, the detection module is triggered to perform the operation of detecting the target function triggered by the user for the vehicle.
[0018] The fourth aspect of this invention discloses an apparatus for intelligent communication with a vehicle ECU via an ELM327 device, wherein the ELM327 device is inserted into the DLC interface of the vehicle, and the apparatus includes: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute some or all of the steps of any of the methods for intelligent communication with a vehicle ECU via an ELM327 device disclosed in the first or second aspect of this invention.
[0019] The fifth aspect of the present invention discloses a computer storage medium storing computer instructions, which, when invoked, are used to execute some or all of the steps of any of the methods for achieving intelligent communication with a vehicle ECU via an ELM327 device disclosed in the first or second aspect of the present invention.
[0020] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: In the embodiments of the present invention, the ELM327 device is inserted into the DLC interface of the vehicle, detects the target function triggered by the user for the vehicle, and determines the first data that needs to be transmitted according to the target function; based on the instruction format that matches the ELM327 device, the first data is encoded to obtain the second data whose format is the instruction format that matches the ELM327 device; the second data is transmitted to the ELM327 device to trigger the ELM327 device to perform an interactive operation with the control unit of the target function through the DLC interface of the vehicle according to the second data to obtain the third data that matches the target function; the third data is obtained from the ELM327 device, and based on the target call interface, the third data is decoded to obtain the fourth data that matches the target call interface. As can be seen, when the embodiments of the present invention detect user-triggered functions for the vehicle, such as engine parameter modification / fault diagnosis, transmission parameter modification / fault diagnosis, etc., the corresponding function data is encoded into data in the instruction format of the ELM327 device before being transmitted to the ELM327 device, enabling it to interact with the corresponding vehicle control unit to obtain the relevant communication data for the corresponding function. Finally, the data is decoded, thus achieving ECU communication functions directly through software-level protocol adaptation and function expansion without the need to purchase additional manufacturer-specific diagnostic hardware (such as a multi-function diagnostic tool), significantly reducing the user's learning curve; and by encoding and decoding data through protocol instructions, the present invention is also compatible with i Supporting mainstream operating systems such as OS, Windows, Android, Linux, and Mac, the ECU communication software can run on various devices including mobile phones and computers. The communication API conforms to industry standards such as J2534 and PDU, and also supports custom APIs, allowing integration with diagnostic software from different manufacturers or user-developed tools, thus enhancing the versatility of the technical solution. It also supports multiple connection methods including Bluetooth (SPP / BLE), serial port, USB, and WiFi, adapting to all hardware devices on the market that conform to the ELM327 instruction standard (such as plastic / USB versions, Bluetooth versions, aluminum shell versions, etc.), without being limited by specific hardware form factors, enhancing the practicality and adaptability of the solution. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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 effort.
[0022] Figure 1 is a flowchart illustrating a method for intelligent communication with a vehicle ECU via an ELM327 device, as disclosed in an embodiment of the present invention; Figure 2 is a schematic diagram illustrating a communication configuration, as disclosed in an embodiment of the present invention; Figure 3 is a flowchart illustrating another method for intelligent communication with a vehicle ECU via an ELM327 device, as disclosed in an embodiment of the present invention; Figure 4 is a structural schematic diagram illustrating a device for intelligent communication with a vehicle ECU via an ELM327 device, as disclosed in an embodiment of the present invention; Figure 5 is a structural schematic diagram illustrating another device for intelligent communication with a vehicle ECU via an ELM327 device, as disclosed in an embodiment of the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0026] This invention discloses a method and apparatus for intelligent communication with a vehicle ECU via an ELM327 device. When a user-triggered function is detected, such as engine parameter modification / fault diagnosis or transmission parameter modification / fault diagnosis, the corresponding function data is encoded into data in an instruction format compatible with the ELM327 device before being transmitted to the ELM327 device. This allows the device to interact with the corresponding vehicle control unit to obtain the relevant communication data for the function. Finally, the data is decoded. This eliminates the need to purchase manufacturer-specific diagnostic hardware (such as a multi-function diagnostic tool) and enables ECU communication directly through software-level protocol adaptation and function expansion, significantly lowering the user's learning curve. Furthermore, data is encoded via protocol instructions. With its decoding capabilities, this invention is compatible with mainstream operating systems such as iOS, Windows, Android, Linux, and Mac, allowing users to run the ECU communication software on various devices including mobile phones and computers. Furthermore, the communication API conforms to industry standards such as J2534 and PDU, while also supporting custom APIs, enabling integration with diagnostic software from different manufacturers or user-developed tools, thus enhancing the versatility of the technical solution. It also supports multiple connection methods including Bluetooth (SPP / BLE), serial port, USB, and WiFi, adapting to all hardware devices on the market that conform to the ELM327 instruction standard (such as plastic / USB versions, Bluetooth versions, aluminum shell versions, etc.), without being limited by specific hardware form factors, enhancing the practicality and adaptability of the solution. These will be described in detail below.
[0027] Please refer to Figure 1 for Embodiment 1. Figure 1 is a flowchart illustrating a method for intelligent communication with a vehicle ECU via an ELM327 device, as disclosed in this embodiment of the invention. This method can be applied to any scenario requiring vehicle ECU communication and can be used on a mobile terminal or its backend server, such as in vehicle diagnostics or ECU development. The ELM327 device is inserted into the vehicle's DLC interface. The DLC interface (Data Link Connector) is a standardized physical interface on the vehicle used to connect external diagnostic equipment, i.e., the OBD-II interface. The ECU (Electronic Control Unit) is the core control module of the automotive electronic system. As shown in Figure 1, the method may include the following operations: 101. Detecting the target function triggered by the user for the vehicle, and determining the first data that needs to be transmitted matching the target function based on the target function.
[0028] 102. Based on the instruction format that matches the ELM327 device, perform an encoding operation on the first data to obtain second data whose format is the instruction format that matches the ELM327 device.
[0029] 103. The second data is transmitted to the ELM327 device to trigger the ELM327 device to perform an interactive operation with the control unit of the target function through the vehicle's DLC interface based on the second data, and obtain the third data that matches the target function. The format of the third data is the instruction format that matches the ELM327 device.
[0030] In this embodiment of the invention, as shown in Figure 2, the second data is transmitted to the ELM327 device using the communication layer and the link layer. The ELM327 device transmits the second data to the corresponding control unit (ECU) via the DLC interface. The control unit (ECU) returns the third data to the ELM327 device, which then transmits it to the decoding layer for decoding via the link layer and the communication layer.
[0031] 104. Obtain the third data from the ELM327 device, and perform a decoding operation on the third data based on the target call interface to obtain the fourth data that matches the target call interface.
[0032] In this embodiment of the invention, after obtaining the fourth data, the fourth data is output through the ECU application to be displayed to the user.
[0033] As can be seen, the method described in Figure 1, when detecting user-triggered functions for the vehicle, such as engine parameter modification / fault diagnosis, transmission parameter modification / fault diagnosis, etc., encodes the corresponding function data into data in the instruction format of the ELM327 device, and then transmits it to the ELM327 device so that it can interact with the corresponding vehicle control unit to obtain the relevant communication data for the corresponding function. Finally, it decodes the data, thus realizing ECU communication functions directly through software-level protocol adaptation and function expansion without the need to purchase additional manufacturer-specific diagnostic hardware (such as a multi-function diagnostic tool), significantly reducing the user's learning curve; and through protocol instruction data encoding and decoding, this invention simultaneously... It is compatible with mainstream operating systems such as iOS, Windows, Android, Linux, and Mac, allowing users to run the ECU communication software on various devices such as mobile phones and computers. The communication API complies with industry standards such as J2534 and PDU, and also supports custom APIs, which can be connected to diagnostic software from different manufacturers or user-developed tools, improving the versatility of the technical solution. It also supports multiple connection methods such as Bluetooth (SPP / BLE), serial port, USB, and WiFi, and is compatible with all hardware devices on the market that comply with the ELM327 instruction standard (such as plastic / USB version, Bluetooth version, aluminum shell version, etc.), without being limited by specific hardware form factors, thus enhancing the practicality and scenario adaptability of the solution.
[0034] In this embodiment of the invention, optionally, determining the first data to be transmitted that matches the target function according to the target function includes: filtering target call interfaces that match the target function from a pre-determined set of call interfaces; and determining the first data to be transmitted that matches the target function according to the target call interface and the target function.
[0035] In this embodiment of the invention, optionally, the set of calling interfaces includes one or more of the following: J2534, PDU, and custom API interfaces. Different control units can correspond to different calling interfaces, and the interface is the target calling interface for the selected target function.
[0036] As can be seen, the embodiments of the present invention determine the matching calling interface by knowing the functions of the vehicle to be known, thereby improving the accuracy of the calling interface determination. Based on the determined calling interface and the functions to be known, the data to be transmitted to the ELM3327 device is determined, which helps to improve the accuracy and reliability of the data determination, thereby improving the accuracy of obtaining the communication data of the functions to be known, and further improving the accuracy of knowing the vehicle functions to be known.
[0037] In this embodiment of the invention, optionally, encoding operations are performed on the first data based on the instruction format matched with the ELM327 device to obtain second data whose format is the instruction format matched with the ELM327 device. This includes: performing a conversion operation on configuration data matched with the target calling interface based on the instruction format matched with the ELM327 device to obtain target configuration data matched with the configuration data; performing a conversion operation on vehicle function data matched with the target function based on the instruction format matched with the ELM327 device to obtain target vehicle function data matched with the vehicle function data; and performing an encapsulation operation on the target configuration data and the target vehicle function data based on the data transmission conditions of the ELM327 device to obtain second data whose format is the instruction format matched with the ELM327 device.
[0038] In this embodiment of the invention, optionally, the first data includes configuration data matching the target calling interface and vehicle function data matching the target function. The configuration data includes, but is not limited to, communication protocols, baud rates, pin definitions, etc. Different target calling interfaces correspond to different configuration data, such as different communication protocols like CAN or KWP2000. The vehicle function data is related to the type of the target function. For example, for engine diagnostic functions, the corresponding vehicle function data includes, but is not limited to, ECU interaction command data such as vehicle speed, engine speed, and fault codes, as well as specific operation commands for non-OBD functions such as ECU flashing commands and custom diagnostic requests, such as reading the ECU version number and uploading flashing file fragments. The instruction formats of the ELM327 device include, but are not limited to, AT instruction sets and protocol frame formats. For example, if the API specifies the CAN protocol (ISO 15765-4), it is encoded as AT SP 6 (SP 6 in ELM327 corresponds to the CAN protocol); if the API sets the baud rate to 500 kbps, it is encoded as AT BR500K (BR is the baud rate configuration instruction). If it is necessary to send a CAN instruction to the engine ECU to read the version number (such as ID 0x7E0, data bytes 0x01 0x00), it is encoded by the encoding layer into a CAN frame format that can be recognized by ELM327: 7E0 02 01 00, where 7E0 is the CAN ID, 02 is the data length, and the following are data bytes.
[0039] In this embodiment of the invention, the encapsulation operation may include, but is not limited to, adding corresponding prefixes / suffixes to the data, data length verification, and data splitting, or one or more of these. Specifically, for adding prefixes / suffixes, such as configuration instructions starting with "AT" or suffixes containing the carriage return character "\r"; for data length verification, the protocol frame data is length-verified, such as due to CAN frame data byte count limitations, and check bits are added if necessary, such as CRC verification, which is supported by some ELM327 versions; for data splitting, if the vehicle function data contains large files, such as .hex files flashed by the ECU, the encoding module needs to split the data into the maximum frame length supported by ELM327, such as 8 bytes per frame for the CAN protocol, and generate multiple frame instructions sequentially.
[0040] As can be seen, the embodiments of the present invention convert the configuration data and vehicle function data, such as protocol configuration and ECU commands, transmitted by upper-layer API calls into low-level command formats, such as AT commands and protocol frames, that can be directly recognized and executed by the ELM327 device. This breaks through the limitations of the native OBD function of the ELM327, supports non-standard ECU communication, such as flashing and custom diagnostics, and ensures that the interface calls of ECU communication applications are flexible and strictly compatible with the ELM327 hardware commands, thereby improving the accuracy of data communication.
[0041] In this embodiment of the invention, optionally, a decoding operation is performed on the third data based on the target calling interface to obtain fourth data matching the target calling interface, including: identifying the status code of ELM327 from the third data to obtain a status code identification result; when the status code identification result is used to indicate successful identification of the ELM327 status code, a data decomposition operation is performed on the vehicle function data in the third data based on the protocol format corresponding to the target calling interface to obtain decomposition data; and the format of the decomposition data is converted based on the data conversion conditions corresponding to the target calling interface to obtain fourth data matching the target calling interface.
[0042] In this embodiment of the invention, the third data includes protocol response data for the aforementioned second data, such as ELM327 feedback on configuration commands, such as OK indicating successful protocol configuration, and ECU interaction data for vehicle function data, such as business data returned by the ECU, such as flashing progress, diagnostic results, version number, etc., such as CAN frames, KWP2000 messages, etc.
[0043] In this embodiment of the invention, the business data returned by the control unit (ECU) is disassembled into data units according to the corresponding protocol format, such as CAN or KWP2000. More specifically, if the received third data is in CAN frame format 7E8 06 20 03 00 0020 00, it is parsed as follows: CAN ID: 7E8, ECU response vehicle identifier; data length: 06, 6 bytes of data; data content: 20 0300 00 20 00, which is further mapped to a business meaning, such as "flash progress 20%". After the third data is disassembled, the disassembled data is obtained. According to the type of the target call interface called by the ECU communication application, such as J2534, the disassembled data is mapped to the corresponding standard field format. If the target API call requests a return of the writing progress, the progress value in the CAN frame, such as 20, is mapped to the Progress field in the J2534 protocol; or, for custom API interfaces, it is converted into a format that the software can directly display according to preset rules, such as the JSON structure {"progress": 20, "status": "writing"}, to obtain the fourth data.
[0044] As can be seen, the embodiments of the present invention convert the interactive data between the ELM327 device and the control unit ECU into data in an API format that can be recognized by the ECU communication application, so that the ECU communication application can directly call it without the need to purchase additional manufacturer-specific diagnostic hardware, thereby realizing the result feedback and interaction of non-OBD functions (such as ECU flashing, custom diagnostics).
[0045] In this embodiment of the invention, optionally, the mobile terminal is equipped with an ECU application corresponding to the vehicle; and the detection of the target function triggered by the user for the vehicle includes: after the ELM327 device is successfully connected to the ECU application corresponding to the vehicle, detecting the vehicle identifier input by the user through the ECU application corresponding to the vehicle, determining a set of control units matching the vehicle identifier based on the vehicle identifier, and outputting the set of control units to the user; detecting the unit operation triggered by the user for the set of control units, and determining the target control unit required by the user based on the unit operation; determining the function set matching the target control unit, and outputting the function set to the user; and detecting the function operation triggered by the user for the function set, and determining the function matching the function operation based on the function operation as the target function triggered by the user for the vehicle.
[0046] In this embodiment of the invention, the vehicle identifier can be a license plate number and / or the vehicle's ETC terminal identifier, or other identifiers that can serve a unique identification function. Optionally, the control unit set includes, but is not limited to, multiple control units related to the vehicle, such as the body control unit, engine control unit, transmission control unit, brake control unit, airbag control unit, and air conditioning control unit. Different control units can correspond to different function sets; for example, the engine control unit's function set includes diagnostics and control. If the vehicle displays an engine warning light, it is usually necessary to select ECM for diagnostics. In this case, the user selects the diagnostic function under the engine control unit to proceed with subsequent operations.
[0047] As can be seen, after the ELM327 device and the ECU application are successfully connected, the present invention combines the control unit triggered by the user for the vehicle, and provides the corresponding set of functions for the user to select, thereby improving the accuracy of determining the required functions. This, in turn, helps to improve the accuracy of subsequent interface calls, and improves the accuracy and reliability of subsequent ECU flashing.
[0048] In an optional embodiment, the method may further include the following steps: after the ELM327 device is inserted into the vehicle's DLC interface (such as a 16-pin J1962 standard interface), detecting a user-triggered connection request for the ELM327 device; after detecting the connection request, performing a connection operation matching the ELM327 device through a preset connection method to obtain the connection result of the ELM327 device; when the connection result of the ELM327 device is used to indicate that the ELM327 device and the corresponding ECU application of the vehicle are successfully connected, performing an operation to detect the user-triggered target function for the vehicle.
[0049] In this optional embodiment, the LED indicator light of the ELM327 device may illuminate, such as a solid red light, or output a voice prompt to indicate successful insertion into the vehicle's DLC interface. Upon seeing the indicator light illuminate, the user can open the ECU application on their mobile terminal, enter the "Device Connection" interface, and view the available communication connection methods for triggering a connection request. Alternatively, the ELM327 device may automatically send a connection success message to the mobile terminal. Upon receiving the success message, the mobile terminal will automatically open the ECU application, enter the "Device Connection" interface, and view selectable communication connection methods, such as Bluetooth (SPP / BLE), serial port, USB, and WiFi, for the user to trigger a connection request. The mobile terminal will then analyze the available communication connection methods (e.g., Bluetooth) and search for nearby ELM327 devices to connect to. Furthermore, upon successful connection to the ELM327 device, any prompt, such as a voice message or indicator light, will indicate a successful connection. Optionally, if the connection fails, the above-mentioned operation of detecting the user-triggered connection request for the ELM327 device is re-executed, or the ELM327 device is checked to see if it has been successfully inserted into the vehicle's DLC interface.
[0050] As can be seen, this optional embodiment establishes a communication connection between the ELM327 device and the ECU application by combining the user's connection trigger request and selecting an appropriate connection method. This improves the efficiency and flexibility of the communication connection between the two, and supports multiple connection methods such as Bluetooth (SPP / BLE), serial port, USB, and WiFi. It is compatible with all hardware devices on the market that conform to the ELM327 instruction standard, such as plastic / USB version, Bluetooth version, aluminum shell version, etc., without being limited by a specific hardware form, thus enhancing the practicality and scenario adaptability of the solution.
[0051] In another optional embodiment, when there are multiple target functions and each target function corresponds to a different control unit, for any target function, the method may further include the following steps: determining the identifier of the control unit corresponding to the target function, and converting the identifier of the control unit based on the instruction format matching the ELM327 device to obtain the conversion identifier of the control unit, wherein the format of the conversion identifier of the control unit is the instruction format matching the ELM327 device; monitoring the encoding process of the first data of the target function to obtain the data encoding monitoring result of the target function; when the data encoding monitoring result of the target function is used to indicate that the first data encoding of the target function is completed, associating the conversion identifier corresponding to the target function with the second data corresponding to the target function to obtain the data association relationship corresponding to the target function, updating the association relationship to the corresponding second data, and then transmitting it to the ELM327 device for subsequent operations.
[0052] In this optional embodiment, for any target function, the subsequently obtained third and fourth data simultaneously contain the corresponding association relationship, that is, the association relationship will accompany the entire process of encoding, communication, decoding and even display.
[0053] It should be noted that for any target function, whether it is the process of transmitting encoded data to the ELM327 device, transmitting third-party data to the ELM327 device, and decoding, the subsequent nodes can be performed directly after the corresponding node is completed, or the subsequent nodes can be performed uniformly after all target functions have completed the operation of the same node. For example, after the engine fault coding is completed, the subsequent operation can be performed directly, or the subsequent operation can be performed after the transmission fault and brake fault coding are completed.
[0054] As can be seen, this optional embodiment, when there are multiple ECU control units that need to be viewed or diagnosed for corresponding functions, can simultaneously convert the format of each control unit's identifier into an instruction format that matches the ELM327 device, and establish an association relationship between the coded data of the corresponding functions. This allows for subsequent operations based on their respective association relationships, enabling accurate differentiation in communication, decoding, and even display. Without the need to purchase additional manufacturer-specific diagnostic hardware (such as a multi-function diagnostic tool), it directly improves the accuracy of various operations such as encoding, transmission, decoding, and display of multi-functions through software-level protocol adaptation and function expansion. This enhances the accuracy and timeliness of users' precise knowledge of each vehicle function.
[0055] Example 2: Please refer to Figure 3. Figure 3 is a flowchart illustrating a method for achieving intelligent communication with a vehicle ECU using an ELM327 device, as disclosed in this embodiment of the invention. This method can be applied to any scenario requiring vehicle ECU communication, such as vehicle diagnostics or ECU development. The ELM327 device is inserted into the vehicle's DLC interface. As shown in Figure 3, the method may include the following operations: 201. The ELM327 device acquires target data sent by the vehicle's corresponding ECU application. The target data is data in an instruction format that matches the ELM327 device, determined by the vehicle's corresponding ECU application based on the user's target function triggered by the vehicle.
[0056] 202. The ELM327 device sends the target data to the target control unit that matches the target data through the vehicle's DLC interface, so as to trigger the target control unit to perform the following operations: the target control unit performs the operation that matches the target data according to the target data, obtains feedback data, and transmits the feedback data to the ELM327 device. The format of the feedback data is the instruction format that matches the ELM327 device.
[0057] 203. The ELM327 device transmits the feedback data to the corresponding ECU application in the vehicle, so that the corresponding ECU application can perform a decoding operation on the feedback data based on the calling interface that matches the target control unit, and obtain decoded data that matches the target function.
[0058] It should be noted that the target data, target control unit, feedback data, and decoded data correspond to the second data, the control unit corresponding to the target function, the third data, and the fourth data in Embodiment 1, respectively. For a detailed description of the relevant content, please refer to Embodiment 1; it will not be repeated here.
[0059] As can be seen, the method described in Figure 3, when detecting user-triggered functions for the vehicle, such as engine parameter modification / fault diagnosis, transmission parameter modification / fault diagnosis, etc., encodes the corresponding function's data into data in the instruction format of the ELM327 device, and then transmits it to the ELM327 device so that it can interact with the corresponding vehicle control unit to obtain the relevant communication data for the corresponding function. Finally, it decodes the data, thus realizing ECU communication functions directly through software-level protocol adaptation and function expansion without the need to purchase additional manufacturer-specific diagnostic hardware (such as a multi-function diagnostic tool), significantly reducing the user's learning curve; and through protocol instruction data encoding and decoding, this invention simultaneously... It is compatible with mainstream operating systems such as iOS, Windows, Android, Linux, and Mac, allowing users to run the ECU communication software on various devices such as mobile phones and computers. The communication API complies with industry standards such as J2534 and PDU, and also supports custom APIs, which can be connected to diagnostic software from different manufacturers or user-developed tools, improving the versatility of the technical solution. It also supports multiple connection methods such as Bluetooth (SPP / BLE), serial port, USB, and WiFi, and is compatible with all hardware devices on the market that comply with the ELM327 instruction standard (such as plastic / USB version, Bluetooth version, aluminum shell version, etc.), without being limited by specific hardware form factors, thus enhancing the practicality and scenario adaptability of the solution.
[0060] Please refer to Figure 4 for Embodiment 3. Figure 4 is a schematic diagram of a device for intelligent communication with a vehicle ECU via an ELM327 device disclosed in this embodiment of the invention. The ELM327 device is inserted into the DLC interface of the vehicle. This device can be applied to any scenario requiring communication with the vehicle ECU and can be applied to a mobile terminal or the back-end server of the mobile terminal, such as vehicle diagnostics, ECU development, etc. As shown in Figure 4, the device may include: a detection module 301 for detecting a target function triggered by a user for the vehicle; a determination module 302 for determining, based on the target function, first data that matches the target function and needs to be transmitted; an encoding module 303 for encoding the first data based on an instruction format that matches the ELM327 device, to obtain second data whose format is an instruction format that matches the ELM327 device; a communication module 304 for transmitting the second data to the ELM327 device to trigger the ELM327 device to perform an interactive operation with the control unit of the target function through the vehicle's DLC interface based on the second data, to obtain third data that matches the target function, wherein the format of the third data is an instruction format that matches the ELM327 device; the communication module 304 is also used to obtain the third data from the ELM327 device; and a decoding module 305 for decoding the third data based on the target call interface, to obtain fourth data that matches the target call interface.
[0061] As can be seen, when the device described in Figure 4 detects a user-triggered function for the vehicle, such as engine parameter modification / fault diagnosis or transmission parameter modification / fault diagnosis, it encodes the corresponding function's data into data in the instruction format of the ELM327 device before transmitting it to the ELM327 device. This allows the device to interact with the corresponding vehicle control unit to obtain the relevant communication data for the corresponding function. Finally, the data is decoded, enabling ECU communication functions without the need to purchase additional manufacturer-specific diagnostic hardware (such as a multi-function diagnostic tool). This is achieved directly through software-level protocol adaptation and function expansion, significantly lowering the user's learning curve. Furthermore, the data encoding and decoding via protocol instructions allows the invention to simultaneously... It is compatible with mainstream operating systems such as iOS, Windows, Android, Linux, and Mac, allowing users to run the ECU communication software on various devices such as mobile phones and computers. The communication API complies with industry standards such as J2534 and PDU, and also supports custom APIs, which can be connected to diagnostic software from different manufacturers or user-developed tools, improving the versatility of the technical solution. It also supports multiple connection methods such as Bluetooth (SPP / BLE), serial port, USB, and WiFi, and is compatible with all hardware devices on the market that comply with the ELM327 instruction standard (such as plastic / USB version, Bluetooth version, aluminum shell version, etc.), without being limited by specific hardware form factors, thus enhancing the practicality and scenario adaptability of the solution.
[0062] In this embodiment of the invention, optionally, the determining module 302 determines the specific method of the first data that needs to be transmitted matching the target function according to the target function, including: filtering target calling interfaces that match the target function from a pre-determined set of calling interfaces; and determining the first data that needs to be transmitted matching the target function according to the target calling interface and the target function.
[0063] In this embodiment of the invention, optionally, the set of calling interfaces includes one or more of the following: J2534, PDU, and custom API interfaces. Different control units can correspond to different calling interfaces, and the interface is the target calling interface for the selected target function.
[0064] As can be seen, the embodiments of the present invention determine the matching calling interface by knowing the functions of the vehicle to be known, thereby improving the accuracy of the calling interface determination. Based on the determined calling interface and the functions to be known, the data to be transmitted to the ELM3327 device is determined, which helps to improve the accuracy and reliability of the data determination, thereby improving the accuracy of obtaining the communication data of the functions to be known, and further improving the accuracy of knowing the vehicle functions to be known.
[0065] In this embodiment of the invention, optionally, the first data includes configuration data matching the target calling interface and vehicle function data matching the target function; wherein, the encoding module 303 performs an encoding operation on the first data based on the instruction format matching the ELM327 device to obtain second data whose format is the instruction format matching the ELM327 device, specifically in the following manner: performing a conversion operation on the configuration data matching the target calling interface based on the instruction format matching the ELM327 device to obtain target configuration data matching the configuration data; performing a conversion operation on the vehicle function data matching the target function based on the instruction format matching the ELM327 device to obtain target vehicle function data matching the vehicle function data; and performing an encapsulation operation on the target configuration data and the target vehicle function data based on the data transmission conditions of the ELM327 device to obtain second data whose format is the instruction format matching the ELM327 device.
[0066] In this embodiment of the invention, optionally, the first data includes configuration data matching the target calling interface and vehicle function data matching the target function. The configuration data includes, but is not limited to, communication protocols, baud rates, pin definitions, etc. Different target calling interfaces correspond to different configuration data, such as different communication protocols like CAN or KWP2000. The vehicle function data is related to the type of the target function. For example, for engine diagnostic functions, the corresponding vehicle function data includes, but is not limited to, ECU interaction command data such as vehicle speed, engine speed, and fault codes, as well as specific operation commands for non-OBD functions such as ECU flashing commands and custom diagnostic requests, such as reading the ECU version number and uploading flashing file fragments. The instruction formats of the ELM327 device include, but are not limited to, AT instruction sets and protocol frame formats. For example, if the API specifies the CAN protocol (ISO 15765-4), it is encoded as AT SP 6 (SP 6 in ELM327 corresponds to the CAN protocol); if the API sets the baud rate to 500 kbps, it is encoded as AT BR500K (BR is the baud rate configuration instruction). If it is necessary to send a CAN instruction to the engine ECU to read the version number (such as ID 0x7E0, data bytes 0x01 0x00), it is encoded by the encoding layer into a CAN frame format that can be recognized by ELM327: 7E0 02 01 00, where 7E0 is the CAN ID, 02 is the data length, and the following are data bytes.
[0067] In this embodiment of the invention, the encapsulation operation may include, but is not limited to, adding corresponding prefixes / suffixes to the data, data length verification, and data splitting, or one or more of these. Specifically, for adding prefixes / suffixes, such as configuration instructions starting with "AT" or suffixes containing the carriage return character "\r"; for data length verification, the protocol frame data is length-verified, such as due to CAN frame data byte count limitations, and check bits are added if necessary, such as CRC verification, which is supported by some ELM327 versions; for data splitting, if the vehicle function data contains large files, such as .hex files flashed by the ECU, the encoding module needs to split the data into the maximum frame length supported by ELM327, such as 8 bytes per frame for the CAN protocol, and generate multiple frame instructions sequentially.
[0068] As can be seen, the embodiments of the present invention convert the configuration data and vehicle function data, such as protocol configuration and ECU commands, transmitted by upper-layer API calls into low-level command formats, such as AT commands and protocol frames, that can be directly recognized and executed by the ELM327 device. This breaks through the limitations of the native OBD function of the ELM327, supports non-standard ECU communication, such as flashing and custom diagnostics, and ensures that the interface calls of ECU communication applications are flexible and strictly compatible with the ELM327 hardware commands, thereby improving the accuracy of data communication.
[0069] In this embodiment of the invention, optionally, the decoding module 305 performs a decoding operation on the third data based on the target calling interface to obtain the fourth data matching the target calling interface in the following specific manner: identifying the status code of ELM327 from the third data to obtain a status code identification result; when the status code identification result is used to indicate successful identification of the ELM327 status code, performing a data decomposition operation on the vehicle function data in the third data based on the protocol format corresponding to the target calling interface to obtain decomposition data; and performing format conversion on the decomposition data based on the data conversion conditions corresponding to the target calling interface to obtain the fourth data matching the target calling interface.
[0070] In this embodiment of the invention, the third data includes protocol response data for the aforementioned second data, such as ELM327 feedback on configuration commands, such as OK indicating successful protocol configuration, and ECU interaction data for vehicle function data, such as business data returned by the ECU, such as flashing progress, diagnostic results, version number, etc., such as CAN frames, KWP2000 messages, etc.
[0071] In this embodiment of the invention, the business data returned by the control unit (ECU) is disassembled into data units according to the corresponding protocol format, such as CAN or KWP2000. More specifically, if the received third data is in CAN frame format 7E8 06 20 03 00 0020 00, it is parsed as follows: CAN ID: 7E8, ECU response vehicle identifier; data length: 06, 6 bytes of data; data content: 20 0300 00 20 00, which is further mapped to a business meaning, such as "flash progress 20%". After the third data is disassembled, the disassembled data is obtained. According to the type of the target call interface called by the ECU communication application, such as J2534, the disassembled data is mapped to the corresponding standard field format. If the target API call requests a return of the writing progress, the progress value in the CAN frame, such as 20, is mapped to the Progress field in the J2534 protocol; or, for custom API interfaces, it is converted into a format that the software can directly display according to preset rules, such as the JSON structure {"progress": 20, "status": "writing"}, to obtain the fourth data.
[0072] As can be seen, the embodiments of the present invention convert the interactive data between the ELM327 device and the control unit ECU into data in an API format that can be recognized by the ECU communication application, so that the ECU communication application can directly call it without the need to purchase additional manufacturer-specific diagnostic hardware, thereby realizing the result feedback and interaction of non-OBD functions (such as ECU flashing, custom diagnostics).
[0073] In this embodiment of the invention, optionally, the detection module 301 detects the specific method by which it detects the target function triggered by the user for the vehicle, including: after the ELM327 device is successfully connected to the ECU application corresponding to the vehicle, detecting the vehicle identifier input by the user through the ECU application corresponding to the vehicle, determining the set of control units matching the vehicle identifier based on the vehicle identifier, and outputting the set of control units to the user; detecting the unit operation triggered by the user for the set of control units, and determining the target control unit required by the user based on the unit operation; determining the set of functions matching the target control unit, and outputting the set of functions to the user; detecting the function operation triggered by the user for the set of functions, and determining the function matching the function operation based on the function operation as the target function triggered by the user for the vehicle.
[0074] In this embodiment of the invention, the vehicle identifier can be a license plate number and / or the vehicle's ETC terminal identifier, or other identifiers that can serve a unique identification function. Optionally, the control unit set includes, but is not limited to, multiple control units related to the vehicle, such as the body control unit, engine control unit, transmission control unit, brake control unit, airbag control unit, and air conditioning control unit. Different control units can correspond to different function sets; for example, the engine control unit's function set includes diagnostics and control. If the vehicle displays an engine warning light, it is usually necessary to select ECM for diagnostics. In this case, the user selects the diagnostic function under the engine control unit to proceed with subsequent operations.
[0075] As can be seen, after the ELM327 device and the ECU application are successfully connected, the present invention combines the control unit triggered by the user for the vehicle, and provides the corresponding set of functions for the user to select, thereby improving the accuracy of determining the required functions. This, in turn, helps to improve the accuracy of subsequent interface calls, and improves the accuracy and reliability of subsequent ECU flashing.
[0076] In an optional embodiment, as shown in FIG4, the detection module 301 is further configured to detect a connection request triggered by the user for the ELM327 device after the ELM327 device is inserted into the DLC interface of the vehicle; the communication module 304 is further configured to, after detecting the connection request, perform a connection operation matching the ELM327 device through a preset connection method to obtain the connection result of the ELM327 device; when the connection result of the ELM327 device is used to indicate that the ELM327 device and the ECU application corresponding to the vehicle are successfully connected, the detection module is triggered to perform the operation of detecting the target function triggered by the user for the vehicle.
[0077] In this optional embodiment, the LED indicator light of the ELM327 device may illuminate, such as a solid red light, or output a voice prompt to indicate successful insertion into the vehicle's DLC interface. Upon seeing the indicator light illuminate, the user can open the ECU application on their mobile terminal, enter the "Device Connection" interface, and view the available communication connection methods for triggering a connection request. Alternatively, the ELM327 device may automatically send a connection success message to the mobile terminal. Upon receiving the success message, the mobile terminal will automatically open the ECU application, enter the "Device Connection" interface, and view selectable communication connection methods, such as Bluetooth (SPP / BLE), serial port, USB, and WiFi, for the user to trigger a connection request. The mobile terminal will then analyze the available communication connection methods (e.g., Bluetooth) and search for nearby ELM327 devices to connect to. Furthermore, upon successful connection to the ELM327 device, any prompt, such as a voice message or indicator light, will indicate a successful connection. Optionally, if the connection fails, the above-mentioned operation of detecting the user-triggered connection request for the ELM327 device is re-executed, or the ELM327 device is checked to see if it has been successfully inserted into the vehicle's DLC interface.
[0078] As can be seen, this optional embodiment establishes a communication connection between the ELM327 device and the ECU application by combining the user's connection trigger request and selecting an appropriate connection method. This improves the efficiency and flexibility of the communication connection between the two, and supports multiple connection methods such as Bluetooth (SPP / BLE), serial port, USB, and WiFi. It is compatible with all hardware devices on the market that conform to the ELM327 instruction standard, such as plastic / USB version, Bluetooth version, aluminum shell version, etc., without being limited by a specific hardware form, thus enhancing the practicality and scenario adaptability of the solution.
[0079] In another optional embodiment, as shown in FIG4, the determining module 302 is further configured to, when there are multiple target functions and each target function corresponds to a different control unit, determine the identifier of the control unit corresponding to any target function, and convert the identifier of the control unit based on the instruction format matching the ELM327 device to obtain the conversion identifier of the control unit, wherein the format of the conversion identifier of the control unit is the instruction format matching the ELM327 device; the communication module 304 is further configured to monitor the encoding process of the first data of the target function to obtain the data encoding monitoring result of the target function; when the data encoding monitoring result of the target function is used to indicate that the first data encoding of the target function is completed, associate the conversion identifier corresponding to the target function with the second data corresponding to the target function to obtain the data association relationship corresponding to the target function, update the association relationship to the corresponding second data, and then transmit it to the ELM327 device for subsequent operations.
[0080] In this optional embodiment, for any target function, the subsequently obtained third and fourth data simultaneously contain the corresponding association relationship, that is, the association relationship will accompany the entire process of encoding, communication, decoding and even display.
[0081] It should be noted that for any target function, whether it is the process of transmitting encoded data to the ELM327 device, transmitting third-party data to the ELM327 device, and decoding, the subsequent nodes can be performed directly after the corresponding node is completed, or the subsequent nodes can be performed uniformly after all target functions have completed the operation of the same node. For example, after the engine fault coding is completed, the subsequent operation can be performed directly, or the subsequent operation can be performed after the transmission fault and brake fault coding are completed.
[0082] As can be seen, this optional embodiment, when there are multiple ECU control units that need to be viewed or diagnosed for corresponding functions, can simultaneously convert the format of each control unit's identifier into an instruction format that matches the ELM327 device, and establish an association relationship between the coded data of the corresponding functions. This allows for subsequent operations based on their respective association relationships, enabling accurate differentiation in communication, decoding, and even display. Without the need to purchase additional manufacturer-specific diagnostic hardware (such as a multi-function diagnostic tool), it directly improves the accuracy of various operations such as encoding, transmission, decoding, and display of multi-functions through software-level protocol adaptation and function expansion. This enhances the accuracy and timeliness of users' precise knowledge of each vehicle function.
[0083] Please refer to Figure 5 for Embodiment 4. Figure 5 is a schematic diagram of a device for intelligent communication with a vehicle ECU via an ELM327 device, as disclosed in this embodiment of the invention. This device can be applied in any scenario requiring vehicle ECU communication, such as vehicle diagnostics or ECU development. The ELM327 device is inserted into the vehicle's DLC interface. As shown in Figure 5, the device may include: a memory 401 storing executable program code; a processor 402 coupled to the memory 401; further, it may include an input interface 403 and an output interface 404 coupled to the processor 402; wherein the processor 402 calls the executable program code stored in the memory 401 to execute the steps in the method for intelligent communication with a vehicle ECU via an ELM327 device described in Embodiment 1 or Embodiment 2. It should be noted that when the aforementioned device is applied to a mobile terminal or the backend server of the mobile terminal, the device is used to execute the method of Embodiment 1; when the aforementioned device is applied to an ELM327 device, the device is used to execute the method of Embodiment 2.
[0084] Example 5: This embodiment of the invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute the steps in the method for achieving intelligent communication with a vehicle ECU via an ELM327 device as described in Example 1 or Example 2.
[0085] Example 6: This embodiment of the invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the method for achieving intelligent communication with a vehicle ECU via an ELM327 device as described in Example 1 or Example 2.
[0086] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0087] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0088] Finally, it should be noted that the method and apparatus for intelligent communication with a vehicle ECU via an ELM327 device disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for achieving intelligent communication with a vehicle ECU via an ELM327 device, characterized in that, The ELM327 device is inserted into the DLC interface of the vehicle. The method is applied to a mobile terminal or the backend server of the mobile terminal. The method includes: detecting a target function triggered by the user for the vehicle, and determining, based on the target function, first data that needs to be transmitted and matches the target function; encoding the first data based on an instruction format that matches the ELM327 device to obtain second data whose format is an instruction format that matches the ELM327 device; transmitting the second data to the ELM327 device to trigger the ELM327 device to perform an interactive operation with the control unit of the target function through the DLC interface of the vehicle based on the second data to obtain third data that matches the target function, wherein the format of the third data is an instruction format that matches the ELM327 device; obtaining the third data from the ELM327 device, and decoding the third data based on the target call interface to obtain fourth data that matches the target call interface.
2. The method for achieving intelligent communication with a vehicle ECU via an ELM327 device according to claim 1, characterized in that, The step of determining the first data to be transmitted that matches the target function based on the target function includes: filtering target call interfaces that match the target function from a pre-determined set of call interfaces; and determining the first data to be transmitted that matches the target function based on the target call interface and the target function.
3. The method for achieving intelligent communication with a vehicle ECU via an ELM327 device according to claim 2, characterized in that, The first data includes configuration data matching the target calling interface and vehicle function data matching the target function; wherein, the step of performing an encoding operation on the first data based on the instruction format matching the ELM327 device to obtain second data whose format is the instruction format matching the ELM327 device includes: performing a conversion operation on the configuration data matching the target calling interface based on the instruction format matching the ELM327 device to obtain target configuration data matching the configuration data; performing a conversion operation on the vehicle function data matching the target function based on the instruction format matching the ELM327 device to obtain target vehicle function data matching the vehicle function data; and performing an encapsulation operation on the target configuration data and the target vehicle function data based on the data transmission conditions of the ELM327 device to obtain second data whose format is the instruction format matching the ELM327 device.
4. The method for achieving intelligent communication with a vehicle ECU via an ELM327 device according to any one of claims 1-3, characterized in that, The step of performing a decoding operation on the third data based on the target calling interface to obtain fourth data matching the target calling interface includes: identifying the status code of the ELM327 from the third data to obtain a status code identification result; when the status code identification result is used to indicate successful identification of the ELM327 status code, performing a data decomposition operation on the vehicle function data in the third data based on the protocol format corresponding to the target calling interface to obtain decomposition data; and performing format conversion on the decomposition data based on the data conversion conditions corresponding to the target calling interface to obtain fourth data matching the target calling interface.
5. The method for achieving intelligent communication with a vehicle ECU via an ELM327 device according to any one of claims 1-3, characterized in that, The mobile terminal is equipped with an ECU application corresponding to the vehicle. The detection of the target function triggered by the user for the vehicle includes: after the ELM327 device successfully connects to the ECU application corresponding to the vehicle, detecting the vehicle identifier input by the user through the ECU application, determining a set of control units matching the vehicle identifier based on the vehicle identifier, and outputting the set of control units to the user; detecting unit operations triggered by the user for the set of control units, and determining the target control unit required by the user based on the unit operations; determining a set of functions matching the target control unit, and outputting the set of functions to the user; detecting function operations triggered by the user for the set of functions, and determining the function matching the function operation as the target function triggered by the user for the vehicle.
6. The method for achieving intelligent communication with a vehicle ECU via an ELM327 device according to claim 5, characterized in that, The method further includes: after the ELM327 device is inserted into the DLC interface of the vehicle, detecting a connection request triggered by the user for the ELM327 device; after detecting the connection request, performing a connection operation matching the ELM327 device through a preset connection method to obtain the connection result of the ELM327 device; when the connection result of the ELM327 device indicates that the ELM327 device is successfully connected to the ECU application corresponding to the vehicle, performing the operation of detecting the target function triggered by the user for the vehicle.
7. A method for achieving intelligent communication with a vehicle ECU via an ELM327 device, characterized in that, The ELM327 device is inserted into the DLC interface of the vehicle. The method includes: the ELM327 device acquiring target data sent by the ECU application corresponding to the vehicle, the target data being data in an instruction format that matches the ELM327 device, determined by the ECU application based on a target function triggered by the user for the vehicle; the ELM327 device sending the target data to a target control unit matching the target data through the DLC interface of the vehicle, thereby triggering the target control unit to perform the following operations: the target control unit performing an operation matching the target data to obtain feedback data, and transmitting the feedback data to the ELM327 device, wherein the format of the feedback data is an instruction format matching the ELM327 device; the ELM327 device transmitting the feedback data to the ECU application corresponding to the vehicle, so that the ECU application performs a decoding operation on the feedback data based on a calling interface matching the target control unit, thereby obtaining decoded data matching the target function.
8. A device for intelligent communication with a vehicle ECU via an ELM327 device, characterized in that, The ELM327 device is inserted into the DLC interface of the vehicle. The device is applied to a mobile terminal or the backend server of the mobile terminal. The device includes: a detection module for detecting a target function triggered by a user for the vehicle; a determination module for determining, based on the target function, first data that needs to be transmitted and matches the target function; an encoding module for encoding the first data based on an instruction format that matches the ELM327 device to obtain second data whose format is an instruction format that matches the ELM327 device; a communication module for transmitting the second data to the ELM327 device to trigger the ELM327 device to perform an interactive operation with the control unit of the target function through the DLC interface of the vehicle based on the second data to obtain third data that matches the target function, wherein the format of the third data is an instruction format that matches the ELM327 device; the communication module is also used to obtain the third data from the ELM327 device; and a decoding module for decoding the third data based on the target call interface to obtain fourth data that matches the target call interface.
9. A device for intelligent communication with a vehicle ECU via an ELM327 device, characterized in that, The ELM327 device is inserted into the DLC interface of the vehicle. The device includes: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the method for achieving intelligent communication with the vehicle ECU via the ELM327 device as described in any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the method for achieving intelligent communication with the vehicle ECU via the ELM327 device as described in any one of claims 1-7.