CN105388893B - A kind of CAN communication data monitoring method and system based on OBD interfaces - Google Patents
A kind of CAN communication data monitoring method and system based on OBD interfaces Download PDFInfo
- Publication number
- CN105388893B CN105388893B CN201511008405.0A CN201511008405A CN105388893B CN 105388893 B CN105388893 B CN 105388893B CN 201511008405 A CN201511008405 A CN 201511008405A CN 105388893 B CN105388893 B CN 105388893B
- 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.)
- Expired - Fee Related
Links
- 238000004891 communication Methods 0.000 title claims abstract description 116
- 238000012544 monitoring process Methods 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000003745 diagnosis Methods 0.000 claims abstract description 111
- 238000001816 cooling Methods 0.000 claims description 45
- 238000011835 investigation Methods 0.000 abstract 1
- 101150008604 CAN1 gene Proteins 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0208—Electric 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/0213—Modular 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
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/25—Pc structure of the system
- G05B2219/25032—CAN, canbus, controller area network bus
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Small-Scale Networks (AREA)
Abstract
The present invention relates to a kind of CAN communication data monitoring method and system, more particularly to a kind of CAN communication data monitoring method and system based on OBD interfaces.This method includes:Diagnostic device sends diagnosis request instruction by OBD II interfaces to gateway controller;After the gateway controller receives the diagnosis request instruction, whether correct the diagnosis request instruction form is detected;If correct, the gateway controller sends positive response message according to the diagnosis request instruction to diagnostic device, so that the CAN communication data of diagnostic device monitoring CAN subnets;Otherwise, the gateway controller sends negative response message to diagnostic device.By the present invention, foundation is provided for vehicle failure investigation and analysis.
Description
Technical field
The present invention relates to a kind of CAN communication data monitoring method and system, more particularly to a kind of CAN based on OBD interfaces
Communication data monitoring method and system.
Background technology
With developing rapidly for automobile electronics, vehicle electric function increase causes entire car controller to greatly increase, and
The application of gateway technique so that vehicle CAN bus topology is more complicated, if Fig. 1 is to carry the one of gateway architecture in the prior art
Kind of CAN topological structure schematic diagram, in Fig. 1, gateway controller external connection five CAN subnets CAN1 to CAN5 are each
There is different CAN nodes, for example, CAN nodes 1, CAN nodes 2 ... CAN nodes 10 shown in figure, gateway control on subnet
Device processed is connected by diagnosing CAN with inline diagnosis interface OBD-II.
Because diagnosis CAN is connected to OBD mouths, and other communications CAN is directly coupled on gateway controller, therefore can only be passed through
OBD mouths carry out diagnostic function to gateway controller, can not get each subnet section CAN communication information, and are broken down in vehicle
Afterwards in addition to by diagnostic functions such as diagnostic device read failure codes, current vehicle communication data state is also malfunction elimination and divided
The important evidence of analysis.
In order to solve the above problems, each CAN subnets bus is directly accessed OBD mouths, passes through the company of diagnostic device and OBD mouths
Each CAN subnets communication information of vehicle can directly be obtained by connecing, as Fig. 2 be in the prior art carry gateway architecture another CAN
Bus topolopy schematic diagram, Fig. 2 are that each subnet (CAN1 to CAN5) shown in Fig. 1 is directly accessed into OBD mouths.
But existing standard OBD mouth resource-constraineds, typically only 16 pins, most multipotency access 4 CANs, therefore
4 subnet CAN communication information can only be at most obtained, with the increase of vehicle CAN network segments number, system as shown in Figure 2 cannot be
Meet demand;And vehicle subnet is directly coupled to OBD mouths, any diagnostic device can have access to vehicle communication information, data
Confidentiality is not strong.
The content of the invention
The present invention provides a kind of CAN communication data monitoring method and system based on OBD interfaces, to realize to vehicle CAN
The monitoring of communication information state, is investigated for vehicle failure and analysis provides foundation.
To achieve the above object, the invention provides following technical scheme:
A kind of CAN communication data monitoring method based on OBD interfaces, methods described include:
Diagnostic device by OBD-II interfaces to gateway controller send diagnosis request instruction, it is described diagnosis request instruction by
Diagnosis CAN is sent to the gateway controller;
After the gateway controller receives the diagnosis request instruction, whether just the diagnosis request instruction form is detected
Really;
If correct, the gateway controller sends positive response report according to the diagnosis request instruction to diagnostic device
Text, so that CAN communication data of the diagnostic device by the gateway controller monitors CAN subnets;Otherwise, the gateway control
Device processed sends negative response message to diagnostic device.
Preferably, the diagnosis request instruction includes:Request instruction identifier, Control Cooling, the control network segment;
The Control Cooling includes starting to forward, and the diagnosis request instruction also includes control time;Or
The Control Cooling includes stopping forwarding or ask to forward result.
Preferably, the gateway controller sends positive response message tool according to the diagnosis request instruction to diagnostic device
Body includes:
If the Control Cooling is starts to forward, gateway controller is sent out according to the diagnosis request instruction to diagnostic device
Send and start transmitted response message, and judge currently whether there is the forwarding task being carrying out by arbitration modules;It is if it is, described
Gateway controller stops the forwarding task currently performed, and the communication of corresponding CAN subnets is forwarded according to the diagnosis request instruction
Data;Otherwise, the communication data of corresponding CAN subnets is forwarded according to the diagnosis request instruction.
Preferably, methods described also includes:
Gateway controller judges whether forwarding time exceedes the control time;If it is, gateway controller stops to examining
The communication data of disconnected device forwards CAN subnets;Otherwise, the communication data to diagnostic device forwarding CAN subnets is continued.
Preferably, described beginning transmitted response message includes:Respond service identifier, Control Cooling, the control network segment, control
State recording processed, E-Packet counting.
Preferably, the gateway controller sends positive response message tool according to the diagnosis request instruction to diagnostic device
Body includes:
If the Control Cooling is stops forwarding, gateway controller is sent out according to the diagnosis request instruction to diagnostic device
Send and stop forwarding response message, and stop the communication data to diagnostic device forwarding CAN subnets.
Preferably, the gateway controller sends positive response message tool according to the diagnosis request instruction to diagnostic device
Body includes:
If the Control Cooling is request forwarding result, gateway controller is set according to the diagnosis request instruction to diagnosis
Preparation send forwarding result response message.
Preferably, the negative response message is provided with negative response code, and the negative response code is used for described
Diagnostic device prompts the reason for negative response.
A kind of CAN communication data monitoring system based on OBD interfaces, including:Diagnostic device, it is connected with the diagnostic device
OBD-II interfaces, the system also includes:Gateway controller and at least one CAN being connected with the gateway controller
Net, the OBD-II interfaces are connected by diagnosing CAN with the gateway controller;
The diagnostic device is used to send diagnosis request instruction to the gateway controller by OBD-II interfaces, described to examine
Disconnected request instruction is sent to the gateway controller by the diagnosis CAN;
The gateway controller is used for after receiving the diagnosis request instruction, and detecting the diagnosis request instruction form is
It is no correct;If correct, the gateway controller sends positive response message according to the diagnosis request instruction to diagnostic device,
So that CAN communication data of the diagnostic device by the gateway controller monitors CAN subnets;Otherwise, the gateway control
Device sends negative response message to diagnostic device.
Preferably, the gateway controller includes arbitration modules, and the arbitration modules are used to judge current gateway controller
Whether the forwarding task that is carrying out is had.
The beneficial effects of the present invention are:
CAN communication data monitoring method and system provided by the invention based on OBD interfaces, gateway controller is according to diagnosis
The diagnosis request instruction of equipment, it is determined that whether diagnosis request instruction form is correct, if correctly, by OBD-II interfaces to diagnosis
Equipment sends positive response message, so that the CAN communication data of diagnostic device monitoring CAN subnets, are investigated for vehicle failure
Foundation is provided with analysis, and ensure that vehicle Information Security.
Brief description of the drawings
Fig. 1 is a kind of CAN topological structure schematic diagram for carrying gateway architecture in the prior art.
Fig. 2 is another CAN topological structure schematic diagram for carrying gateway architecture in the prior art.
Fig. 3 is the first flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces.
Fig. 4 is second of flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces.
Fig. 5 is the third flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces.
Fig. 6 is the 4th kind of flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces.
Fig. 7 is the 5th kind of flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces.
Fig. 8 is a kind of structural representation of CAN communication data monitoring system of the embodiment of the present invention based on OBD interfaces.
Fig. 9 is another structural representation of CAN communication data monitoring system of the embodiment of the present invention based on OBD interfaces.
Embodiment
In order that those skilled in the art can be further understood that the feature and technology contents of the present invention, below in conjunction with the accompanying drawings
The embodiment of the present invention is elaborated with embodiment.
For current inline diagnosis interface-ODB-II mouth resource-constraineds, CAN subnets are directly connected on ODB-II mouths data guarantor
The problems such as close property is not strong, the embodiments of the invention provide a kind of CAN communication data monitoring method and system based on OBD interfaces,
By the configuration to gateway controller, make gateway controller that the communication packet of each CAN subnets is forwarded into ODB-II mouths, to realize
Monitoring to vehicle CAN communication state.
If Fig. 3 is the first flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces, bag
Include following steps:
Step 101:Diagnostic device sends diagnosis request instruction by OBD-II interfaces to gateway controller.
Specifically, the diagnosis request instruction includes:Request instruction identifier, Control Cooling, the control network segment;Wherein, institute
State Control Cooling and forward result to start to forward or stopping forwarding or ask.
Specifically, when the Control Cooling is starts forwarding, the diagnosis request instruction also includes control time.Also
It is to say, now, the diagnosis request instruction includes request instruction identifier, Control Cooling, the control network segment, control time;
More specifically, when the Control Cooling is stops forwarding or asked to forward result, the diagnosis request instruction bag
Include request instruction identifier, Control Cooling, the control network segment.That is, when now the diagnosis request instruction does not include control
Between.
Further, for the difference of the Control Cooling, the form of the response to diagnosing request instruction of gateway controller
It is different, i.e. Control Cooling is different, and concrete operations flow is different.
Further, Control Cooling forwards result to start to forward or stopping forwarding or ask, but Control Cooling is not
With needing, the form that gateway controller responds is different, therefore, if Fig. 4 (or Fig. 5), Fig. 6, Fig. 7 are the control classes different to three kinds
The specific introduction for the operating process that type is taken.
Step 102:After gateway controller receives diagnosis request instruction, whether checkout and diagnosis request instruction form is correct;
If correct, step 103 is performed;Otherwise, step 104 is performed.
Step 103:Gateway controller sends positive response message according to diagnosis request instruction to diagnostic device, so that described
Diagnostic device monitors the CAN communication data of CAN subnets.
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 connections, institute
The number of the CAN subnets of connection with specific reference to it needs to be determined that, main engine plants be based on vehicle CAN network framework be each CAN subnets divide
Represent to accord with data, i.e. the ID of CAN message, do not allow two identical ID occur in the same network segment.
Further, in order to realize the embodiment of the present invention, diagnostic device is connected with vehicle OBD-II interfaces, and OBD-II interfaces lead to
Diagnosis CAN is crossed to be connected with gateway controller.Specifically, vehicle OBD-II interfaces are located at instrument board lower left side, and interface is exposed
In outer, diagnostic device is inserted directly into OBD-II interfaces and can be used.
CAN communication data monitoring method provided in an embodiment of the present invention based on OBD interfaces, by diagnostic device to gateway
Controller sends diagnosis request instruction, the form of the gateway controller detection diagnosis request response, if form is correct, to examining
Disconnected equipment sends positive response message, so that the CAN communication data of diagnostic device monitoring CAN subnets.Can by the present invention
To realize the monitoring to vehicle CAN communication state.
If Fig. 4 is second of flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces, bag
Include following steps:
Step 201:Diagnostic device sends diagnosis request instruction by OBD-II interfaces to gateway controller.
Step 202:After gateway controller receives diagnosis request instruction, whether checkout and diagnosis request instruction form is correct;
If correct, step 203 is performed;Otherwise, step 207 is performed.
Step 203:When Control Cooling to start to forward, gateway controller is according to the request instruction that diagnoses to diagnostic device
Send and start transmitted response message.
Further, the beginning transmitted response message includes:Respond service identifier, Control Cooling, the control network segment, control
State recording processed, E-Packet counting.
It should be noted that Control Cooling in all response messages of gateway controller and the control network segment with request
Control Cooling and the control network segment are consistent.
Step 204:Gateway controller judges currently whether there is the forwarding task being carrying out by arbitration modules;If
It is to perform step 205;Otherwise, step 206 is performed.
It should be noted that may be the same based on each CAN node communications address in each CAN subnets of vehicle, if gateway control
Device processed forwards a plurality of CAN communication data then diagnostic device can be caused to monitor multiple identicals communicatively to OBD-II mouths simultaneously
Location, each CAN node communications information can not be distinguished.So it is to ensure that current gateway controller once can only using arbitration modules
The communication data of a CAN subnet is forwarded to OBD-II mouths.When gateway controller receives new diagnostic instruction, first by secondary
Cut out module and judge whether gateway controller currently has forwarding task to be carrying out, if so, being held after then stopping current forwarding task
The diagnosis request instruction of the new diagnostic device of row, if nothing, forward target CAN communication information.
Step 205:Gateway controller stops the forwarding task currently performed, performs step 206.
Step 206:Gateway controller forwards the communication data of corresponding CAN subnets according to the diagnosis request instruction.
Step 207:Gateway controller sends negative response message to diagnostic device.
CAN communication data monitoring method provided in an embodiment of the present invention based on OBD interfaces, the diagnosis that diagnostic device is sent
For Control Cooling to start to forward, gateway controller starts forward command according to the diagnosis request instruction, execution in request instruction,
Before performing and ordering, in order to ensure that gateway controller can only once forward the communication data of a CAN subnet to OBD-II mouths, net
Gateway controller realizes that the transmission of network is smooth using arbitration modules.
If Fig. 5 is the third flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces, bag
Include following steps:
Step 301:Diagnostic device sends diagnosis request instruction by OBD-II interfaces to gateway controller.
Step 302:After gateway controller receives the diagnosis request instruction, detecting the diagnosis request instruction form is
It is no correct;If correct, step 303 is performed;Otherwise, step 309 is performed.
Step 303:When Control Cooling to start to forward, gateway controller is sent according to diagnosis request instruction to diagnostic device
Start transmitted response message.
Further, the beginning transmitted response message includes:Respond service identifier, Control Cooling, the control network segment, control
State recording processed, E-Packet counting.
It should be noted that Control Cooling in all response messages of gateway controller and the control network segment with request
Control Cooling and the control network segment are consistent.
Step 304:Gateway controller judges currently whether there is the forwarding task being carrying out by arbitration modules;If
It is to perform step 305;Otherwise, step 306 is performed.
It should be noted that may be the same based on each CAN node communications address in each CAN subnets of vehicle, if gateway control
Device processed forwards a plurality of CAN communication data then diagnostic device can be caused to monitor multiple identicals communicatively to OBD-II mouths simultaneously
Location, each CAN node communications information can not be distinguished.So it is to ensure that current gateway controller once can only using arbitration modules
The communication data of a CAN subnet is forwarded to OBD-II mouths.When gateway controller receives new diagnostic instruction, first by secondary
Cut out module and judge whether gateway controller currently has forwarding task to be carrying out, if so, being held after then stopping current forwarding task
The diagnosis request instruction of the new diagnostic device of row, if nothing, forward target CAN communication information.
Step 305:Gateway controller stops the forwarding task currently performed, performs step 306.
Step 306:Gateway controller forwards the communication data of corresponding CAN subnets according to diagnosis request instruction, performs step
307。
Step 307:Gateway controller judges whether forwarding time exceedes the control time;If it is, perform step
308;Otherwise, step 306 is performed.
It should be noted that the control time is the control time in the diagnosis request instruction sent by diagnostic device,
The setting route time sent by diagnostic device, according to control time after gateway controller receives the diagnosis request instruction
Carry out the forwarding duration of communication control message.For example communication packet route time was arranged in 30 minutes, if the time is more than 30 points
Clock, gateway controller will stop forwarding communication packet.
Step 308:Gateway controller stops the communication data to diagnostic device forwarding CAN subnets
Step 309:Gateway controller sends negative response message to diagnostic device.
CAN communication data monitoring method provided in an embodiment of the present invention based on OBD interfaces, diagnostic device is to gateway control
Device is sent containing the diagnosis request instruction for starting forwarding, and gateway controller feeds back to diagnostic device starts transmitted response message, and leads to
Cross arbitration modules and realize the data for only forwarding a CAN subnet, after diagnose the control time in request instruction and reaching, stop turn
The communication data of CAN subnets is sent out, so that diagnostic device effectively monitors the communication data of CAN subnets.
If Fig. 6 is the 4th kind of flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces, bag
Include following steps:
Step 401:Diagnostic device sends diagnosis request instruction by OBD-II interfaces to gateway controller.
Step 402:After gateway controller receives the diagnosis request instruction, just whether checkout and diagnosis request instruction form
Really;If correct, step 403 is performed;Otherwise, step 405 is performed.
Step 403:When Control Cooling to stop forwarding, gateway controller is sent according to diagnosis request instruction to diagnostic device
Stop forwarding response message.
Step 404:Gateway controller stops the communication data to diagnostic device forwarding CAN subnets
Step 405:Gateway controller sends negative response message to diagnostic device.
CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces, diagnostic device are sent to gateway controller
Containing the diagnosis request instruction stopped forwarding, gateway controller stops forwarding response message to diagnostic device feedback, and stops to examining
The communication data of disconnected device forwards CAN subnets.Diagnostic device is stopped by the present invention to supervise the communication data of CAN subnets
Survey.
If Fig. 7 is the 5th kind of flow chart of CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces, bag
Include following steps:
Step 501:Diagnostic device sends diagnosis request instruction by OBD-II interfaces to gateway controller.
Step 502:After gateway controller receives the diagnosis request instruction, just whether checkout and diagnosis request instruction form
Really;If correct, step 503 is performed;Otherwise, step 504 is performed.
Step 503:When Control Cooling is request forwarding result, gateway controller is according to diagnosis request instruction to diagnostic device
Send forwarding result response message.
Step 504:Gateway controller sends negative response message to diagnostic device.
CAN communication data monitoring method of the embodiment of the present invention based on OBD interfaces, diagnostic device are sent to gateway controller
The diagnosis request instruction of the result of forwarding containing request, gateway controller feed back forwarding result response message to diagnostic device.Pass through this
Invention makes diagnostic device effectively learn that the communication data of CAN subnets forwards situation.
Correspondingly, the embodiment of the present invention additionally provides a kind of CAN communication data monitoring system based on OBD interfaces, such as Fig. 8
It is shown, it is a kind of structural representation of CAN communication data monitoring system of the present embodiment based on OBD interfaces, including:Diagnosis is set
OBD-II interfaces (inline diagnosis interface) that are standby, being connected with the diagnostic device, the system also includes:Gateway controller and extremely
A few CAN subnet being connected with the gateway controller;The diagnostic device is used to pass through OBD-II interfaces to gateway control
Device sends diagnosis request instruction;The gateway controller is used for after receiving the diagnosis request instruction, and detecting the diagnosis please
Ask instruction format whether correct;If correct, the gateway controller is sent according to the diagnosis request instruction to diagnostic device
Positive response message, so that the CAN communication data of diagnostic device monitoring CAN subnets;Otherwise, the gateway controller is to examining
Disconnected equipment sends negative response message.
Gateway is the terminal of vehicle communication data, and the present invention makes gateway by carrying out diagnostic configuration to gateway controller
The communication packet of each CAN subnets section is forwarded to OBD-II interfaces by controller, realizes the prison to vehicle CAN communication information state
Control, is investigated for vehicle failure and analysis provides safe and reliable foundation.
If Fig. 9 is another structural representation of CAN communication data monitoring system of the embodiment of the present invention based on OBD interfaces
Figure, except that, in structural representation shown in Fig. 9, the internal structure of gateway controller, including arbitration mould are added with Fig. 8
Block, the arbitration modules are used to judge whether current gateway controller has the forwarding task being carrying out.
Specifically, may be the same based on each CAN node communications address in each CAN subnets of vehicle, if gateway controller is same
When forward a plurality of CAN communication data then to cause diagnostic device to monitor multiple identical addresses, nothing to OBD-II interfaces
Method distinguishes each CAN node communications information.So it is to ensure that current gateway controller can only once forward using arbitration modules
The communication data of one CAN subnet is to OBD-II interfaces.When gateway controller receives new diagnostic instruction, pass through arbitration first
Module judges whether gateway controller currently has forwarding task to be carrying out, if so, being performed after then stopping current forwarding task
The diagnosis request instruction of new diagnostic device, if nothing, forward target CAN communication information.
In fig.9, there are 5 CAN subnets, i.e. subnet 1, subnet 2 ... subnet 5;Controlled with 5 passages, i.e. passage 1
Control, passage 2 control ..., and passage 5 controls, and arbitration modules realize the forwarding to each CAN sub-network datas by passage control.
Certainly, the CAN subnets that gateway controller can be external are not limited only to 5, gateway controller can external CAN subnets specific number by
The specific performance of gateway controller determines.
Further, lower mask body introduces order configuration format of the present invention:
1st, the diagnosis request instruction that diagnostic device is sent to gateway controller include request instruction identifier, Control Cooling,
Control the network segment, and/or control time (only there is this instruction when Control Cooling is starts forwarding).Specific definition is shown in Table 1:
Table 1
1) request instruction identifier is the 1st byte definition in table 1, namely " the routine control data service sign in table 1
Symbol ".
2) Control Cooling is the 2nd byte definition in table 1, including starts to forward, stop forwarding, ask to forward result, control
Control Cooling in type processed namely table 1;In table 1, it is 01 to start forwarding and (" start to forward routine to control ") data value i.e. in table 1;
Data value is stopped forwarding and (" stops forwarding routine to control " in table 1) as 02;Request forwarding result (" tie i.e. in table 1 by request control
Fruit routine controls ") data value be 03.
3) it is that the 3rd and the 4th byte defines in table 1 to control the network segment, so which bar CAN subnet section gateway controller identification forwards
Communication data, it is specific as shown in table 2.
Table 2
4) control time is that the 5th byte defines in table 1, namely " setting of routine control time " in table 1, and it is reported for communication
Literary route time, for ensureing vehicle communication data security, such as, communication packet route time was arranged in 30 minutes, such as
Gateway controller will stop forwarding communication packet more than 30 minutes the fruit time.
2nd, the diagnosis request instruction that gateway controller is sent to diagnostic device carries out positive response, and response contents include response
Service identifier (i.e. table 3 " routine control response services indications " into table 8), Control Cooling (i.e. " the routine control into table 8 of table 3
Type processed "), control the network segment (i.e. table 3 " routine control data indications " into table 8), state of a control record (i.e. table 3 is into table 8
" routine state of a control record "), and/or the counting that E-Packets (E-Packet counting only in the control of response diagnostics request instruction
Type is to start to occur during forwarding).Control Cooling and the control network segment in positive response is with diagnosing the control class in request instruction
Type and the control network segment are consistent, but the different forms for needing to respond of Control Cooling are different.
1) it is to start to forward the request of (01) to respond to Control Cooling that table 3, which is, and response contents are remembered including state of a control
Record and E-Packet counting, the state of a control of the byte of table 3 the 5th records currently controls situation for feeding back to diagnostic device, in detail
Content is shown in Table 4 definition.
Table 3
Table 4
2) it is that the request for stopping forwarding (02) responds to Control Cooling that table 5, which is, and response contents record for state of a control,
For feeding back to diagnostic device currently to stopping the control situation of control data, the state of a control note of the 5th byte in specific earth's surface 5
Record is shown in Table 6 definition.
Table 5
Table 6
3) it is that the request for asking control result (03) responds to Control Cooling that table 7, which is, and response contents are to each CAN
The state recording of net forwarding result, specifically, forwards the specific definition of the state recording of result to be shown in Table 8 to each CAN subnets.
Table 7
Table 8
If the diagnosis request instruction form for the 3, receiving diagnostic device transmission is incorrect, gateway controller feedback negative is rung
The reason for answering, and prompting negative response with negative response code, specific definition is shown in Table 9.
Table 9
Further, the order configuration format of the embodiment of the present invention is exemplified below:
1) diagnosis request is sent to gateway controller by diagnostic device:
771 05 31 01 C1 01 xx
771:Request instruction identifier (i.e. diagnostic device request diagnosis ID);
05:Represent below have 5 data (31,01, C1,01, xx);
31 01:31 routines control service indications, 01 is subfunction, starts to forward routine control;
C1 01:Routine control data indications, it is communication packet in gateway forwards CAN1 defined in table 1;
xx:Gateway sets CAN1 network segment message forwarding times.
2) diagnostic device receives the positive response of gateway controller:
779 06 71 01 C1 01 01 0F
779:Respond service identifier (i.e. gateway controller response diagnostics ID);
06:Represent there are 6 data (xx of 71 01 C1 01 01) below;
71 01:71 be diagnosis reading service positive response ID, and 01 is subfunction, starts to forward routine control;
C1 01:Routine control data indications, communication packet in CAN1 is forwarded for gateway controller defined in table 1;
01:Routine controls successfully;
xx:Gateway forwards CAN1 network segment packet countings.
2) negative response data format:
779 02 7F NRC are to request of data negative response.
779:Respond service identifier (i.e. gateway controller response diagnostics ID);
02:Represent there are two data (7F and NRC) below;
7F:Diagnose reading service negative response ID;
NRC(Negative Response Codes):Provide the no code that should respond reason.
CAN communication data monitoring system provided in an embodiment of the present invention based on OBD interfaces, gateway controller is according to diagnosis
The diagnosis request instruction of equipment sends diagnosis CAN message to the OBD-II interfaces, so that the diagnostic device monitors CAN subnets
CAN communication data;The communication data of a plurality of network segment can be got by the present invention, scalability is strong, and entirely forwards work(
Energy logic is all realized by software merit rating, it is not necessary to increases peripheral circuit, cost is relatively low.
In summary, CAN communication data monitoring method and system provided in an embodiment of the present invention based on OBD interfaces, net
Gateway controller is according to the diagnosis request instruction of diagnostic device, it is determined that whether diagnosis request instruction form is correct, if correctly, passed through
OBD-II interfaces send positive response message to diagnostic device, so that the CAN communication number of diagnostic device monitoring CAN subnets
According to the embodiment of the present invention has the advantages that:
1st, the present invention can get the communication data of a plurality of network segment by configuring gateway controller, and scalability is strong, and
Whole forwarding capability logic is all realized by software merit rating, it is not necessary to increases peripheral circuit, cost is low.
2nd, the present invention forwards CAN subnet communication data modes to obtain vehicle communication information by gateway controller, ensures
Vehicle Information Security.
Once the 3, electric fault occurs in vehicle, the CAN subnetwork communicating data of gateway forwards are read by diagnostic device, can be with
The status information of vehicle when failure occurs is monitored, further can more preferable analyzing failure cause.
The embodiment of the present invention is described in detail above, embodiment used herein is carried out to the present invention
Illustrate, the explanation of above example is only intended to help to understand system and method for the invention;Meanwhile for the one of this area
As technical staff, according to the thought of the present invention, there will be changes in specific embodiments and applications, to sum up institute
State, this specification content should not be construed as limiting the invention.
Claims (10)
1. a kind of CAN communication data monitoring method based on OBD interfaces, it is characterised in that methods described includes:
Diagnostic device sends diagnosis request instruction by OBD-II interfaces to gateway controller, and the diagnosis request instruction is by diagnosing
CAN is sent to the gateway controller;
After the gateway controller receives the diagnosis request instruction, whether correct the diagnosis request instruction form is detected;
If correct, the gateway controller sends positive response message according to the diagnosis request instruction to diagnostic device, with
Make CAN communication data of the diagnostic device by the gateway controller monitors CAN subnets;Otherwise, the gateway controller
Negative response message is sent to diagnostic device.
2. the CAN communication data monitoring method according to claim 1 based on OBD interfaces, it is characterised in that the diagnosis
Request instruction includes:Request instruction identifier, Control Cooling, the control network segment;
The Control Cooling includes starting to forward, and the diagnosis request instruction also includes control time;Or
The Control Cooling includes stopping forwarding or ask to forward result.
3. the CAN communication data monitoring method according to claim 2 based on OBD interfaces, it is characterised in that the gateway
Controller sends positive response message to diagnostic device according to the diagnosis request instruction and specifically included:
If the Control Cooling is starts to forward, gateway controller sends to diagnostic device according to the diagnosis request instruction and opened
Beginning transmitted response message, and judge currently whether there is the forwarding task being carrying out by arbitration modules;If it is, the gateway
Controller stops the forwarding task currently performed, and the communication data of corresponding CAN subnets is forwarded according to the diagnosis request instruction;
Otherwise, the communication data of corresponding CAN subnets is forwarded according to the diagnosis request instruction.
4. the CAN communication data monitoring method according to claim 3 based on OBD interfaces, it is characterised in that methods described
Also include:
Gateway controller judges whether forwarding time exceedes the control time;If it is, gateway controller stops setting to diagnosis
The communication data of standby forwarding CAN subnets;Otherwise, the communication data to diagnostic device forwarding CAN subnets is continued.
5. the CAN communication data monitoring method based on OBD interfaces according to claim 3 or 4, it is characterised in that described
Beginning transmitted response message include:Response service identifier, Control Cooling, the control network segment, state of a control record, E-Packeted
Count.
6. the CAN communication data monitoring method according to claim 2 based on OBD interfaces, it is characterised in that the gateway
Controller sends positive response message to diagnostic device according to the diagnosis request instruction and specifically included:
If the Control Cooling is stops forwarding, gateway controller is sent according to the diagnosis request instruction to diagnostic device to stop
Only transmitted response message, and stop the communication data to diagnostic device forwarding CAN subnets.
7. the CAN communication data monitoring method according to claim 2 based on OBD interfaces, it is characterised in that the gateway
Controller sends positive response message to diagnostic device according to the diagnosis request instruction and specifically included:
If the Control Cooling is request forwarding result, gateway controller is sent out according to the diagnosis request instruction to diagnostic device
Send forwarding result response message.
8. the CAN communication data monitoring method according to claim 1 based on OBD interfaces, it is characterised in that the negative
Response message is provided with negative response code, and the negative response code is used for the original that negative response is prompted to the diagnostic device
Cause.
9. a kind of CAN communication data monitoring system based on OBD interfaces, including:Diagnostic device, it is connected with the diagnostic device
OBD-II interfaces, it is characterised in that the system also includes:Gateway controller and at least one it is connected with the gateway controller
CAN subnets, the OBD-II interfaces are connected by diagnosing CAN with the gateway controller;
The diagnostic device is used to send diagnosis request instruction to the gateway controller by OBD-II interfaces, and the diagnosis please
Instruction is asked to be sent to the gateway controller by the diagnosis CAN;
The gateway controller is used for after receiving the diagnosis request instruction, whether just to detect the diagnosis request instruction form
Really;If correct, the gateway controller sends positive response message according to the diagnosis request instruction to diagnostic device, so that
The CAN communication data that the diagnostic device passes through the gateway controller monitors CAN subnets;Otherwise, the gateway controller to
Diagnostic device sends negative response message.
10. the CAN communication data monitoring system according to claim 9 based on OBD interfaces, it is characterised in that the net
Gateway controller includes arbitration modules, and the arbitration modules are used to judge whether current gateway controller has the forwarding being carrying out to appoint
Business.
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 CN105388893A (en) | 2016-03-09 |
CN105388893B true CN105388893B (en) | 2018-02-13 |
Family
ID=55421267
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511008405.0A Expired - Fee Related 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) |
Families Citing this family (19)
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 |
CN107707418B (en) * | 2016-08-09 | 2021-06-15 | 上汽通用汽车有限公司 | Communication diagnosis system and communication diagnosis refreshing method |
CN107888469A (en) * | 2016-09-29 | 2018-04-06 | 深圳联友科技有限公司 | A kind of embedded information safety protecting method and system based on hardware isolated |
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 |
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 |
KR102309438B1 (en) * | 2017-06-23 | 2021-10-07 | 현대자동차주식회사 | Vehicle Test System, Vehicle and Control Method Thereof |
CN107454190B (en) * | 2017-08-30 | 2021-05-28 | 北京新能源汽车股份有限公司 | Network architecture of intelligent networked automobile and automobile |
CN107992022B (en) * | 2017-11-27 | 2020-09-08 | 北京新能源汽车股份有限公司 | Control method, device, controller and system for fault diagnosis |
CN108334058B (en) * | 2018-02-13 | 2020-03-24 | 安徽江淮汽车集团股份有限公司 | Diagnosis system and method based on vehicle body controller |
CN108259251A (en) * | 2018-04-16 | 2018-07-06 | 北京新能源汽车股份有限公司 | Gateway controller route configuration method, device, equipment and automobile |
CN109669444A (en) * | 2018-12-30 | 2019-04-23 | 浙江众泰汽车制造有限公司 | The reliable gateway of information |
CN111142504B (en) * | 2019-12-30 | 2021-10-08 | 深圳移航通信技术有限公司 | Bus detection device and method |
CN111343085B (en) * | 2020-03-03 | 2021-01-12 | 东风汽车集团有限公司 | Routing system and method for vehicle-mounted CAN bus gateway |
CN114675617A (en) * | 2021-06-07 | 2022-06-28 | 北京新能源汽车股份有限公司 | Data diagnosis method and device and automobile |
CN113472762B (en) * | 2021-06-22 | 2022-11-04 | 重庆长安汽车股份有限公司 | Method and system for limiting vehicle-mounted OBD (on-board diagnostics) to read bus information |
CN114995353A (en) * | 2022-06-23 | 2022-09-02 | 中国第一汽车股份有限公司 | Vehicle diagnosis method, device and system |
Citations (4)
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 |
-
2015
- 2015-12-25 CN CN201511008405.0A patent/CN105388893B/en not_active Expired - Fee Related
Patent Citations (4)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN105388893A (en) | 2016-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105388893B (en) | A kind of CAN communication data monitoring method and system based on OBD interfaces | |
WO2021175314A1 (en) | Message routing testing method and device, and storage medium | |
CN113093687B (en) | A fault diagnosis system and method based on domain controller | |
US20150082089A1 (en) | Method and apparatus for isolating a fault in a controller area network | |
CN110768871B (en) | Test method and system for automatically counting data transmission correctness of DCS (distributed control system) | |
CN115604078B (en) | Low-cost high-efficiency CAN message automatic test method and system | |
CN106527410A (en) | Data recording gateway for vehicle and diagnosis system based on gateway | |
CN113341933B (en) | Diagnostic system and method for vehicle central controller | |
US10341170B2 (en) | Method for diagnosing link status in network | |
CN118316825A (en) | Vehicle Ethernet ring network testing method, device, electronic equipment and storage medium | |
CN104076808A (en) | Fault diagnosis system and method for industrial control equipment | |
CN101800672B (en) | Equipment detection method and equipment | |
CN115158400B (en) | Urban rail vehicle equipment and testing method thereof | |
CN115622830A (en) | Information acquisition method, device, electronic equipment, storage medium and system | |
CN108549358A (en) | A kind of redundant manipulator diagnostic system and method based on CAN bus | |
CN112711502B (en) | Gao Wenkao machine testing method, control end, tooling end and system for iMS-CPU board | |
CN113629878B (en) | Remote control verification method and system for three-remote switch of power distribution network | |
CN109254553A (en) | Control systems of nuclear power plant | |
CN106453012A (en) | Serial bus communication method and apparatus | |
CN113805567B (en) | MVB fault diagnosis method, train control unit and rail locomotive | |
JP2020061717A (en) | Abnormality factor determination device, control system, and abnormality factor determination method | |
CN116149301A (en) | Device, method and vehicle for fault diagnosis | |
CN209070330U (en) | Control systems of nuclear power plant | |
CN115801561A (en) | Internet of things troubleshooting method, device, equipment and storage medium | |
US9898380B1 (en) | Automatic vehicle wiring and configuration verification |
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 Corp.,Ltd. Address before: 230601 Anhui Province, Hefei City Industrial Park, the Peach Blossom Road No. 669 Applicant before: ANHUI JIANGHUAI AUTOMOBILE Co.,Ltd. |
|
COR | Change of bibliographic data | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180213 |
|
CF01 | Termination of patent right due to non-payment of annual fee |