CN117590835A - Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface - Google Patents

Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface Download PDF

Info

Publication number
CN117590835A
CN117590835A CN202410070838.1A CN202410070838A CN117590835A CN 117590835 A CN117590835 A CN 117590835A CN 202410070838 A CN202410070838 A CN 202410070838A CN 117590835 A CN117590835 A CN 117590835A
Authority
CN
China
Prior art keywords
target pin
obd
communication protocol
interface
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410070838.1A
Other languages
Chinese (zh)
Inventor
蒋永鑫
谭斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xingka Technology Co ltd
Original Assignee
Shenzhen Xingka Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xingka Technology Co ltd filed Critical Shenzhen Xingka Technology Co ltd
Priority to CN202410070838.1A priority Critical patent/CN117590835A/en
Publication of CN117590835A publication Critical patent/CN117590835A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0259Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the response to fault detection
    • G05B23/0262Confirmation of fault detection, e.g. extra checks to confirm that a failure has indeed occurred
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The invention provides a protocol self-adaptive diagnosis method and device supporting a vehicle OBD interface, which are used for detecting the voltage of each target pin of the vehicle OBD interface and determining the physical interface type of each target pin based on the voltage of each target pin; determining at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and the corresponding relation between the preset physical interface type and the communication protocol; sending an OBD universal request command of the corresponding candidate communication protocol to the vehicle ECU through each target pin based on the communication parameters of each corresponding candidate communication protocol; based on the response of the vehicle ECU to the OBD universal request command, the final communication protocol of each target pin is determined. The invention can improve the adaptability and the accuracy of the standard OBD equipment for diagnosing different vehicles.

Description

Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface
Technical Field
The invention relates to the technical field of automobile electronics, in particular to a protocol self-adaptive diagnosis method and device supporting an OBD interface of a vehicle.
Background
OBD refers to an on-board diagnostic system, which is known in full english as On Board Diagnostic. The OBD can monitor the running state of the automobile engine and the running state of the tail gas treatment program in real time, and is commonly provided with 4 physical interfaces CAN, K, PWM, VPW, and the following 9 combinations are commonly provided according to the physical interfaces and the communication protocol: (1) SAE J1850 PWM (41.6 kbaud); (2) SAEJ1850 VPW (10.4 kbaud); (3) ISO 9141-2 (5 baud init); (4) ISO14230-4 KWP (5 baud init); (5) ISO14230-4 KWP (fast init); (6) lSO 15765-4 CAN (11 bit lD, 500 kbaud); (7) ISO 15765-4 CAN (29 bit ID, 500 kbaud); (8) ISO 15765-4 CAN (11 bit ID, 250 kbaud); (9) ISO 15765-4 CAN (29 bit ID, 250 kbaud).
However, in real life, it is often encountered that the communication interfaces of some vehicles are not exactly matched with those defined in the standard documents. Due to this situation, the standard OBD device cannot establish communication with the vehicle ECU after accessing the vehicle diagnostic interface, and may even affect the integrity and correctness of the vehicle bus level signal and related data.
Disclosure of Invention
Accordingly, an objective of the present invention is to provide a protocol adaptive diagnosis method and device supporting an OBD interface of a vehicle, so as to alleviate the above problems in the conventional OBD diagnosis technology.
In a first aspect, an embodiment of the present invention provides a protocol adaptive diagnostic method for supporting an OBD interface of a vehicle, including: detecting the voltage of each target pin of the OBD interface of the vehicle, and determining the physical interface type of each target pin based on the voltage of each target pin; determining at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and the corresponding relation between the preset physical interface type and the communication protocol; sending an OBD universal request command of the corresponding candidate communication protocol to the vehicle ECU through each target pin based on the communication parameters of each corresponding candidate communication protocol; and determining a final communication protocol of each target pin based on the response condition of the vehicle ECU to each OBD universal request command.
In a second aspect, an embodiment of the present invention further provides a protocol adaptive diagnostic apparatus supporting an OBD interface of a vehicle, including: the detection and determination module is used for detecting the voltage of each target pin of the OBD interface of the vehicle and determining the physical interface type of each target pin based on the voltage of each target pin; the first determining module is used for determining at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and the corresponding relation between the preset physical interface type and the communication protocol; the sending module is used for sending an OBD universal request command of the corresponding candidate communication protocol to the vehicle ECU through each target pin based on the communication parameters of each corresponding candidate communication protocol; and the second determining module is used for determining the final communication protocol of each target pin based on the response condition of the vehicle ECU to each OBD universal request command.
The embodiment of the invention provides a protocol self-adaptive diagnosis method and device for supporting a vehicle OBD interface, which are used for detecting the voltage of each target pin of the vehicle OBD interface and determining the physical interface type of each target pin based on the voltage of each target pin; determining at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and the corresponding relation between the preset physical interface type and the communication protocol; sending an OBD universal request command of the corresponding candidate communication protocol to the vehicle ECU through each target pin based on the communication parameters of each corresponding candidate communication protocol; based on the response of the vehicle ECU to the OBD universal request command, the final communication protocol of each target pin is determined. By adopting the technology, the physical interface type and the specific communication protocol of each pin of the OBD interfaces of different vehicles can be accurately detected, and then the standard OBD equipment can dynamically select a physical communication line to establish communication with the vehicle ECU after being connected with the OBD interfaces of different vehicles, so that the adaptability and the accuracy of the standard OBD equipment for diagnosing different vehicles are improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a protocol adaptive diagnostic method supporting a vehicle OBD interface according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a vehicle OBD interface in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of a protocol adaptive diagnostic apparatus supporting an OBD interface of a vehicle according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another protocol adaptive diagnostic apparatus supporting an OBD interface of a vehicle according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described in conjunction with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, in real life, incomplete matching of the communication interface of some vehicles with the communication interface defined in the standard document is often encountered. Due to this situation, the standard OBD device cannot establish communication with the vehicle ECU after accessing the vehicle diagnostic interface, and may even affect the integrity and correctness of the vehicle bus level signal and related data.
Based on the above, the protocol self-adaptive diagnosis method and device supporting the OBD interface of the vehicle can alleviate the problems existing in the existing OBD diagnosis technology.
For the understanding of the present embodiment, first, a detailed description will be given of a protocol adaptive diagnosis method supporting a vehicle OBD interface disclosed in the present embodiment, referring to a flow chart of a protocol adaptive diagnosis method supporting a vehicle OBD interface shown in fig. 1, the method may include the following steps:
step S102, detecting the voltage of each target pin of the OBD interface of the vehicle, and determining the physical interface type of each target pin based on the voltage of each target pin.
Referring to fig. 2, the OBD interface has 16 pins, where pin 4 is defined as the body ground (i.e. the body negative electrode), pin 5 is defined as the signal ground (i.e. the signal negative electrode), pin 16 is defined as the vehicle battery voltage (i.e. the positive electrode), and the definitions of pins 1, 3, 8, 9, 11, 12, 13 can be flexibly set; based on this, the target pins may be pins of the OBD interface, where the type of the physical interface is to be determined, and generally all the pins except the pins 4 and 5 in the OBD interface may be selected as target pins, which is not limited.
Step S104, at least one candidate communication protocol of each target pin is determined based on the physical interface type of each target pin and the corresponding relation between the preset physical interface type and the communication protocol.
Illustratively, one physical interface type corresponds to at least one communication protocol; under the condition that the physical interface type of a certain pin is known, all communication protocols corresponding to the physical interface type of the pin can be determined from the corresponding relation between the physical interface type and the communication protocols to serve as candidate communication protocols of the pin.
In step S106, the OBD generic request command of the corresponding candidate communication protocol is sent to the vehicle ECU through each target pin based on the communication parameters of each corresponding candidate communication protocol.
Step S108, determining the final communication protocol of each target pin based on the response condition of the vehicle ECU to each OBD universal request command.
Wherein each target pin is capable of establishing a communication connection with the vehicle ECU via its final communication protocol.
Illustratively, in the case that all candidate communication protocols of a certain pin are known, the communication parameters (such as data transmission rate, response time length, message format, data request content, command field, real data verification mode, etc.) of the candidate communication protocol may be configured for the pin according to the certain candidate communication protocol of the pin, and an OBD universal request command is sent to the vehicle ECU through the pin according to the communication parameters of the candidate communication protocol (i.e., the pin sends the OBD universal request command to the vehicle ECU through the candidate communication protocol), where the OBD universal request command is used for handshake with the vehicle ECU; and then waiting for the response of the vehicle ECU, and determining whether the pin can establish communication connection with the vehicle ECU through the candidate communication protocol according to the response condition of the vehicle ECU, so as to determine whether the candidate communication protocol is the final communication protocol of the pin.
With the final communication protocol of a certain pin known, a communication connection between the pin and the vehicle ECU can be established through the final communication protocol of the pin for subsequent diagnosis of the vehicle.
The protocol self-adaptive diagnosis method supporting the vehicle OBD interface provided by the embodiment of the invention detects the voltage of each target pin of the vehicle OBD interface and determines the physical interface type of each target pin based on the voltage of each target pin; determining at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and the corresponding relation between the preset physical interface type and the communication protocol; sending an OBD universal request command of the corresponding candidate communication protocol to the vehicle ECU through each target pin based on the communication parameters of each corresponding candidate communication protocol; based on the response of the vehicle ECU to the OBD universal request command, the final communication protocol of each target pin is determined. By adopting the technology, the physical interface type and the specific communication protocol of each pin of the OBD interfaces of different vehicles can be accurately detected, and then the standard OBD equipment can dynamically select a physical communication line to establish communication with the vehicle ECU after being connected with the OBD interfaces of different vehicles, so that the adaptability and the accuracy of the standard OBD equipment for diagnosing different vehicles are improved.
As a possible implementation manner, determining the physical interface type of each target pin based on the voltage of each target pin in the step S102 may include:
step 1, if the voltage of the target pin is within a preset voltage range, determining the physical interface type of the target pin as a first type which is characterized as being suitable for OBD diagnosis.
And step 2, if the voltage of the target pin is not in the preset voltage range, determining that the physical interface type of the target pin is a second type which is characterized as unsuitable for OBD diagnosis.
Illustratively, the predetermined voltage range may include: the first voltage range of the characterized CAN interface, the second voltage range of the characterized K line interface, the third voltage range of the characterized PWM interface and the fourth voltage range of the characterized VPW interface. The first type may include: CAN interface, K line interface, PWM interface and VPW interface. The second type described above may be other physical interface types than CAN interfaces, K-wire interfaces, PWM interfaces, and VPW interfaces.
For a certain pin of the vehicle OBD interface, if the voltage of the pin is detected to be in any one of a first voltage range, a second voltage range, a third voltage range and a fourth voltage range, determining that the physical interface type of the pin is suitable for OBD diagnosis; if the voltage of the pin is detected to be outside the four voltage ranges of the first voltage range, the second voltage range, the third voltage range and the fourth voltage range, it can be determined that the physical interface type of the pin is not suitable for OBD diagnosis.
As a possible implementation manner, the step 1 (i.e. determining that the physical interface type of the target pin is the first type characterizing that the OBD diagnosis is applicable if the voltage of the target pin is within the preset voltage range) may include: if the voltage of the target pin is in the first voltage range, determining that the physical interface type of the target pin is a CAN interface; if the voltage of the target pin is in the second voltage range, determining that the physical interface type of the target pin is a K line interface; if the voltage of the target pin is in the third voltage range, determining that the physical interface type of the target pin is a PWM interface; and if the voltage of the target pin is in the fourth voltage range, determining that the physical interface type of the target pin is a VPW interface.
As a possible implementation manner, the step S104 (that is, determining at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and the preset correspondence between the physical interface type and the communication protocol) may include: if the physical interface type of the target pin is the first type, all communication protocols corresponding to the first type are determined to be at least one candidate communication protocol of the target pin based on the corresponding relation between the physical interface type and the communication protocols.
Continuing the previous example, the correspondence between the above physical interface type and the communication protocol may be represented by the above 9 combinations that are common to the physical interface and the communication protocol, where the PWM interface corresponds to the communication protocol of SAE J1850 PWM (41.6 kbaud), the VPW interface corresponds to the communication protocol of SAEJ1850 VPW (10.4 kbaud), the K-wire interface corresponds to the three communication protocols of ISO 9141-2 (5 baud init), ISO14230-4 kw p (5 baud init), and ISO14230-4 kw p (fast init), and the CAN interface corresponds to the four communication protocols of lSO 15765-4 CAN (11 bit lD, 500 kbaud), ISO 15765-4 CAN (29 bit ID, 500 kbaud), ISO 15765-4 CAN (11 bit ID, 250 kbaud), and ISO 15765-4 CAN (29 bit ID, 250 kbaud).
For example, if a pin is known to be a CAN interface, the candidate communication protocols for the pin may be determined from the correspondence between the physical interface type and the communication protocol to be lxo15765—4can (11 bit lD, 500 kbaud), ISO 15765-4can (29 bit ID, 500 kbaud), ISO 15765-4can (11 bit ID, 250 kbaud), and ISO 15765-4can (29 bit ID, 250 kbaud).
For another example, if a pin is known to be a PWM interface, a candidate communication protocol for the pin may be determined to be SAE J1850 PWM (41.6 kbaud) from the correspondence between the physical interface type and the communication protocol.
As a possible implementation manner, the protocol adaptive diagnosis method supporting the OBD interface of the vehicle may further include: and monitoring the response corresponding to each OBD universal request command. Based on this, the step S108 (i.e. determining the final communication protocol of each target pin based on the response of the vehicle ECU to each OBD universal request command) may include: if the response of the OBD general request command is monitored, determining the final communication protocol of the target pin corresponding to the OBD general request command based on the response and the communication parameters of the corresponding candidate communication protocol.
Illustratively, after a response of a certain OBD universal request command is monitored, if the response matches with a communication parameter of a corresponding candidate communication protocol, determining the candidate communication protocol with the communication parameter matching with the response as a final communication protocol of a corresponding target pin; if the response is not matched with the communication parameters of the corresponding candidate communication protocols, the normal communication between the corresponding target pin and the vehicle ECU can not be carried out through the corresponding candidate communication protocols, the response of the OBD universal request command corresponding to other candidate communication protocols is continuously monitored, and the final communication protocol of the corresponding target pin is further determined from the other candidate communication protocols.
As a possible implementation manner, the step S108 (i.e. determining the final communication protocol of each target pin based on the response of the vehicle ECU to each OBD universal request command) may further include: if the response of the OBD universal request command is not monitored, the voltage of the corresponding target pin is re-detected.
Illustratively, after not monitoring the response of a certain OBD universal request command, the voltage of the target pin used for sending the OBD universal request command may be re-detected, so that the relevant personnel can confirm the working state (such as whether the corresponding target pin is faulty, whether the corresponding target pin is powered down, etc.).
As a possible implementation manner, the protocol adaptive diagnosis method supporting the OBD interface of the vehicle may further include: and establishing communication connection between each target pin and the vehicle ECU based on the final communication protocol of each target pin.
For example, after determining the final communication protocol of each target pin of the vehicle OBD interface, each target pin may establish a communication connection with the vehicle ECU through its final communication protocol, so that after the vehicle OBD interface accesses the standard OBD device, diagnosis of the vehicle may be performed through normal communication between each target pin and the vehicle ECU.
For ease of understanding, the protocol adaptive diagnostic method described above for supporting a vehicle OBD interface is described herein by way of example in a specific application. The correspondence between the physical interface type and the communication protocol is represented by the above 9 common combinations of the physical interface and the communication protocol, and the protocol self-adaptive diagnosis method supporting the vehicle OBD interface can be performed according to the following operation modes:
step one, detecting the pin voltage of an OBD diagnosis port (namely a vehicle OBD interface) and pre-judging a corresponding physical communication interface.
In the first step, the pin voltage values of the remaining 14 pins except the 4 pins and the 5 pins of the OBD diagnosis port can be collected.
The pre-judging process of the physical communication interface in the first step is as follows:
(1) If the pin voltage is about 5V, the pin can be predicted to be a PWM interface, and the communication protocol can adopt SAE J1850 PWM (41.6 kbaud).
(2) If the pin voltage is 7-8V, the pin can be predicted to be a VPW interface, and the communication protocol can be SAE J1850 VPW (10.4 kbaud).
(3) If the pin voltage is the same as the voltage of the 16 pins (which is defined as the vehicle battery voltage, namely, the power supply), the pin can be predicted to be a K line interface, and the communication protocol can be three types of ISO 9141-2 (5 baud init), ISO14230-4 KWP (5 baud init) and ISO14230-4 KWP (fast init).
(4) If the pin voltage is about 2.5V, the pins CAN be prejudged to be CAN interfaces, and the communication protocol CAN adopt four types of lSO 15765-4 CAN (11 bit lD, 500 kbaud), ISO 15765-4 CAN (29 bit ID, 500 kbaud), ISO 15765-4 CAN (11 bit ID, 250 kbaud) and ISO 15765-4 CAN (29 bit ID, 250 kbaud).
(5) If the pin voltage is different from the above cases, it cannot be determined which of the four physical communication interfaces the pin is, which indicates that the pin may not be suitable for OBD diagnosis, and at this time, the pin may be reconfigured or disabled according to the standard correspondence between the pin of the OBD diagnosis port and the communication protocol, so as to avoid the influence of the pin voltage on the integrity and correctness of the vehicle bus level signal and related data. Table 1 shows the standard correspondence between pins of OBD diagnostics and communication protocols.
TABLE 1 Standard correspondence Table between pins of OBD diagnostic port and communication protocol
The definition of each communication protocol shown in table 1 is described as follows:
1) SAE J1850 PWM (pulse width modulation-41.6 kB/sec, standard of ford motor company): pin 2 is defined as bus+, and pin 10 is defined as: bus-, high pressure +5V.
2) SAE J1850 VPW (variable pulse width-10.4/41.6 kB/sec, general automotive standard): pin 2 is defined as bus+, bus is idle low, and high voltage is + V.
3) ISO 9141-2: the asynchronous serial data rate of this protocol is 10.4 kbps, mainly used for automobiles in claiser, europe and asia; pin 7 is defined as the K line, pin 15 is defined as the L line (optional), UART signaling is supported, the K line is idle at a high level of 12V/24V, and the active/dominant state is driven low by an open collector driver.
4) ISO14230 (KWP 2000): pin 7 is defined as the K line and pin 15 is defined as the L line (optional), the physical layer is the same as ISO 9141-2.
5) ISO 15765 CAN (250 kbit/s or 500 kbit/s): pin 6 is defined as CAN high (typically slightly above 2.5V), pin 14 is defined as CAN low (typically slightly below 2.5V), satisfying CAN high+CAN low=5V, and CAN bus idle voltage of 2.5V.
After the pre-judgment is completed, the corresponding pins can be connected to the corresponding physical communication interfaces, and the second step is prepared.
And step two, setting corresponding physical communication interface parameters (namely communication parameters of corresponding communication protocols) by the selection pins, and sending a general request command of the corresponding communication protocols to the vehicle ECU.
After the pre-judging physical communication interface is finished and the physical communication interface is connected, an OBD universal request command of a corresponding communication protocol (wherein a command field is '0100', and the command field characterizes the OBD universal request command for handshake with the vehicle ECU) can be sent to the vehicle ECU through each pin according to the physical communication interface parameters set by the pin.
Step three, waiting for the response of the vehicle ECU, and returning to the step one if no response exists until all pin voltage detection of the OBD diagnosis port is completed; if the vehicle ECU responds normally (the communication connection is normal), the communication protocol adopted by the OBD general request command which the vehicle ECU responds normally is determined as the final communication protocol of the corresponding pin, a response result is output, and the vehicle ECU waits for receiving the subsequent request command when the vehicle diagnosis is carried out.
In addition, in the protocol adaptive diagnosis method supporting the vehicle OBD interface, before detecting the voltage of each target pin of the vehicle OBD interface, the state information of the vehicle may be detected, and whether to start detecting the voltage of each target pin of the vehicle OBD interface may be determined according to the state information of the vehicle.
The state information may include, but is not limited to, an ignition state of the vehicle, an operation state (such as a rotational speed) of an engine of the vehicle, a driving speed of the vehicle, a driving acceleration of the vehicle, and the like.
For example, when it is determined that ignition of the vehicle has been detected, voltage detection of each target pin of the vehicle OBD interface may be started at this time, and then the step of detecting the voltage of each target pin of the vehicle OBD interface is performed. For another example, the speed detection unit (such as a speed sensor) detects the running speed of the vehicle, when detecting that the running speed of the vehicle is not 0, it is determined that the voltage detection of each target pin of the vehicle OBD interface can be started at this time, and then the step of detecting the voltage of each target pin of the vehicle OBD interface is performed. For example, the vehicle speed is detected by an acceleration detecting unit (such as an acceleration sensor, etc.), when the magnitude of the vehicle acceleration is detected to be not 0, it is determined that the voltage detection of each target pin of the vehicle OBD interface can be started at this time, and then the step of detecting the voltage of each target pin of the vehicle OBD interface is executed. For example, when the engine speed of the vehicle is detected by the vehicle meter, it is determined that the voltage detection of each target pin of the vehicle OBD interface can be started at this time when the engine speed of the vehicle is detected to exceed a certain value, and then the step of detecting the voltage of each target pin of the vehicle OBD interface is executed.
By adopting the operation mode, the voltage detection time of each target pin of the OBD interface of the vehicle can be determined according to the vehicle state, and the effectiveness of vehicle diagnosis is further improved.
The protocol self-adaptive diagnosis method supporting the OBD interface of the vehicle has the advantages that: the automatic detection of the physical communication interfaces is realized, and the final communication protocol of the corresponding pins is determined according to the response condition of the vehicle ECU by sending the OBD universal request command to the vehicle ECU, so that the switching and remapping of the pins of the vehicle OBD interfaces are realized, the pins of each physical communication interface can be remapped and connected to the actual vehicle pins, the selection and connection of dynamic physical communication lines are realized, and the adaptability and the accuracy of diagnosis of different vehicles by standard OBD equipment are improved.
Based on the above-mentioned protocol adaptive diagnosis method supporting the vehicle OBD interface, the embodiment of the present invention further provides a protocol adaptive diagnosis device supporting the vehicle OBD interface, as shown in fig. 3, the device may include the following modules:
the detection determining module 302 is configured to detect a voltage of each target pin of the OBD interface of the vehicle, and determine a physical interface type of each target pin based on the voltage of each target pin.
The first determining module 304 is configured to determine at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and a preset correspondence between the physical interface type and the communication protocol.
And the sending module 306 is configured to send, to the vehicle ECU, an OBD universal request command of the corresponding candidate communication protocol based on the communication parameter of each candidate communication protocol corresponding to the target pin through each target pin.
A second determining module 308, configured to determine a final communication protocol of each target pin based on a response situation of the vehicle ECU to each OBD universal request command.
The protocol self-adaptive diagnosis device supporting the vehicle OBD interface provided by the embodiment of the invention can accurately detect the physical interface types and specific communication protocols of the pins of different vehicle OBD interfaces, so that the standard OBD equipment can dynamically select a physical communication line to establish communication with the vehicle ECU after being connected with the different vehicle OBD interfaces, and the self-adaptability and the accuracy of the standard OBD equipment for diagnosing different vehicles are improved.
The detection determination module 302 described above may also be used to: if the voltage of the target pin is within a preset voltage range, determining the physical interface type of the target pin as a first type which is characterized as being suitable for OBD diagnosis; and if the voltage of the target pin is not in the preset voltage range, determining that the physical interface type of the target pin is a second type which is characterized as unsuitable for OBD diagnosis.
The first determining module 304 may also be configured to: if the physical interface type of the target pin is the first type, all communication protocols corresponding to the first type are determined to be at least one candidate communication protocol of the target pin based on the corresponding relation between the physical interface type and the communication protocols.
The preset voltage range may include: the first voltage range of the represented CAN interface, the second voltage range of the represented K line interface, the third voltage range of the represented PWM interface and the fourth voltage range of the represented VPW interface; the first type may include: CAN interface, K line interface, PWM interface and VPW interface. Based on this, the above-described detection determination module 302 may also be used to: if the voltage of the target pin is in the first voltage range, determining that the physical interface type of the target pin is a CAN interface; if the voltage of the target pin is in the second voltage range, determining that the physical interface type of the target pin is a K line interface; if the voltage of the target pin is in the third voltage range, determining that the physical interface type of the target pin is a PWM interface; and if the voltage of the target pin is in the fourth voltage range, determining that the physical interface type of the target pin is a VPW interface.
Based on the foregoing protocol adaptive diagnostic apparatus supporting the OBD interface of the vehicle shown in fig. 3, the embodiment of the present invention further provides another protocol adaptive diagnostic apparatus supporting the OBD interface of the vehicle, as shown in fig. 4, the apparatus may further include:
and the monitoring module 310 is configured to monitor a response corresponding to each OBD universal request command.
The establishing module 312 is configured to establish a communication connection between each target pin and the vehicle ECU based on the final communication protocol of each target pin.
The second determination module 308 may also be configured to: if the response of the OBD general request command is monitored, determining a final communication protocol of a target pin corresponding to the OBD general request command based on the response and the communication parameters of the corresponding candidate communication protocol.
The second determination module 308 may also be configured to: and if the response is matched with the communication parameters of the corresponding candidate communication protocols, determining the candidate communication protocol with the communication parameters matched with the response as the final communication protocol of the corresponding target pin.
The second determination module 308 may also be configured to: if the response of the OBD universal request command is not monitored, the voltage of the corresponding target pin is re-detected.
The protocol adaptive diagnosis device supporting the OBD interface of the vehicle provided by the embodiment of the invention has the same implementation principle and technical effects as those of the embodiment of the protocol adaptive diagnosis method supporting the OBD interface of the vehicle, and for the sake of brief description, the corresponding contents in the embodiment of the method can be referred to where the embodiment of the device is not mentioned.
The relative steps, numerical expressions and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A protocol adaptive diagnostic method supporting a vehicle OBD interface, comprising:
detecting the voltage of each target pin of the OBD interface of the vehicle, and determining the physical interface type of each target pin based on the voltage of each target pin;
determining at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and the corresponding relation between the preset physical interface type and the communication protocol;
sending an OBD universal request command of the corresponding candidate communication protocol to the vehicle ECU through each target pin based on the communication parameters of each corresponding candidate communication protocol;
and determining a final communication protocol of each target pin based on the response condition of the vehicle ECU to each OBD universal request command.
2. The protocol adaptive diagnostic method supporting an OBD interface of a vehicle of claim 1, wherein determining the physical interface type of each target pin based on the voltage of each target pin comprises:
if the voltage of the target pin is within a preset voltage range, determining the physical interface type of the target pin as a first type which is characterized as being suitable for OBD diagnosis;
and if the voltage of the target pin is not in the preset voltage range, determining that the physical interface type of the target pin is a second type which is characterized as unsuitable for OBD diagnosis.
3. The protocol adaptive diagnostic method for supporting an OBD interface of a vehicle according to claim 2, wherein determining at least one candidate communication protocol for each target pin based on a physical interface type of each target pin and a correspondence between a preset physical interface type and a communication protocol comprises:
if the physical interface type of the target pin is the first type, all communication protocols corresponding to the first type are determined to be at least one candidate communication protocol of the target pin based on the corresponding relation between the physical interface type and the communication protocols.
4. The protocol adaptive diagnostic method supporting a vehicle OBD interface of claim 1, further comprising:
monitoring the response corresponding to each OBD universal request command;
based on the response of the vehicle ECU to the OBD universal request command, determining the final communication protocol of each target pin comprises the following steps:
if the response of the OBD general request command is monitored, determining a final communication protocol of a target pin corresponding to the OBD general request command based on the response and the communication parameters of the corresponding candidate communication protocol.
5. The method of claim 4, wherein determining a final communication protocol of a target pin corresponding to the OBD universal request command based on the response and the communication parameters of the corresponding candidate communication protocol, comprises:
and if the response is matched with the communication parameters of the corresponding candidate communication protocols, determining the candidate communication protocol with the communication parameters matched with the response as the final communication protocol of the corresponding target pin.
6. The method of claim 4, wherein determining a final communication protocol for each target pin based on a response of the vehicle ECU to each OBD generic request command, further comprises:
if the response of the OBD universal request command is not monitored, the voltage of the corresponding target pin is re-detected.
7. A protocol adaptive diagnostic method supporting a vehicle OBD interface according to claim 3, wherein said preset voltage range comprises: the first voltage range of the represented CAN interface, the second voltage range of the represented K line interface, the third voltage range of the represented PWM interface and the fourth voltage range of the represented VPW interface;
the first type includes: CAN interface, K line interface, PWM interface and VPW interface.
8. The method of claim 7, wherein determining the physical interface type of the target pin as the first type characterizing OBD diagnostics if the voltage of the target pin is within a predetermined voltage range comprises:
if the voltage of the target pin is in the first voltage range, determining that the physical interface type of the target pin is a CAN interface;
if the voltage of the target pin is in the second voltage range, determining that the physical interface type of the target pin is a K line interface;
if the voltage of the target pin is in the third voltage range, determining that the physical interface type of the target pin is a PWM interface;
and if the voltage of the target pin is in the fourth voltage range, determining that the physical interface type of the target pin is a VPW interface.
9. The protocol adaptive diagnostic method supporting a vehicle OBD interface of claim 1, further comprising:
and establishing communication connection between each target pin and the vehicle ECU based on the final communication protocol of each target pin.
10. A protocol-adaptive diagnostic apparatus supporting a vehicle OBD interface, comprising:
the detection and determination module is used for detecting the voltage of each target pin of the OBD interface of the vehicle and determining the physical interface type of each target pin based on the voltage of each target pin;
the first determining module is used for determining at least one candidate communication protocol of each target pin based on the physical interface type of each target pin and the corresponding relation between the preset physical interface type and the communication protocol;
the sending module is used for sending an OBD universal request command of the corresponding candidate communication protocol to the vehicle ECU through each target pin based on the communication parameters of each corresponding candidate communication protocol;
and the second determining module is used for determining the final communication protocol of each target pin based on the response condition of the vehicle ECU to each OBD universal request command.
CN202410070838.1A 2024-01-18 2024-01-18 Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface Pending CN117590835A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410070838.1A CN117590835A (en) 2024-01-18 2024-01-18 Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410070838.1A CN117590835A (en) 2024-01-18 2024-01-18 Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface

Publications (1)

Publication Number Publication Date
CN117590835A true CN117590835A (en) 2024-02-23

Family

ID=89922313

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410070838.1A Pending CN117590835A (en) 2024-01-18 2024-01-18 Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface

Country Status (1)

Country Link
CN (1) CN117590835A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255158A (en) * 2018-01-16 2018-07-06 深圳市道通科技股份有限公司 Vehicular diagnostic method and device
CN113406944A (en) * 2021-05-24 2021-09-17 深圳市元征未来汽车技术有限公司 Vehicle diagnosis method, apparatus, device and computer readable storage medium
CN114143273A (en) * 2021-11-24 2022-03-04 深圳数马电子技术有限公司 Channel allocation method, device, computer equipment and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255158A (en) * 2018-01-16 2018-07-06 深圳市道通科技股份有限公司 Vehicular diagnostic method and device
CN113406944A (en) * 2021-05-24 2021-09-17 深圳市元征未来汽车技术有限公司 Vehicle diagnosis method, apparatus, device and computer readable storage medium
CN114143273A (en) * 2021-11-24 2022-03-04 深圳数马电子技术有限公司 Channel allocation method, device, computer equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
RU2491526C2 (en) Engine diagnostics method
US8738270B2 (en) Method and apparatus for improving the fuel economy of a variable displacement engine
KR102041846B1 (en) A terminal and a method of collecting CAN date of vehicle using a OBD-Ⅱ
US20080071439A1 (en) Automatically identifying Volvo communication protocols method and apparatus
US20130268156A1 (en) Data Privacy Mechanism
JPS6294443A (en) Diagnosis system for vehicle
CN112198863A (en) Diagnostic function control method, system, storage medium, vehicle-mounted communication box and vehicle
CN110488794A (en) A kind of vehicle trouble processing method, diagnostic device and storage medium
CN110545220A (en) Automobile diagnosis protocol detection method and related product
CN111267756B (en) Vehicle speed limit control method, vehicle and medium
KR20120129053A (en) System and method for diagnosing vehicle using wireless network
CN110203157B (en) Auxiliary diagnosis device for abnormal battery power failure, server and system comprising auxiliary diagnosis device
CN117590835A (en) Protocol self-adaptive diagnosis method and device supporting vehicle OBD interface
JP2009213092A (en) Abnormity location identifying apparatus, its control program, and abnormity location identifying system
CN111207932B (en) Motor vehicle exhaust monitoring method and related equipment
CN113406944A (en) Vehicle diagnosis method, apparatus, device and computer readable storage medium
CN116701177A (en) Method and device for testing interface pins of vehicle-mounted diagnostic system and electronic equipment
US9501347B2 (en) Documentation of faults in a fault memory of a motor vehicle
JPH0882579A (en) Trouble diagnostic device
JP3799797B2 (en) Diagnostic equipment for vehicles
CN113253701B (en) Vehicle remote diagnosis system and method
CN113847939A (en) Offline fault diagnosis system and method applied to vehicle instrument
CN110091858B (en) Self-learning method for engine on hybrid vehicle
CN111580502A (en) OBD diagnostic instrument system applied to motor vehicle environment-friendly detection process
JP2005014743A (en) Failure part detection device for vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination