CN105388893A - CAN communication data monitoring method and system based on OBD interface - Google Patents

CAN communication data monitoring method and system based on OBD interface Download PDF

Info

Publication number
CN105388893A
CN105388893A CN201511008405.0A CN201511008405A CN105388893A CN 105388893 A CN105388893 A CN 105388893A CN 201511008405 A CN201511008405 A CN 201511008405A CN 105388893 A CN105388893 A CN 105388893A
Authority
CN
China
Prior art keywords
gateway controller
diagnostic device
request instruction
communication data
diagnosis request
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.)
Granted
Application number
CN201511008405.0A
Other languages
Chinese (zh)
Other versions
CN105388893B (en
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.)
Anhui Jianghuai Automobile Group Corp
Original Assignee
Anhui Jianghuai Automobile Group Corp
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 Anhui Jianghuai Automobile Group Corp filed Critical Anhui Jianghuai Automobile Group Corp
Priority to CN201511008405.0A priority Critical patent/CN105388893B/en
Publication of CN105388893A publication Critical patent/CN105388893A/en
Application granted granted Critical
Publication of CN105388893B publication Critical patent/CN105388893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • 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/25Pc structure of the system
    • G05B2219/25032CAN, canbus, controller area network bus

Abstract

The invention relates to a CAN communication data monitoring method and system, in particular to a CAN communication data monitoring method and system based on an OBD interface. The method includes the steps that a diagnosis device sends a diagnosis request instruction to a gateway controller through the OBD-II interface; the gateway controller detects whether the format of the diagnosis request instruction is correct or not after receiving the diagnosis request instruction; if yes, the gateway controller sends a positive response message to the diagnosis device according to the diagnosis request instruction so that the diagnosis device can monitor CAN communication data of a CAN subnet; if not, the gateway controller sends a negative response message to the diagnosis device. By means of the method and the system, foundation is provided for vehicle failure checking and analyzing.

Description

