CN117130341A - Vehicle diagnosis method and vehicle-mounted gateway - Google Patents

Vehicle diagnosis method and vehicle-mounted gateway Download PDF

Info

Publication number
CN117130341A
CN117130341A CN202310724954.6A CN202310724954A CN117130341A CN 117130341 A CN117130341 A CN 117130341A CN 202310724954 A CN202310724954 A CN 202310724954A CN 117130341 A CN117130341 A CN 117130341A
Authority
CN
China
Prior art keywords
diagnosis
module
doip
shared memory
data
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
CN202310724954.6A
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.)
Beijing Yinwo Automotive Technology Co ltd
Original Assignee
Beijing Yinwo Automotive 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 Beijing Yinwo Automotive Technology Co ltd filed Critical Beijing Yinwo Automotive Technology Co ltd
Priority to CN202310724954.6A priority Critical patent/CN117130341A/en
Publication of CN117130341A publication Critical patent/CN117130341A/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

Abstract

The application provides a vehicle diagnosis method and a vehicle gateway, wherein a DoIP module, a CAN module and a shared memory are integrated on the vehicle gateway, and during diagnosis, the DoIP module and the CAN module carry out data communication through the shared memory and realize the mutual conversion and routing of a DoIP diagnosis message and a Docan diagnosis message, so that diagnosis equipment CAN complete the whole vehicle diagnosis only by supporting the DoIP diagnosis function, the complexity of a diagnosis mode is reduced, and the diagnosis efficiency is improved.

Description

Vehicle diagnosis method and vehicle-mounted gateway
Technical Field
The present application relates to vehicle diagnosis technologies, and in particular, to a vehicle diagnosis method and a vehicle gateway.
Background
As vehicle electronics advances, the number of on-board electronic control units (automotive electronic controlunit, ECU) has increased. When a vehicle fails and needs to be diagnosed, a diagnosis request is usually sent to the ECU through an external diagnosis device, and the ECU feeds back a diagnosis response to the diagnosis device, so that the process of diagnosis service is completed. In addition, when the vehicle is off-line or upgraded, relevant configuration parameters and update programs need to be read and written in a UDS diagnosis mode.
In the diagnosis process, a relevant vehicle-mounted diagnosis standard protocol such as a diagnosis communication standard protocol (Diagnostic communicate over Internet Protocol, doIP) based on a network protocol or a diagnosis communication standard protocol (Diagnose over Controller Area Network, doCAN) based on a controller area network can be used, and protocol conversion and data transmission are realized among different devices so as to complete real-time diagnosis of the vehicle.
Most ECUs support the docp diagnostic mode, however, some ECUs currently only support the docn diagnostic mode, which requires the diagnostic device to support both the docp and docn diagnostic modes. The diagnosis modes cannot be unified, so that the whole vehicle diagnosis process is complex.
Disclosure of Invention
The application aims to provide a vehicle diagnosis method and a vehicle-mounted gateway, which realize the mutual conversion of a DoIP diagnosis message and a DoCAN diagnosis message, so that diagnosis equipment can complete the diagnosis of the whole vehicle only by supporting the DoIP diagnosis function.
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
According to a first aspect of the present application, there is provided a vehicle diagnosis method, performed by a vehicle gateway, the vehicle gateway including a DoIP module, a CAN module, and a shared memory, the DoIP module being in data communication with a diagnosis device through an OBD interface, the CAN module being in data communication with at least one in-vehicle ECU through a CAN bus, the DoIP module and the CAN module being in data communication through the shared memory, the shared memory including a diagnosis request shared memory and a diagnosis response shared memory;
the vehicle diagnosis method includes the steps of: the DoIP module receives a DoIP diagnosis request message from the diagnosis equipment, performs data serialization, converts the data into a data packet with a CanID, and puts the data packet into a diagnosis request shared memory; the CAN module reads the data in the shared memory of the diagnosis request, performs deserialization and sends the data to the corresponding ECU; the CAN module receives the Docan diagnosis response message from the ECU, performs data serialization, converts the data into a data packet with a CanID, and puts the data packet into a diagnosis response shared memory; the DoIP module reads the data in the diagnosis response shared memory, performs deserialization and sends the data to the diagnosis equipment.
In one embodiment, the DoIP module communicates with the diagnostic device via the DoIP protocol; the CAN module communicates with ECUs via CanTP protocol, each ECU being configured with a set of separate DoIP channels and CanTP channels.
In an embodiment, each set of DoIP channels and CanTP channels corresponds to a CanID, the DoIP module selects a corresponding DoIP channel according to the CanID to send a diagnostic response message to the diagnostic device, and the CAN module selects a corresponding CanTP channel according to the CanID to send the diagnostic response message to the ECU.
In one embodiment, the packets in the diagnostic response shared memory and the diagnostic request shared memory are queued in a CANID.
According to a second aspect of the present application, there is provided a vehicle-mounted gateway, the vehicle-mounted gateway including a DoIP module, a CAN module, and a shared memory, the DoIP module being in data communication with a diagnostic device through an OBD interface, the CAN module being in data communication with at least one in-vehicle ECU through a CAN bus, the DoIP module and the CAN module being in data communication through the shared memory, the shared memory including a diagnostic request shared memory and a diagnostic response shared memory;
the DoIP module is configured to receive a DoIP diagnosis request message from the diagnosis equipment, perform data serialization, convert the data into a data packet with a CanID, and put the data packet into a diagnosis request shared memory;
the CAN module is configured to read the data in the shared memory of the diagnosis request, perform deserialization and send the data to the corresponding ECU;
the CAN module is configured to receive a Docan diagnosis response message from the ECU, perform data serialization, convert the data into a data packet with a CanID and put the data packet into a diagnosis response shared memory;
the DoIP module is configured to read the data in the diagnosis response shared memory, perform deserialization and send the data to the diagnosis equipment.
In one embodiment, the DoIP module communicates with the diagnostic device via the DoIP protocol; the CAN module communicates with ECUs via CanTP protocol, each ECU being configured with a set of separate DoIP channels and CanTP channels.
In an embodiment, each set of DoIP channels and CanTP channels corresponds to a CanID, the DoIP module selects a corresponding DoIP channel according to the CanID to send a diagnostic response message to the diagnostic device, and the CAN module selects a corresponding CanTP channel according to the CanID to send the diagnostic response message to the ECU.
In one embodiment, the packets in the diagnostic response shared memory and the diagnostic request shared memory are queued in a CANID.
The embodiment of the application has the beneficial effects that: by integrating the DoIP module, the CAN module and the shared memory on the vehicle-mounted gateway, the DoIP module and the CAN module perform data communication through the shared memory during diagnosis, and realize the mutual conversion and routing of the DoIP diagnosis message and the Docan diagnosis message, so that the diagnosis equipment CAN complete the whole vehicle diagnosis only by supporting the DoIP diagnosis function, the complexity of a diagnosis mode is reduced, and the diagnosis efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
The above features and advantages of the present application will be better understood after reading the detailed description of embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily to scale and components having similar related features or characteristics may have the same or similar reference numerals.
FIG. 1 is a schematic diagram of hardware interactions of an embodiment of the present application;
FIG. 2 is a schematic workflow diagram of a DoIP module;
fig. 3 is a schematic workflow diagram of a CanTP module.
Detailed Description
The application is described in detail below with reference to the drawings and the specific embodiments. It is noted that the aspects described below in connection with the drawings and the specific embodiments are merely exemplary and should not be construed as limiting the scope of the application in any way.
During the vehicle's offline/after-market/upgrade process, relevant configuration parameters and update programs are typically read and written by means of UDS diagnostics (Unified Diagnostic Services, unified diagnostic service). Since some ECUs on the vehicle support only DoCan diagnosis, this makes it necessary for the diagnosis apparatus to support both of the DoCan and DoCan diagnosis modes at the same time when diagnosing the vehicle.
In view of this problem, the present embodiment provides a vehicle diagnosis method and a vehicle gateway for executing the method, and the hardware connection relationship is as shown in fig. 1: the vehicle-mounted gateway comprises a DoIP module, a CAN module and a shared memory. The DoIP module communicates data via an OBD interface, via a 100Base-Tx ethernet line, with a diagnostic instrument. The CAN module is in data communication with at least one in-vehicle ECU through a CAN bus. The DoIP module and the CAN module carry out data communication through a shared memory, and the shared memory comprises a diagnosis request shared memory and a diagnosis response shared memory.
The vehicle diagnosis method includes the steps of:
s1, a DoIP module receives a DoIP diagnosis request message from diagnosis equipment, performs data serialization, converts the data into a data packet with a CanID, and puts the data packet into a diagnosis request shared memory;
s2, the CAN module reads data in the shared memory of the diagnosis request, performs deserialization and sends the data to the corresponding ECU;
s3, the CAN module receives the Docan diagnosis response message from the ECU, performs data serialization, converts the data into a data packet with a CanID, and puts the data packet into a diagnosis response shared memory;
s4, the DoIP module reads the data in the diagnosis response shared memory, performs deserialization and sends the data to the diagnosis equipment.
The steps are general steps, but the steps are not necessarily performed in the order described above, and for example, the steps may be performed synchronously.
As shown in fig. 2, the workflow of the DoIP module is:
polling whether diagnostic response data exists in the diagnostic response shared memory;
if so, the diagnosis response data is read and deserialized, and then the diagnosis response data is matched with the corresponding DoIP channel according to the CANID and is sent out through the OBD port.
If the data packet does not exist, judging whether a DoIP diagnosis request message from external equipment is received, when a diagnosis request targeting a certain ECU is received, matching a corresponding CANID according to a DoIP channel where the diagnosis request is located, serializing the data into a data packet with a CANID identifier, and putting the data packet into a diagnosis request shared memory to wait for the processing of a CAN module.
As shown in fig. 3, the workflow of the CAN module is:
polling whether diagnosis request data exists in the diagnosis request shared memory;
if so, the diagnostic request data is fetched and deserialized. And according to the CANID, the CANTP channel is matched with a corresponding CANTP channel, and the CANTP channel is transmitted to a corresponding ECU through a CAN bus.
If the data packet with the CANID identifier does not exist, judging whether a DoCAN diagnosis response message from the in-vehicle ECU is received, matching the corresponding CANID according to the corresponding CanTP channel when the diagnosis response is received, and then serializing the data into the data packet with the CANID identifier, and putting the data packet into a diagnosis response shared memory to wait for the treatment of a DoIP module.
In this embodiment, each ECU is configured with a set of individual DoIP channels and CanTP channels so that multiple ECUs can diagnose simultaneously.
Each group of DoIP channels and CanTP channels correspond to a CanID, the DoIP module selects the corresponding DoIP channel according to the CanID to send the diagnosis response message to the diagnosis equipment, and the CAN module selects the corresponding CanTP channel according to the CanID to send the diagnosis response message to the ECU. Similarly, the DoIP module matches the corresponding CANID according to the DoIP channel, and the CAN module matches the corresponding CANID according to the CanTP channel.
Preferably, the diagnostic response shared memory and the data packets in the diagnostic request shared memory are queued according to the caid, thereby enabling the system to transmit and receive orderly.
The diagnostic device according to the present application may be various diagnostic devices in the whole vehicle off-Line (EOL) process (End of Line), such as a diagnostic device, a test bench, and the like.
In summary, the present embodiment proposes a vehicle diagnosis method and an on-board gateway, where a separate DoIP channel and CanTP channel are configured for each ECU, for communicating with an ECU in a vehicle of an external diagnosis device. Two blocks of shared memory are constructed for diagnosis request and response and used for communication of the DoIP module and the CanTP module. The DoIP module receives a diagnosis request message of the diagnostic instrument into the shared memory, and after the Can module reads the shared memory to obtain data, the corresponding ECU diagnosis ID is resolved, and the CanTP interface is called to send to the corresponding ECU. When CanTP receives the diagnosis response of ECU, the response message is put into the shared memory, the DoIP_module reads the shared memory data and sends the data to the diagnosis instrument through the corresponding DoIP channel. Through the design, the mutual conversion and routing of the DoIP diagnosis message and the Docan diagnosis message are realized, the diagnosis equipment can complete the whole vehicle diagnosis only by supporting the DoIP diagnosis function, the complexity of the diagnosis mode is reduced, and the diagnosis efficiency is improved.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description is only of preferred embodiments of the application and is not intended to limit the application to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the application.

Claims (8)

1. A vehicle diagnostic method performed by an on-board gateway, characterized by:
the vehicle-mounted gateway comprises a DoIP module, a CAN module and a shared memory, wherein the DoIP module is in data communication with the diagnosis equipment through an OBD interface, the CAN module is in data communication with at least one in-vehicle ECU through a CAN bus, the DoIP module and the CAN module are in data communication through the shared memory, and the shared memory comprises a diagnosis request shared memory and a diagnosis response shared memory;
the vehicle diagnosis method includes the steps of:
the DoIP module receives a DoIP diagnosis request message from the diagnosis equipment, performs data serialization, converts the data into a data packet with a CanID, and puts the data packet into a diagnosis request shared memory;
the CAN module reads the data in the shared memory of the diagnosis request, performs deserialization and sends the data to the corresponding ECU; the CAN module receives the Docan diagnosis response message from the ECU, performs data serialization, converts the data into a data packet with a CanID, and puts the data packet into a diagnosis response shared memory;
the DoIP module reads the data in the diagnosis response shared memory, performs deserialization and sends the data to the diagnosis equipment.
2. The vehicle diagnostic method of claim 1, wherein the DoIP module communicates with a diagnostic device via a DoIP protocol; the CAN module communicates with ECUs via CanTP protocol, each ECU being configured with a set of separate DoIP channels and CanTP channels.
3. The vehicle diagnosis method according to claim 2, wherein each set of DoIP channels and CanTP channels corresponds to a CanID, the DoIP module selects a corresponding DoIP channel according to the CanID to send a diagnosis response message to the diagnosis device, and the CAN module selects a corresponding CanTP channel according to the CanID to send the diagnosis response message to the ECU.
4. A vehicle diagnostic method according to claim 3 wherein the packets in the diagnostic response shared memory and the diagnostic request shared memory are queued in a cand.
5. The vehicle-mounted gateway is characterized by comprising a DoIP module, a CAN module and a shared memory, wherein the DoIP module is in data communication with diagnostic equipment through an OBD interface, the CAN module is in data communication with at least one in-vehicle ECU through a CAN bus, the DoIP module and the CAN module are in data communication through the shared memory, and the shared memory comprises a diagnostic request shared memory and a diagnostic response shared memory;
the DoIP module is configured to receive a DoIP diagnosis request message from the diagnosis equipment, perform data serialization, convert the data into a data packet with a CanID, and put the data packet into a diagnosis request shared memory;
the CAN module is configured to read the data in the shared memory of the diagnosis request, perform deserialization and send the data to the corresponding ECU;
the CAN module is configured to receive a Docan diagnosis response message from the ECU, perform data serialization, convert the data into a data packet with a CanID and put the data packet into a diagnosis response shared memory;
the DoIP module is configured to read the data in the diagnosis response shared memory, perform deserialization and send the data to the diagnosis equipment.
6. The vehicle gateway of claim 5, wherein the DoIP module communicates with a diagnostic device via a DoIP protocol; the CAN module communicates with ECUs via CanTP protocol, each ECU being configured with a set of separate DoIP channels and CanTP channels.
7. The vehicle gateway of claim 6, wherein each set of DoIP channels and CanTP channels corresponds to a CanID, the DoIP module selects a corresponding DoIP channel according to the CanID to send a diagnostic response message to the diagnostic device, and the CAN module selects a corresponding CanTP channel according to the CanID to send the diagnostic response message to the ECU.
8. The vehicle gateway of claim 7, wherein the packets in the diagnostic response shared memory and the diagnostic request shared memory are queued in a cand.
CN202310724954.6A 2023-06-19 2023-06-19 Vehicle diagnosis method and vehicle-mounted gateway Pending CN117130341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310724954.6A CN117130341A (en) 2023-06-19 2023-06-19 Vehicle diagnosis method and vehicle-mounted gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310724954.6A CN117130341A (en) 2023-06-19 2023-06-19 Vehicle diagnosis method and vehicle-mounted gateway

Publications (1)

Publication Number Publication Date
CN117130341A true CN117130341A (en) 2023-11-28

Family

ID=88855474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310724954.6A Pending CN117130341A (en) 2023-06-19 2023-06-19 Vehicle diagnosis method and vehicle-mounted gateway

Country Status (1)

Country Link
CN (1) CN117130341A (en)

Similar Documents

Publication Publication Date Title
US7096101B2 (en) Method for carrying out a telediagnosis on a motor vehicle, vehicle diagnosis module and service center
US9305408B2 (en) Multiple electronic control unit diagnosing system and method for vehicle
JP3307215B2 (en) Failure diagnosis device for vehicle electronic control unit
US8665891B2 (en) Gateway apparatus
US7493198B2 (en) Method and device for a vehicle-related telematics service
CN108303964B (en) Network connector and vehicle diagnosis method
US7519455B2 (en) Method and device for a vehicle-related telematics service
US6360145B1 (en) Vehicle platform-portable controller
JP5709055B2 (en) Electronic control device for vehicle
JP2017019501A (en) Remote vehicle programming system and method
CN109656172A (en) A kind of method, apparatus obtaining baud rate
KR101855753B1 (en) Gateway apparatus for vehicles diagnosis and system having the same
CN111427335A (en) Vehicle remote diagnosis method, equipment connector and vehicle connector
JP2012530395A (en) Vehicle communication interface and method of operating the same
US20080288768A1 (en) Arrangement and method for reprogramming control devices
JP2006352201A (en) Communication conversion control device
CN109660436B (en) Dual-CAN channel data processing method, gateway equipment and system
CN111552268A (en) Vehicle remote diagnosis method, equipment connector and vehicle connector
CN115051975A (en) ECU remote upgrading method based on vehicle-mounted Ethernet
CN117130341A (en) Vehicle diagnosis method and vehicle-mounted gateway
CN112927392A (en) Communication method, vehicle communication interface device and readable storage medium
CN116319499A (en) Diagnostic method and device for vehicle, electronic equipment and storage medium
CN114003018A (en) Vehicle diagnosis method and related device
JP7140011B2 (en) Gateway device
KR101165854B1 (en) Self-Diagnosis System For MOST System

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