A kind of CAN communication data monitoring method based on OBD interface and system
Technical field
The present invention relates to a kind of CAN communication data monitoring method and system, particularly a kind of CAN communication data monitoring method based on OBD interface and system.
Background technology
Along with developing rapidly of automobile electronics, the increase of car load electric function causes entire car controller greatly to increase, and the application of gateway technique, make vehicle CAN bus topology more complicated, as a kind of CAN topological structure schematic diagram that Fig. 1 is with gateway architecture in prior art, in Fig. 1, gateway controller outside is connected to five CAN subnet CAN1 to CAN5, each subnet has different CAN nodes, such as, CAN node 1 shown in figure, CAN node 2 ... CAN node 10, gateway controller is connected with inline diagnosis interface OBD-II by diagnosis CAN.
Due to, diagnosis CAN is connected to OBD mouth, other communications CAN is directly connected on gateway controller, therefore diagnostic function can only be carried out by OBD mouth to gateway controller, each subnet section CAN communication information cannot be got, and except by except the diagnostic functions such as diagnostic device read failure code after car load breaks down, current car load communication data state is also the important evidence of malfunction elimination and analysis.
In order to solve the problem, each CAN subnet bus is directly accessed OBD mouth, car load each CAN subnet communication information directly can be obtained by the connection of diagnostic device and OBD mouth, as the another kind of CAN topological structure schematic diagram that Fig. 2 is with gateway architecture in prior art, Fig. 2 is by the directly access OBD mouth of each subnet (CAN1 to CAN5) shown in Fig. 1.
But existing standard OBD mouth resource-constrained, generally only has 16 pins, most multipotency accesses 4 CAN, therefore can only obtain at most 4 subnet CAN communication information, and along with car load CAN network segment number increases, system as shown in Figure 2, just can not satisfy the demands; And car load subnet is directly connected in OBD mouth, and any diagnostic device can have access to car load communication information, and data security is not strong.
Summary of the invention
The invention provides a kind of CAN communication data monitoring method based on OBD interface and system, to realize the monitoring to car load CAN communication information state, for vehicle failure investigation and analysis provide foundation.
For achieving the above object, the invention provides following technical scheme:
Based on a CAN communication data monitoring method for OBD interface, described method comprises:
Diagnostic device sends diagnosis request instruction by OBD-II interface to gateway controller;
After described gateway controller receives described diagnosis request instruction, whether correctly detect described diagnosis request instruction form;
If correct, described gateway controller sends positive response message according to described diagnosis request instruction to diagnostic device, with the CAN communication data making described diagnostic device monitor CAN subnet; Otherwise described gateway controller sends negative response message to diagnostic device.
Preferably, described diagnosis request instruction comprises: request instruction identifier, Control Cooling, the control network segment;
Described Control Cooling comprise start forward, described diagnosis request instruction also comprises the control time; Or
Described Control Cooling comprises and stopping forwarding or request forward result.
Preferably, described gateway controller specifically comprises to diagnostic device transmission positive response message according to described diagnosis request instruction:
If described Control Cooling forwards for starting, gateway controller to send to diagnostic device according to described diagnosis request instruction and starts transmitted response message, and judges currently whether have the forwarding task performed by arbitration modules; If so, described gateway controller stops the forwarding task of current execution, and forwards the communication data of corresponding CAN subnet according to described diagnosis request instruction; Otherwise, the communication data of corresponding CAN subnet is forwarded according to described diagnosis request instruction.
Preferably, described method also comprises:
Gateway controller judges whether forwarding time exceedes the described control time; If so, gateway controller stops the communication data forwarding CAN subnet to diagnostic device; Otherwise, continue the communication data forwarding CAN subnet to diagnostic device.
Preferably, described beginning transmitted response message comprises: respond services identifier, Control Cooling, the control network segment, state of a control record, E-Packet counting.
Preferably, described gateway controller specifically comprises to diagnostic device transmission positive response message according to described diagnosis request instruction:
If described Control Cooling is for stopping forwarding, gateway controller stops forwarding response message according to described diagnosis request instruction to diagnostic device transmission, and stops the communication data forwarding CAN subnet to diagnostic device.
Preferably, described gateway controller specifically comprises to diagnostic device transmission positive response message according to described diagnosis request instruction:
If described Control Cooling is request forward result, gateway controller sends forwarding result response message according to described diagnosis request instruction to diagnostic device.
Preferably, described negative response message is provided with negative response code, and described negative response code is used for the reason to described diagnostic device prompting negative response.
Based on a CAN communication data monitoring system for OBD interface, comprising: diagnostic device, the OBD-II interface be connected with described diagnostic device, described system also comprises: the CAN subnet that gateway controller is connected with described gateway controller with at least one;
Described diagnostic device is used for sending diagnosis request instruction by OBD-II interface to gateway controller;
After described gateway controller is used for receiving described diagnosis request instruction, whether correctly detect described diagnosis request instruction form; If correct, described gateway controller sends positive response message according to described diagnosis request instruction to diagnostic device, with the CAN communication data making described diagnostic device monitor CAN subnet; Otherwise described gateway controller sends negative response message to diagnostic device.
Preferably, described gateway controller comprises arbitration modules, and described arbitration modules is for judging whether current gateway controller has the forwarding task performed.
Beneficial effect of the present invention is:
CAN communication data monitoring method based on OBD interface provided by the invention and system, gateway controller is according to the diagnosis request instruction of diagnostic device, determine that whether diagnosis request instruction form is correct, if correct, positive response message is sent to diagnostic device by OBD-II interface, with the CAN communication data making described diagnostic device monitor CAN subnet, for vehicle failure investigation and analysis provide foundation, and ensure that car load data security.
Accompanying drawing explanation
Fig. 1 is a kind of CAN topological structure schematic diagram with gateway architecture in prior art.
Fig. 2 is the another kind of CAN topological structure schematic diagram with gateway architecture in prior art.
Fig. 3 is the embodiment of the present invention the first process flow diagram based on the CAN communication data monitoring method of OBD interface.
Fig. 4 is the second process flow diagram of the embodiment of the present invention based on the CAN communication data monitoring method of OBD interface.
Fig. 5 is the embodiment of the present invention the third process flow diagram based on the CAN communication data monitoring method of OBD interface.
Fig. 6 is the four kind process flow diagram of the embodiment of the present invention based on the CAN communication data monitoring method of OBD interface.
Fig. 7 is the five kind process flow diagram of the embodiment of the present invention based on the CAN communication data monitoring method of OBD interface.
Fig. 8 is a kind of structural representation of the embodiment of the present invention based on the CAN communication data monitoring system of OBD interface.
Fig. 9 is the another kind of structural representation of the embodiment of the present invention based on the CAN communication data monitoring system of OBD interface.
Embodiment
In order to make those skilled in the art can further understand feature of the present invention and technology contents, below in conjunction with drawings and embodiments, the embodiment of the present invention is elaborated.
For current inline diagnosis interface-ODB-II mouth resource-constrained, CAN subnet is directly connected on the problems such as ODB-II mouth data security is not strong, embodiments provide a kind of CAN communication data monitoring method based on OBD interface and system, by the configuration to gateway controller, make gateway controller that the communication packet of each CAN subnet is forwarded to ODB-II mouth, to realize the monitoring to car load CAN communication state.
If Fig. 3 is the embodiment of the present invention the first process flow diagram based on the CAN communication data monitoring method of OBD interface, comprise the following steps:
Step 101: diagnostic device sends diagnosis request instruction by OBD-II interface to gateway controller.
Particularly, described diagnosis request instruction comprises: request instruction identifier, Control Cooling, the control network segment; Wherein, described Control Cooling forwards for starting or stops forwarding or request forward result.
Particularly, when described Control Cooling is for starting to forward, described diagnosis request instruction also comprises the control time.That is, now, described diagnosis request instruction comprises request instruction identifier, Control Cooling, the control network segment, control time;
More specifically, when described Control Cooling for stop forwarding or request forward result time, described diagnosis request instruction comprises request instruction identifier, Control Cooling, the control network segment.That is, now described diagnosis request instruction does not comprise the control time.
Further, for the difference of described Control Cooling, the form of the response to diagnosis request instruction of gateway controller is different, that is, Control Cooling is different, and concrete operations flow process is different.
Further, Control Cooling forwards for starting or stops forwarding or request forward result, but the form that Control Cooling difference needs gateway controller to respond is different, therefore, as concrete introduction that Fig. 4 (or Fig. 5), Fig. 6, Fig. 7 are to the operating process that three kinds of different Control Cooling are taked.
Step 102: after gateway controller receives diagnosis request instruction, whether checkout and diagnosis request instruction form is correct; If correct, perform step 103; Otherwise, perform step 104.
Step 103: gateway controller sends positive response message according to diagnosis request instruction to diagnostic device, with the CAN communication data making described diagnostic device monitor CAN subnet.
Step 104: gateway controller sends negative response message to diagnostic device.
It should be noted that, in order to realize the embodiment of the present invention, gateway controller and at least one CAN Subnetwork connection, the number of the CAN subnet connected specifically is determined as required, main engine plants are that each CAN subnet distributes data identifier based on car load CAN network framework, the i.e. ID of CAN message, does not allow the ID that appearance two is identical in the same network segment.
Further, in order to realize the embodiment of the present invention, diagnostic device is connected with car load OBD-II interface, and OBD-II interface is connected with gateway controller by diagnosis CAN.Particularly, car load OBD-II interface is positioned at instrument panel lower left side, and outside interface is exposed to, diagnostic device directly inserts OBD-II interface and can use.
The CAN communication data monitoring method based on OBD interface that the embodiment of the present invention provides, diagnosis request instruction is sent to gateway controller by diagnostic device, gateway controller detects the form of described diagnosis request response, if form is correct, positive response message is sent, with the CAN communication data making described diagnostic device monitor CAN subnet to diagnostic device.The monitoring to car load CAN communication state can be realized by the present invention.
If Fig. 4 is the second process flow diagram of the embodiment of the present invention based on the CAN communication data monitoring method of OBD interface, comprise the following steps:
Step 201: diagnostic device sends diagnosis request instruction by OBD-II interface to gateway controller.
Step 202: after gateway controller receives diagnosis request instruction, whether checkout and diagnosis request instruction form is correct; If correct, perform step 203; Otherwise, perform step 207.
Step 203: when Control Cooling forwards for starting, gateway controller sends beginning transmitted response message according to described diagnosis request instruction to diagnostic device.
Further, described beginning transmitted response message comprises: respond services identifier, Control Cooling, the control network segment, state of a control record, E-Packet counting.
It should be noted that, the Control Cooling in all response messages of gateway controller is consistent with controlling the network segment and the Control Cooling in asking and controlling the network segment.
Step 204: gateway controller judges currently whether have the forwarding task performed by arbitration modules; If so, step 205 is performed; Otherwise, perform step 206.
It should be noted that, may be the same based on CAN node communication address each in car load each CAN subnet, if gateway controller forwards many CAN communication data to OBD-II mouth simultaneously, diagnostic device can be caused to monitor multiple identical address, each CAN node communication information cannot be distinguished.So adopt arbitration modules to be to ensure that current gateway controller once can only forward the communication data of a CAN subnet to OBD-II mouth.When gateway controller receives new diagnostic instruction, whether have forwarding task perform, if had, then perform the diagnosis request instruction of new diagnostic device after stopping current forwarding task if first judging that gateway controller is current by arbitration modules, if nothing, then forward target CAN communication information.
Step 205: gateway controller stops the forwarding task of current execution, performs step 206.
Step 206: gateway controller forwards the communication data of corresponding CAN subnet according to described diagnosis request instruction.
Step 207: gateway controller sends negative response message to diagnostic device.
The CAN communication data monitoring method based on OBD interface that the embodiment of the present invention provides, in the diagnosis request instruction that diagnostic device sends, Control Cooling forwards for starting, gateway controller is according to described diagnosis request instruction, perform and start forward command, before fill order, in order to ensure that gateway controller once can only forward the communication data of a CAN subnet to OBD-II mouth, the transmission that gateway controller employing arbitration modules realizes network is smooth and easy.
If Fig. 5 is the embodiment of the present invention the third process flow diagram based on the CAN communication data monitoring method of OBD interface, comprise the following steps:
Step 301: diagnostic device sends diagnosis request instruction by OBD-II interface to gateway controller.
Whether correct step 302: after gateway controller receives described diagnosis request instruction, detect described diagnosis request instruction form; If correct, perform step 303; Otherwise, perform step 309.
Step 303: when Control Cooling forwards for starting, gateway controller sends beginning transmitted response message according to diagnosis request instruction to diagnostic device.
Further, described beginning transmitted response message comprises: respond services identifier, Control Cooling, the control network segment, state of a control record, E-Packet counting.
It should be noted that, the Control Cooling in all response messages of gateway controller is consistent with controlling the network segment and the Control Cooling in asking and controlling the network segment.
Step 304: gateway controller judges currently whether have the forwarding task performed by arbitration modules; If so, step 305 is performed; Otherwise, perform step 306.
It should be noted that, may be the same based on CAN node communication address each in car load each CAN subnet, if gateway controller forwards many CAN communication data to OBD-II mouth simultaneously, diagnostic device can be caused to monitor multiple identical address, each CAN node communication information cannot be distinguished.So adopt arbitration modules to be to ensure that current gateway controller once can only forward the communication data of a CAN subnet to OBD-II mouth.When gateway controller receives new diagnostic instruction, whether have forwarding task perform, if had, then perform the diagnosis request instruction of new diagnostic device after stopping current forwarding task if first judging that gateway controller is current by arbitration modules, if nothing, then forward target CAN communication information.
Step 305: gateway controller stops the forwarding task of current execution, performs step 306.
Step 306: gateway controller forwards the communication data of corresponding CAN subnet according to diagnosis request instruction, performs step 307.
Step 307: gateway controller judges whether forwarding time exceedes the described control time; If so, step 308 is performed; Otherwise, perform step 306.
It should be noted that, the described control time is the control time in the diagnosis request instruction sent by diagnostic device, what namely sent by diagnostic device arranges route time, according to the forwarding duration of control time communication control message after gateway controller receives this diagnosis request instruction.Such as, communication packet route time was arranged in 30 minutes, if the time was more than 30 minutes, gateway controller will stop forwarding communication packet.
Step 308: gateway controller stops the communication data forwarding CAN subnet to diagnostic device
Step 309: gateway controller sends negative response message to diagnostic device.
The CAN communication data monitoring method based on OBD interface that the embodiment of the present invention provides, diagnostic device sends the diagnosis request instruction containing starting to forward to gateway controller, gateway controller starts transmitted response message to diagnostic device feedback, and realize by arbitration modules the data only forwarding a CAN subnet, after the control time in diagnosis request instruction reaches, stop forwarding the communication data of CAN subnet, thus make diagnostic device effectively monitor the communication data of CAN subnet.
If Fig. 6 is the four kind process flow diagram of the embodiment of the present invention based on the CAN communication data monitoring method of OBD interface, comprise the following steps:
Step 401: diagnostic device sends diagnosis request instruction by OBD-II interface to gateway controller.
Step 402: after gateway controller receives described diagnosis request instruction, whether checkout and diagnosis request instruction form is correct; If correct, perform step 403; Otherwise, perform step 405.
Step 403: when Control Cooling is for stopping forwarding, gateway controller stops forwarding response message according to diagnosis request instruction to diagnostic device transmission.
Step 404: gateway controller stops the communication data forwarding CAN subnet to diagnostic device
Step 405: gateway controller sends negative response message to diagnostic device.
The embodiment of the present invention is based on the CAN communication data monitoring method of OBD interface, diagnostic device sends containing the diagnosis request instruction stopped forwarding to gateway controller, gateway controller stops forwarding response message to diagnostic device feedback, and stops the communication data forwarding CAN subnet to diagnostic device.By the present invention, diagnostic device be stopped to monitor the communication data of CAN subnet.
If Fig. 7 is the five kind process flow diagram of the embodiment of the present invention based on the CAN communication data monitoring method of OBD interface, comprise the following steps:
Step 501: diagnostic device sends diagnosis request instruction by OBD-II interface to gateway controller.
Step 502: after gateway controller receives described diagnosis request instruction, whether checkout and diagnosis request instruction form is correct; If correct, perform step 503; Otherwise, perform step 504.
Step 503: when Control Cooling is request forward result, gateway controller sends forwarding result response message according to diagnosis request instruction to diagnostic device.
Step 504: gateway controller sends negative response message to diagnostic device.
The embodiment of the present invention is based on the CAN communication data monitoring method of OBD interface, and diagnostic device sends the diagnosis request instruction containing request forward result to gateway controller, and gateway controller forwards result response message to diagnostic device feedback.The communication data of CAN subnet forwards situation by the present invention, diagnostic device effectively to be learned.
Correspondingly, the embodiment of the present invention additionally provides a kind of CAN communication data monitoring system based on OBD interface, as shown in Figure 8, a kind of structural representation of the present embodiment based on the CAN communication data monitoring system of OBD interface, comprise: diagnostic device, the OBD-II interface (inline diagnosis interface) be connected with described diagnostic device, described system also comprises: the CAN subnet that gateway controller is connected with described gateway controller with at least one; Described diagnostic device is used for sending diagnosis request instruction by OBD-II interface to gateway controller; After described gateway controller is used for receiving described diagnosis request instruction, whether correctly detect described diagnosis request instruction form; If correct, described gateway controller sends positive response message according to described diagnosis request instruction to diagnostic device, with the CAN communication data making described diagnostic device monitor CAN subnet; Otherwise described gateway controller sends negative response message to diagnostic device.
Gateway is the terminal of car load communication data, the present invention is by carrying out diagnostic configuration to gateway controller, make gateway controller that the communication packet of each CAN subnet section is forwarded to OBD-II interface, realize the monitoring to car load CAN communication information state, for vehicle failure investigation and analysis provide safe and reliable foundation.
If Fig. 9 is the another kind of structural representation of the embodiment of the present invention based on the CAN communication data monitoring system of OBD interface, with Fig. 8 difference be, in structural representation shown in Fig. 9, add the inner structure of gateway controller, comprise arbitration modules, described arbitration modules is for judging whether current gateway controller has the forwarding task performed.
Particularly, may be the same based on CAN node communication address each in car load each CAN subnet, if gateway controller forwards many CAN communication data to OBD-II interface simultaneously, diagnostic device can be caused to monitor multiple identical address, each CAN node communication information cannot be distinguished.So adopt arbitration modules to be to ensure that current gateway controller once can only forward the communication data of a CAN subnet to OBD-II interface.When gateway controller receives new diagnostic instruction, whether have forwarding task perform, if had, then perform the diagnosis request instruction of new diagnostic device after stopping current forwarding task if first judging that gateway controller is current by arbitration modules, if nothing, then forward target CAN communication information.
In fig .9, there are 5 CAN subnets, i.e. subnet 1, subnet 2 ... subnet 5; Have 5 passages to control, namely passage 1 controls, passage 2 controls ... passage 5 controls, and arbitration modules passes through passage control realization to the forwarding of each CAN sub-network data.Certainly, the CAN subnet that gateway controller can be external is not limited only to 5, and gateway controller can the concrete number of external CAN subnet be determined by the specific performance of gateway controller.
Further, lower mask body introduces command configuration form of the present invention:
1, diagnostic device comprises request instruction identifier, Control Cooling, the control network segment and/or control time (only at Control Cooling for having this instruction when starting to forward) to the diagnosis request instruction that gateway controller sends.Specific definition is in table 1:
Table 1
1) request instruction identifier is the 1st byte definition in table 1, " routine controls request service indications " also namely in table 1.
2) Control Cooling is the 2nd byte definition in table 1, comprise start to forward, stop forwarding, request forward result, Control Cooling also i.e. Control Cooling in table 1; In table 1, starting to forward (namely " starting to forward routine to control " in table 1) data value is 01; Stopping forwarding (namely " stopping forwarding routine to control " in table 1) data value is 02; Request forward result (i.e. " control of Request Control result routine " in table 1) data value is 03.
3) controlling the network segment is that in table 1, the 3rd and the 4th byte defines, with the communication data making gateway controller identification forward which bar CAN subnet section, specifically as shown in table 2.
Table 2
4) control time is the 5th byte definition in table 1, also i.e. " setting of routine control time " in table 1, it is communication packet route time, for ensureing the security of car load communication data, such as, communication packet route time was arranged in 30 minutes, if the time was more than 30 minutes, gateway controller will stop forwarding communication packet.
2, gateway controller carries out positive response to the diagnosis request instruction that diagnostic device sends, response contents comprises respond services identifier (i.e. " routine controls respond services indications " in table 3 to table 8), Control Cooling (i.e. " routine Control Cooling " in table 3 to table 8), control the network segment (i.e. " routine control data indications " in table 3 to table 8), state of a control record (i.e. " routine state of a control record " in table 3 to table 8), and/or the counting that E-Packets (counting that E-Packets only occurs when the Control Cooling of response diagnostics request instruction is for starting to forward).Control Cooling in positive response is consistent with controlling the network segment and diagnosing the Control Cooling in request instruction and control the network segment, but the different form difference needing to respond of Control Cooling.
1) table 3 is for the request starting to forward (01) responds to Control Cooling, response contents comprises state of a control record and the counting that E-Packets, the state of a control record of table 3 the 5th byte is used for feeding back to the current control situation of diagnostic device, and detailed content defines in table 4.
Table 3
Table 4
2) table 5 is for the request stopping forwarding (02) responds to Control Cooling, response contents is state of a control record, for feeding back to the current control situation to stopping controlling request of diagnostic device, in concrete earth's surface 5, the state of a control record of the 5th byte defines in table 6.
Table 5
Table 6
3) table 7 is respond the request that Control Cooling is Request Control result (03), and response contents is the state recording each CAN subnet being forwarded to result, particularly, each CAN subnet is forwarded to the specific definition of the state recording of result in table 8.
Table 7
Table 8
If 3 receive diagnostic device send diagnosis request instruction form incorrect, gateway controller feedback negative response, and with negative response code prompting negative response reason, specific definition is in table 9.
Table 9
Further, the command configuration form of the embodiment of the present invention is exemplified below:
1) diagnosis request is sent by diagnostic device to gateway controller:
771053101C101xx
771: request instruction identifier (i.e. diagnostic device request diagnosis ID);
05: have after expression 5 data (31,01, C1,01, xx);
3101:31 routine controls service indications, and 01 is subfunction, starts to forward routine and controls;
C101: routine control data indications, is defined as communication packet in gateway forwards CAN1 in Table 1;
Xx: gateway is by CAN1 network segment message repeating set of time.
2) diagnostic device receives the positive response of gateway controller:
779067101C101010F
779: respond services identifier (i.e. gateway controller response diagnostics ID);
06: after expression, have 6 data (7101C10101xx);
7101:71 reads for diagnosis and serves positive response ID, and 01 is subfunction, starts to forward routine and controls;
C101: routine control data indications, is defined as gateway controller in Table 1 and forwards communication packet in CAN1;
01: routine controls successfully;
Xx: gateway forwards CAN1 network segment packet counting.
2) negative response data layout:
779027FNRC is to request of data negative response.
779: respond services identifier (i.e. gateway controller response diagnostics ID);
02: after expression, have two data (7F and NRC);
7F: service negative response ID is read in diagnosis;
NRC (NegativeResponseCodes): provide the no code that should respond reason.
The CAN communication data monitoring system based on OBD interface that the embodiment of the present invention provides, gateway controller sends diagnosis CAN message according to the diagnosis request instruction of diagnostic device to described OBD-II interface, with the CAN communication data making described diagnostic device monitor CAN subnet; Can be got the communication data of many network segments by the present invention, extensibility is strong, and whole forwarding capability logic is all realized by software merit rating, and do not need to increase peripheral circuit, cost is lower.
In sum, the CAN communication data monitoring method based on OBD interface that the embodiment of the present invention provides and system, gateway controller is according to the diagnosis request instruction of diagnostic device, determine that whether diagnosis request instruction form is correct, if correct, send positive response message by OBD-II interface to diagnostic device, with the CAN communication data making described diagnostic device monitor CAN subnet, the embodiment of the present invention has following beneficial effect:
1, the present invention is by h.323-configured gateway controller, can get the communication data of many network segments, and extensibility is strong, and whole forwarding capability logic is all realized by software merit rating, and do not need to increase peripheral circuit, cost is low.
2, the present invention forwards CAN subnet communication data mode by gateway controller and obtains car load communication information, ensures car load data security.
3 once there is electric fault in car load, reads the CAN subnetwork communicating data of gateway forwards by diagnostic device, can the status information of monitor for faults car load when occurring, further can better analyzing failure cause.
Being described in detail the embodiment of the present invention above, applying embodiment herein to invention has been elaboration, the explanation of above embodiment just understands system and method for the present invention for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. based on a CAN communication data monitoring method for OBD interface, it is characterized in that, described method comprises:
Diagnostic device sends diagnosis request instruction by OBD-II interface to gateway controller;
After described gateway controller receives described diagnosis request instruction, whether correctly detect described diagnosis request instruction form;
If correct, described gateway controller sends positive response message according to described diagnosis request instruction to diagnostic device, with the CAN communication data making described diagnostic device monitor CAN subnet; Otherwise described gateway controller sends negative response message to diagnostic device.
2. the CAN communication data monitoring method based on OBD interface according to claim 1, is characterized in that, described diagnosis request instruction comprises: request instruction identifier, Control Cooling, the control network segment;
Described Control Cooling comprise start forward, described diagnosis request instruction also comprises the control time; Or
Described Control Cooling comprises and stopping forwarding or request forward result.
3. the CAN communication data monitoring method based on OBD interface according to claim 2, is characterized in that, described gateway controller sends positive response message according to described diagnosis request instruction to diagnostic device and specifically comprises:
If described Control Cooling forwards for starting, gateway controller to send to diagnostic device according to described diagnosis request instruction and starts transmitted response message, and judges currently whether have the forwarding task performed by arbitration modules; If so, described gateway controller stops the forwarding task of current execution, and forwards the communication data of corresponding CAN subnet according to described diagnosis request instruction; Otherwise, the communication data of corresponding CAN subnet is forwarded according to described diagnosis request instruction.
4. the CAN communication data monitoring method based on OBD interface according to claim 3, it is characterized in that, described method also comprises:
Gateway controller judges whether forwarding time exceedes the described control time; If so, gateway controller stops the communication data forwarding CAN subnet to diagnostic device; Otherwise, continue the communication data forwarding CAN subnet to diagnostic device.
5. the CAN communication data monitoring method based on OBD interface according to claim 3 or 4, it is characterized in that, described beginning transmitted response message comprises: respond services identifier, Control Cooling, the control network segment, state of a control record, E-Packet counting.
6. the CAN communication data monitoring method based on OBD interface according to claim 2, is characterized in that, described gateway controller sends positive response message according to described diagnosis request instruction to diagnostic device and specifically comprises:
If described Control Cooling is for stopping forwarding, gateway controller stops forwarding response message according to described diagnosis request instruction to diagnostic device transmission, and stops the communication data forwarding CAN subnet to diagnostic device.
7. the CAN communication data monitoring method based on OBD interface according to claim 2, is characterized in that, described gateway controller sends positive response message according to described diagnosis request instruction to diagnostic device and specifically comprises:
If described Control Cooling is request forward result, gateway controller sends forwarding result response message according to described diagnosis request instruction to diagnostic device.
8. the CAN communication data monitoring method based on OBD interface according to claim 1, is characterized in that, described negative response message is provided with negative response code, and described negative response code is used for the reason to described diagnostic device prompting negative response.
9. the CAN communication data monitoring system based on OBD interface, comprise: diagnostic device, the OBD-II interface be connected with described diagnostic device, it is characterized in that, described system also comprises: the CAN subnet that gateway controller is connected with described gateway controller with at least one;
Described diagnostic device is used for sending diagnosis request instruction by OBD-II interface to gateway controller;
After described gateway controller is used for receiving described diagnosis request instruction, whether correctly detect described diagnosis request instruction form; If correct, described gateway controller sends positive response message according to described diagnosis request instruction to diagnostic device, with the CAN communication data making described diagnostic device monitor CAN subnet; Otherwise described gateway controller sends negative response message to diagnostic device.
10. the CAN communication data monitoring system based on OBD interface according to claim 9, it is characterized in that, described gateway controller comprises arbitration modules, and described arbitration modules is for judging whether current gateway controller has the forwarding task performed.
CN201511008405.0A 2015-12-25 2015-12-25 A kind of CAN communication data monitoring method and system based on OBD interfaces Active CN105388893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511008405.0A CN105388893B (en) 2015-12-25 2015-12-25 A kind of CAN communication data monitoring method and system based on OBD interfaces

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511008405.0A CN105388893B (en) 2015-12-25 2015-12-25 A kind of CAN communication data monitoring method and system based on OBD interfaces

Publications (2)

Publication Number Publication Date
CN105388893A true CN105388893A (en) 2016-03-09
CN105388893B CN105388893B (en) 2018-02-13

Family

ID=55421267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511008405.0A Active CN105388893B (en) 2015-12-25 2015-12-25 A kind of CAN communication data monitoring method and system based on OBD interfaces

Country Status (1)

Country Link
CN (1) CN105388893B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254177A (en) * 2016-07-29 2016-12-21 浙江吉利控股集团有限公司 A kind of diagnosis method for routing based on standalone gateway and system
CN106338986A (en) * 2016-10-27 2017-01-18 武汉奥泽电子有限公司 Multi-device program writing method and system based on high frequency communication
CN106970609A (en) * 2017-04-22 2017-07-21 深圳市元征科技股份有限公司 The diagnostic method and vehicle diagnostics box of vehicle diagnostics box
CN106990726A (en) * 2017-04-18 2017-07-28 上海汽车集团股份有限公司 A kind of vehicle CAN network data access method
CN107092246A (en) * 2017-06-06 2017-08-25 合肥禄正新能源科技有限公司 A kind of active diagnosing method of whole electric vehicle failure
CN107454190A (en) * 2017-08-30 2017-12-08 北京新能源汽车股份有限公司 A kind of network architecture and automobile of intelligent network connection automobile
CN107707418A (en) * 2016-08-09 2018-02-16 上汽通用汽车有限公司 One kind communication diagnostic system and communication diagnosis method for refreshing
CN107888469A (en) * 2016-09-29 2018-04-06 深圳联友科技有限公司 A kind of embedded information safety protecting method and system based on hardware isolated
CN107992022A (en) * 2017-11-27 2018-05-04 北京新能源汽车股份有限公司 A kind of control method of fault diagnosis, device, controller and system
CN108207039A (en) * 2016-12-19 2018-06-26 比亚迪股份有限公司 Safe transmission method, external device and the car borne gateway of vehicle-mounted data
CN108259251A (en) * 2018-04-16 2018-07-06 北京新能源汽车股份有限公司 A kind of gateway controller method for configuring route, device, equipment and automobile
CN108334058A (en) * 2018-02-13 2018-07-27 安徽江淮汽车集团股份有限公司 A kind of diagnostic system and method based on car body controller
CN109116130A (en) * 2017-06-23 2019-01-01 现代自动车株式会社 Vehicle testing system, vehicle and vehicle testing method
CN109669444A (en) * 2018-12-30 2019-04-23 浙江众泰汽车制造有限公司 The reliable gateway of information
CN111142504A (en) * 2019-12-30 2020-05-12 深圳移航通信技术有限公司 Bus detection device and method
CN111343085A (en) * 2020-03-03 2020-06-26 东风汽车集团有限公司 Routing system and method of vehicle-mounted CAN bus gateway
CN113472762A (en) * 2021-06-22 2021-10-01 重庆长安汽车股份有限公司 Method and system for limiting vehicle-mounted OBD (on-board diagnostics) to read bus information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795245A (en) * 2010-03-20 2010-08-04 中国第一汽车集团公司 C302-model gateway control unit
CN103384206A (en) * 2012-05-02 2013-11-06 中国科学院计算机网络信息中心 Concurrent processing method and system for mass data
CN104391502A (en) * 2014-11-27 2015-03-04 长城汽车股份有限公司 Car diagnosis system and car
CN104869053A (en) * 2014-10-08 2015-08-26 北汽福田汽车股份有限公司 On-board local area network switchable gateway, on-board local area network monitoring method and on-board local area network system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795245A (en) * 2010-03-20 2010-08-04 中国第一汽车集团公司 C302-model gateway control unit
CN103384206A (en) * 2012-05-02 2013-11-06 中国科学院计算机网络信息中心 Concurrent processing method and system for mass data
CN104869053A (en) * 2014-10-08 2015-08-26 北汽福田汽车股份有限公司 On-board local area network switchable gateway, on-board local area network monitoring method and on-board local area network system
CN104391502A (en) * 2014-11-27 2015-03-04 长城汽车股份有限公司 Car diagnosis system and car

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254177A (en) * 2016-07-29 2016-12-21 浙江吉利控股集团有限公司 A kind of diagnosis method for routing based on standalone gateway and system
CN107707418A (en) * 2016-08-09 2018-02-16 上汽通用汽车有限公司 One kind communication diagnostic system and communication diagnosis method for refreshing
CN107888469A (en) * 2016-09-29 2018-04-06 深圳联友科技有限公司 A kind of embedded information safety protecting method and system based on hardware isolated
CN106338986A (en) * 2016-10-27 2017-01-18 武汉奥泽电子有限公司 Multi-device program writing method and system based on high frequency communication
CN106338986B (en) * 2016-10-27 2019-05-07 武汉奥泽电子有限公司 Multimachine based on high frequency communications writes with a brush dipped in Chinese ink the method and system of program
CN108207039B (en) * 2016-12-19 2021-05-14 比亚迪股份有限公司 Safe transmission method of vehicle-mounted data, external equipment and vehicle-mounted gateway
CN108207039A (en) * 2016-12-19 2018-06-26 比亚迪股份有限公司 Safe transmission method, external device and the car borne gateway of vehicle-mounted data
CN106990726A (en) * 2017-04-18 2017-07-28 上海汽车集团股份有限公司 A kind of vehicle CAN network data access method
CN106970609A (en) * 2017-04-22 2017-07-21 深圳市元征科技股份有限公司 The diagnostic method and vehicle diagnostics box of vehicle diagnostics box
CN107092246A (en) * 2017-06-06 2017-08-25 合肥禄正新能源科技有限公司 A kind of active diagnosing method of whole electric vehicle failure
CN109116130A (en) * 2017-06-23 2019-01-01 现代自动车株式会社 Vehicle testing system, vehicle and vehicle testing method
CN109116130B (en) * 2017-06-23 2021-12-24 现代自动车株式会社 Vehicle testing system, vehicle and vehicle testing method
CN107454190A (en) * 2017-08-30 2017-12-08 北京新能源汽车股份有限公司 A kind of network architecture and automobile of intelligent network connection automobile
CN107454190B (en) * 2017-08-30 2021-05-28 北京新能源汽车股份有限公司 Network architecture of intelligent networked automobile and automobile
CN107992022A (en) * 2017-11-27 2018-05-04 北京新能源汽车股份有限公司 A kind of control method of fault diagnosis, device, controller and system
CN108334058A (en) * 2018-02-13 2018-07-27 安徽江淮汽车集团股份有限公司 A kind of diagnostic system and method based on car body controller
CN108259251A (en) * 2018-04-16 2018-07-06 北京新能源汽车股份有限公司 A kind of gateway controller method for configuring route, device, equipment and automobile
CN109669444A (en) * 2018-12-30 2019-04-23 浙江众泰汽车制造有限公司 The reliable gateway of information
CN111142504A (en) * 2019-12-30 2020-05-12 深圳移航通信技术有限公司 Bus detection device and method
CN111142504B (en) * 2019-12-30 2021-10-08 深圳移航通信技术有限公司 Bus detection device and method
CN111343085A (en) * 2020-03-03 2020-06-26 东风汽车集团有限公司 Routing system and method of vehicle-mounted CAN bus gateway
CN113472762A (en) * 2021-06-22 2021-10-01 重庆长安汽车股份有限公司 Method and system for limiting vehicle-mounted OBD (on-board diagnostics) to read bus information
CN113472762B (en) * 2021-06-22 2022-11-04 重庆长安汽车股份有限公司 Method and system for limiting vehicle-mounted OBD (on-board diagnostics) to read bus information

Also Published As

Publication number Publication date
CN105388893B (en) 2018-02-13

Similar Documents

Publication Publication Date Title
CN105388893A (en) CAN communication data monitoring method and system based on OBD interface
CN109491357B (en) Apparatus for performing diagnostic operations on a plurality of controllers and related method and vehicle
US10581739B2 (en) System for verification of unregistered device based on information of Ethernet switch and method for the same
US10484235B2 (en) Power management method in network and apparatus for the same
CN104965507A (en) Method used for generating open diagnostic data exchange database and device
CN113093687B (en) Fault diagnosis system and method based on domain controller
CN106330483B (en) Information acquisition method, client device and server device
CN113726573B (en) Redundant network communication method, device, electronic equipment and storage medium
KR20200136751A (en) Apparatus for communicating diagnosis of a vehicle, system having the same and method thereof
CN109905488A (en) Commercial vehicle electronic apparatus framework and its safe communication method
CN113282071A (en) Vehicle diagnosis method, system and related device
CN109116832A (en) Vehicle diagnostic data wireless communication method
US10341170B2 (en) Method for diagnosing link status in network
CN111443688B (en) Automobile diagnosis service network layer test system and method based on CAN bus
CN115657646B (en) Test method and device of CAN controller
CN112087351A (en) Remote train network communication interface testing method
WO2022268100A1 (en) Diagnosis system and method for vehicle central controller
CN111917692A (en) Fuzzy test method, device, equipment and computer readable storage medium
JP7140011B2 (en) Gateway device
JP2017114406A (en) Network system
CN203135909U (en) CAN bus detection system
KR20220024905A (en) How to talk to a computer on the vehicle's onboard bus
CN106878113B (en) Link connectivity detection method and device
CN114205261B (en) Automatic test method for correctness of network communication data and storage medium
CN116709253B (en) Vehicle-mounted gateway and vehicle

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 230601 Anhui Province, Hefei City Industrial Park, the Peach Blossom Road No. 669

Applicant after: Anhui Jianghuai Automobile Group Limited by Share Ltd

Address before: 230601 Anhui Province, Hefei City Industrial Park, the Peach Blossom Road No. 669

Applicant before: Anhui Jianghuai Automotive Co., Ltd.

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant