CN112003774A - Method, system and storage medium for checking error frame of automobile CAN bus - Google Patents

Method, system and storage medium for checking error frame of automobile CAN bus Download PDF

Info

Publication number
CN112003774A
CN112003774A CN202010712435.4A CN202010712435A CN112003774A CN 112003774 A CN112003774 A CN 112003774A CN 202010712435 A CN202010712435 A CN 202010712435A CN 112003774 A CN112003774 A CN 112003774A
Authority
CN
China
Prior art keywords
tested
electronic controller
error frame
bus
automobile
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
CN202010712435.4A
Other languages
Chinese (zh)
Other versions
CN112003774B (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.)
Dongfeng Motor Corp
Original Assignee
Dongfeng Motor 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 Dongfeng Motor Corp filed Critical Dongfeng Motor Corp
Priority to CN202010712435.4A priority Critical patent/CN112003774B/en
Publication of CN112003774A publication Critical patent/CN112003774A/en
Application granted granted Critical
Publication of CN112003774B publication Critical patent/CN112003774B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/12Arrangements for remote connection or disconnection of substations or of equipment thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Abstract

The invention discloses a method, a system and a storage medium for checking an error frame of an automobile CAN bus. The method for checking the error frame of the automobile CAN bus comprises the following steps: when an error frame occurs in an automobile CAN bus network, identifying a network segment to be detected where the error frame is located; confirming a to-be-tested electronic controller corresponding to the to-be-tested network segment according to the network topology structure of the automobile CAN bus network; controlling a switch/relay preset on a to-be-tested electronic controller to be disconnected; and when the error frame in the automobile CAN bus network disappears, determining that the electronic controller to be tested is the target electronic controller. The invention can easily find out and position the controller with error frames after the vehicle is assembled.

Description

Method, system and storage medium for checking error frame of automobile CAN bus
Technical Field
The invention relates to the technical field of automobile detection, in particular to a method, a system and a storage medium for detecting an error frame of an automobile CAN bus.
Background
At present, a Controller Area Network (CAN) bus network is commonly used in automobiles, and as the automobile industry develops, more and more controllers equipped with CAN buses are provided. The reliability of the CAN bus is high but in some cases errors CAN occur. CAN bus errors are classified as: CRC (Cyclic Redundancy Check) errors, format errors, acknowledgement errors, bit transmission errors, bit stuffing errors; an error frame is generated on the CAN bus when an error occurs. The error frame is also one of the types of the data frames of the CAN bus, and is a frame format sent when a certain component fails or the CAN bus detects a certain node error. The generation of error frames is random, and the troubleshooting and positioning are difficult. The vehicle-mounted CAN network is composed of wiring harnesses (CAH _ H and CAN _ L) and a controller. The short circuit, virtual connection and the like of the wire harness CAN also generate error frames on the CAN bus, and the troubleshooting is relatively simple. If the error frame is not caused by the short circuit, virtual connection and the like of the wire harness, the error frame is caused by a certain controller on the CAN bus. In the conventional art, a method of checking and locating an error frame generated by a certain controller is to disconnect the controller from the CAN bus for checking. However, when the vehicle has been assembled, it is difficult to troubleshoot the controller by disconnecting it from the CAN bus, making it difficult to locate the controller in error.
Disclosure of Invention
The invention aims to overcome the defects of the background technology, and provides a method, a system and a storage medium for checking the error frame of the CAN bus of an automobile, which CAN easily check and locate the controller with the error frame after the assembly of the automobile is finished.
In a first aspect, the present invention provides a method for checking an error frame of an automotive CAN bus, comprising the following steps:
when an error frame occurs in an automobile CAN bus network, identifying a network segment to be detected where the error frame is located;
confirming a to-be-tested electronic controller corresponding to the to-be-tested network segment according to the network topology structure of the automobile CAN bus network;
controlling a switch/relay preset on a to-be-tested electronic controller to be disconnected;
and when the error frame in the automobile CAN bus network disappears, determining that the electronic controller to be tested is the target electronic controller.
According to the first aspect, in a first possible implementation manner of the first aspect, the step of "controlling the switch/relay preset on the electronic controller to be tested to be turned off" specifically includes the following steps:
sending a test instruction for disconnecting the switch/relay to a to-be-tested electronic controller preset with the switch/relay;
and when the electronic controller to be tested is detected to respond to the test instruction, the switch/relay is judged to be switched off.
According to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, after the step of sending a test instruction for opening a switch/relay to a to-be-tested electronic controller preset with the switch/relay, "the method further includes the following steps:
and when detecting that the electronic controller to be tested does not respond to the test instruction, detecting whether the test instruction is correctly sent out, and detecting whether the network segment to be tested where the error frame is positioned can be identified and confirming the electronic controller to be tested corresponding to the network segment to be tested.
According to the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the step of sending a test instruction for turning off the switch/relay to a to-be-tested electronic controller in which the switch/relay is preset includes the following steps:
when one to-be-tested electronic controller corresponding to the to-be-tested network segment is detected, sending a test instruction for disconnecting the switch/relay to the to-be-tested electronic controller with the preset switch/relay;
and when detecting that a plurality of to-be-tested electronic controllers corresponding to the network segment to be tested exist, sending a test instruction for disconnecting the switches/relays to the plurality of to-be-tested electronic controllers preset with the switches/relays.
According to the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the step of "confirming that the electronic controller to be tested is the target electronic controller when detecting that the error frame in the automobile CAN bus network disappears" includes the following steps:
detecting whether an error frame in an automobile CAN bus network exists or not;
when detecting that an error frame in the automobile CAN bus network disappears, confirming that the electronic controller to be tested is a target electronic controller;
and when detecting that the error frame in the automobile CAN bus network exists, determining that the electronic controller to be tested is a non-target electronic controller.
According to a fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, after the step of "confirming that the electronic controller to be tested is a non-target electronic controller when the presence of an error frame in the automotive CAN bus network is detected", the method includes the following steps:
confirming other electronic controllers to be tested corresponding to the network segment to be tested;
controlling switches/relays preset on other electronic controllers to be tested to be disconnected;
and when detecting that the error frame in the automobile CAN bus network disappears, confirming that other electronic controllers to be tested are target electronic controllers.
According to the first aspect, in a sixth possible implementation manner of the first aspect, the step of "identifying a network segment to be tested where an error frame is located" includes the following steps:
the control CAN tool is in network communication connection with the automobile CAN bus through the vehicle diagnosis interface;
and acquiring the network segment to be tested where the error frame of the automobile CAN bus network is located by the CAN tool.
According to the first aspect, in a seventh possible implementation manner of the first aspect, after the step of "confirming that the electronic controller to be tested is the target electronic controller when detecting that the error frame in the car CAN bus network disappears", the method further includes the following steps:
sending a test instruction for connecting the switch/relay to a target electronic controller preset with the switch/relay;
and when the target electronic controller is detected to respond to the test instruction, judging the connection of the switch/relay.
In a second aspect, the present invention provides a system for checking an error frame of a CAN bus of an automobile, comprising:
the network segment identification module is used for identifying the network segment to be detected where the error frame is located when the error frame is obtained in the automobile CAN bus network;
the controller identification module is used for identifying the electronic controller to be tested corresponding to the network segment to be tested according to the network topology structure of the automobile CAN bus network;
the detection instruction transceiving module is used for controlling a switch/relay preset on the electronic controller to be detected to be switched off;
and the target controller judging module is used for confirming that the electronic controller to be tested is the target electronic controller when the error frame in the automobile CAN bus network disappears.
In a third aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out all or part of the method steps of the method of checking for an automotive CAN-bus error frame as described above.
Compared with the prior art, the invention has the following advantages: in the development stage of the hardware of the electronic controller of the CAN bus network, a switch/relay is added/installed between pins of CAN _ H and CAN _ L in a connector of the electronic controller and an internal connecting element of the electronic controller, and the switch/relay CAN be controlled by the electronic controller, so that the aim of disconnecting the electronic controller from the CAN bus network is fulfilled, the problem that the vehicle is disassembled again for troubleshooting and positioning error frames of the CAN bus network after the vehicle is assembled is avoided, and the electronic controller is removed one by one to bring manpower and material resources waste.
Drawings
FIG. 1 is a schematic flow chart illustrating steps of a method for checking an error frame of an automotive CAN bus according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the detailed step S30 of the method for checking the error frame of the CAN bus of the vehicle according to the embodiment of the present invention;
FIG. 3 is a flowchart illustrating the detailed step of step S40 of the method for checking the error frame of the CAN bus of the vehicle according to the embodiment of the present invention;
fig. 4 is a flowchart illustrating a detailed step of step S46 of the method for checking the CAN bus error frame in the embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the present embodiments of the invention, examples of which are illustrated in the accompanying drawings. While the invention will be described in conjunction with the specific embodiments, it will be understood that they are not intended to limit the invention to the embodiments described. On the contrary, it is intended to cover alternatives, modifications, and equivalents as may be included within the spirit and scope of the invention as defined by the appended claims. It should be noted that the method steps described herein may be implemented by any functional block or functional arrangement, and that any functional block or functional arrangement may be implemented as a physical entity or a logical entity, or a combination of both.
In order that those skilled in the art will better understand the present invention, the following detailed description of the invention is provided in conjunction with the accompanying drawings and the detailed description of the invention.
Note that: the example to be described next is only a specific example, and does not limit the embodiments of the present invention necessarily to the following specific steps, values, conditions, data, orders, and the like. Those skilled in the art can, upon reading this specification, utilize the concepts of the present invention to construct more embodiments than those specifically described herein.
Referring to fig. 1, an embodiment of the present invention provides a method for checking an error frame of an automotive CAN bus, including the following steps:
s10, when an error frame in the automobile CAN bus network is obtained, identifying the network segment to be tested where the error frame is located;
s20, confirming a to-be-tested electronic controller corresponding to the to-be-tested network segment according to the network topology structure of the automobile CAN bus network;
s30, controlling a switch/relay preset on the electronic controller to be tested to be disconnected;
and S40, when the error frame in the automobile CAN bus network disappears, determining that the electronic controller to be tested is the target electronic controller.
Specifically, when an error frame is detected to appear on the automobile CAN bus network, the position of the error frame needs to be judged first, namely the network segment position of the error frame on the CAN bus network needs to be judged and identified, namely the network segment to be detected where the error frame is located needs to be identified; after the network segment to be tested where the error frame is located is determined, which electronic controllers (i.e. the electronic controllers to be tested which need to be tested) on the network segment to be tested need to be determined, and the electronic controllers to be tested CAN be inquired and determined according to the network topology structure of the CAN bus network; after the electronic controllers to be tested corresponding to the network segment to be tested where the staggered frame is located are determined, the electronic controllers to be tested CAN be detected, and because the electronic controllers to be tested are already provided with the switches/relays in the hardware design stage, an instruction for disconnecting the switches/relays CAN be sent to the electronic controllers to be tested to disconnect the switches/relays during detection, and at the moment, the electronic controllers to be tested CAN be disconnected from the CAN bus network; when the error frame in the automobile CAN bus network disappears, the electronic controller to be detected is proved to be the electronic controller with the error frame, namely the target controller.
Therefore, in the invention, each electronic controller of the automobile CAN bus network is provided with one switch/relay in advance, so that when the electronic controller with the error frame is detected subsequently, the corresponding electronic controller CAN be disconnected from the automobile CAN bus network only by disconnecting the switch/relay on the electronic controller in a network communication mode. Therefore, after the vehicle is assembled, the problem that the vehicle is disassembled again to remove and detect each electronic controller in the automobile CAN bus network one by one for checking and positioning error frames CAN be avoided, and the labor and material cost CAN be greatly saved.
In addition, in some embodiments, the step S10, namely the step of "identifying the network segment to be tested where the error frame is located", includes the following steps:
s12, the CAN control tool is in communication connection with the automobile CAN bus network through the vehicle diagnosis interface;
and S14, acquiring the network segment to be tested where the error frame of the automobile CAN bus network is located through the CAN tool.
It CAN be known that the network segment where the error frame in the CAN bus network is located needs to be detected by means of CAN tools (such as CANoe, CANalyer, and other CAN tool software). Therefore, the CAN tool needs to be controlled to establish communication connection with the automobile CAN bus network, so that the CAN tool CAN conveniently acquire the network segment to be detected where the error frame is located. The CAN tool CAN be operated by using intelligent terminal equipment (such as a computer or a mobile phone) as a carrier, and the communication connection between the CAN tool and an automobile CAN bus network CAN be realized through a vehicle diagnosis interface.
In addition, in some embodiments, as shown in fig. 2, the step S30 "controlling the switch/relay preset on the electronic controller to be tested to open" includes the following steps:
s32, sending a test instruction for disconnecting the switch/relay to a to-be-tested electronic controller with the switch/relay preset;
and S34, when the electronic controller to be tested is detected to respond to the test instruction, the switch/relay is judged to be switched off.
When testing whether the electronic controller to be tested is the electronic controller forming the error frame, the testing CAN be carried out by disconnecting the electronic controller to be tested from the CAN bus network, and specifically, a test instruction for disconnecting the switch/relay CAN be sent to the electronic controller to be tested, so that the switch/relay preset on the electronic controller to be tested is disconnected; when the electronic controller to be tested responds to the test instruction, the electronic controller can be proved to receive the test instruction for opening the switch/relay, namely the switch/relay is proved to be opened. For example, an open switch/relay command may be sent by the CAN tool to the controller to be tested: 052F F00103010000; if the to-be-tested electronic controller replies the command: 056F F00103010000, it indicates that the electronic controller to be tested has opened the switch/relay.
Further, after step S32, namely the step of sending a test instruction for opening the switch/relay to the controller to be tested preset with the switch/relay, the method further comprises the following steps:
and S36, when it is detected that the electronic controller to be tested does not respond to the test instruction, detecting whether the test instruction is correctly sent out, and detecting whether the network segment to be tested where the error frame is located can be identified and confirming the electronic controller to be tested corresponding to the network segment to be tested.
That is, after a test command for opening the switch/relay is sent to the electronic controller to be tested, the electronic controller to be tested does not respond to the test command. At this time, it is necessary to check whether the test command is correctly issued, and if not, to re-correctly issue, and then to check whether the electronic controller responds to the test command. If the electronic controller to be tested still does not respond to the test instruction, whether the confirmation of the electronic controller to be tested and the network segment to be tested is correct or not is detected, namely the network segment to be tested generating the error frame is confirmed again, and the electronic controller to be tested corresponding to the network segment to be tested is confirmed again. If the CAN bus network is confirmed to be correct, whether the vehicle diagnosis interface and the communication connection between the CAN tool and the CAN bus network are normal or not needs to be detected. In this way, all problems are eliminated, so that the electronic controller to be tested can respond normally to the test instruction.
In some embodiments, the step S32, namely the step of sending a test instruction for opening the switch/relay to the electronic controller to be tested, where the switch/relay is preset, specifically includes the following steps:
s322, when detecting that one to-be-tested electronic controller corresponds to the to-be-tested network segment, sending a test instruction for disconnecting the switch/relay to the to-be-tested electronic controller with the switch/relay in advance;
and S324, when detecting that a plurality of to-be-tested electronic controllers corresponding to the network segment to be tested exist, sending a test instruction for disconnecting the switches/relays to the plurality of to-be-tested electronic controllers preset with the switches/relays.
It can be known that the network segment to be tested may correspond to one controller to be tested, or may correspond to a plurality of controllers to be tested. When the network segment to be tested corresponds to one electronic controller to be tested, only a test instruction for disconnecting the switch/relay corresponding to the electronic controller to be tested is required to be sent; when the network segment to be tested corresponds to a plurality of electronic controllers to be tested, a test instruction for disconnecting the plurality of switches/relays corresponding to the plurality of electronic controllers to be tested one by one needs to be sent. And when the test instruction for disconnecting the plurality of switches/relays of the plurality of electronic controllers to be tested is sent, the test instruction needs to be sent to all the electronic controllers to be tested simultaneously, and when the error frame is confirmed to be positioned in the electronic controllers to be tested, the test instruction can be sent to each electronic controller to be tested in the electronic controllers to be tested respectively so as to confirm the specific electronic controller to be tested, which is generated by the error frame.
In addition, in some embodiments, as shown in fig. 3, the step S40, namely the step of confirming that the electronic controller to be tested is the target electronic controller when the error frame in the car CAN bus network disappears is detected, includes the following steps:
s42, detecting whether an error frame exists in the automobile CAN bus network;
s44, when the error frame in the automobile CAN bus network disappears, the electronic controller to be tested is confirmed to be a target electronic controller;
and S46, when the error frame in the automobile CAN bus network is detected, determining that the electronic controller to be tested is a non-target electronic controller.
After the electronic controller to be tested is disconnected in the automobile CAN bus network, whether an error frame still exists in the automobile CAN bus network needs to be detected; if the situation that the error frame in the automobile CAN bus network disappears is detected, the fact that the electronic controller to be tested disconnected from the automobile CAN bus network is an electronic controller generating the error frame is proved, and the electronic controller is a target electronic controller; if the error frame in the automobile CAN bus network still exists, the fact that the electronic controller to be tested disconnected from the automobile CAN bus network is not the electronic controller generating the error frame is proved to be a non-target electronic controller.
Furthermore, in some embodiments, as shown in fig. 4, after the step S46, namely the step of confirming that the electronic controller to be tested is a non-target electronic controller when the presence of the error frame in the automobile CAN bus network is detected, the following steps are included:
s462, confirming other electronic controllers to be tested corresponding to the network segment to be tested;
s464, controlling switches/relays preset on other electronic controllers to be tested to be disconnected;
s466, when the fact that the error frame in the automobile CAN bus network disappears is detected, confirming that other electronic controllers to be tested are target electronic controllers.
After confirming that the electronic controller to be tested is a non-target electronic controller, if a plurality of electronic controllers to be tested exist on the network segment to be tested, other electronic controllers to be tested on the network segment to be tested need to be tested again; and if no other electronic controllers to be tested exist in the network segment to be tested, re-determining the network segment to be tested where the error frame is located, re-determining the electronic controllers to be tested in the network segment to be tested, and re-detecting the electronic controllers to be tested.
In addition, in some embodiments, after the step S40, that is, after the step "confirming that the electronic controller to be tested is the target electronic controller when detecting that the error frame in the car CAN bus network disappears", the method further includes the following steps:
s50, sending a test instruction for connecting the switch/relay to a target electronic controller preset with the switch/relay;
and S60, judging the connection of the switch/relay when the target electronic controller is detected to respond to the test instruction.
Namely, after the target electronic controller where the error frame in the automobile CAN bus network is located is determined, the target electronic controller needs to be restored, that is, the switch/relay corresponding to the target electronic controller is switched from the disconnection state to the connection state. The specific connection is similar to the above-described way of opening the switch/relay, for example, an instruction to connect the switch/relay may be sent to the target electronic controller by the CAN tool: 052F F00103000000; if the target electronic controller replies the command is monitored: 056F F00103000000, indicating that the target electronic controller has connected the switch/relay.
In addition, problems also need to be eliminated when the target electronic controller does not respond to the test instructions. Similarly, it is necessary to check whether the test command is correctly issued, and if not, to re-correctly issue the test command, and then to check whether the electronic controller responds to the test command. If the electronic controller to be tested still does not respond to the test instruction, whether the confirmation of the electronic controller to be tested and the network segment to be tested is correct or not is detected, namely the network segment to be tested generating the error frame is confirmed again, and the electronic controller to be tested corresponding to the network segment to be tested is confirmed again. If the CAN bus network is confirmed to be correct, whether the vehicle diagnosis interface and the communication connection between the CAN tool and the CAN bus network are normal or not needs to be detected. In this way, all problems are eliminated, so that the electronic controller to be tested can respond normally to the test instruction.
In addition, the present invention provides a system for checking an error frame of a CAN bus of an automobile, comprising:
the network segment identification module is used for identifying the network segment to be detected where the error frame is located when the error frame is obtained in the automobile CAN bus network;
the controller identification module is used for identifying the electronic controller to be tested corresponding to the network segment to be tested according to the network topology structure of the automobile CAN bus network;
the detection instruction transceiving module is used for controlling a switch/relay preset on the electronic controller to be detected to be switched off;
and the target controller judging module is used for confirming that the electronic controller to be tested is the target electronic controller when the error frame in the automobile CAN bus network disappears.
Specifically, the functions of each module in the system for checking the CAN bus error frame of the vehicle and the embodiments of the method for checking the CAN bus error frame of the vehicle described above are described in detail, and are not described one by one here.
Compared with the prior art, the invention has the following advantages: in the development stage of the hardware of the electronic controller of the CAN bus network, a switch/relay is added/installed between pins of CAN _ H and CAN _ L in a connector of the electronic controller and an internal connecting element of the electronic controller, and the switch/relay CAN be controlled by the electronic controller, so that the aim of disconnecting the electronic controller from the CAN bus network is fulfilled, the problem that the vehicle is disassembled again for troubleshooting and positioning error frames of the CAN bus network after the vehicle is assembled is avoided, and the electronic controller is removed one by one to bring manpower and material resources waste.
Based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements all or part of the method steps of the above method for checking an error frame of a CAN bus of an automobile.
The present invention can implement all or part of the processes of the above methods, and can also be implemented by using a computer program to instruct related hardware, where the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the method for checking the error frame of the CAN bus of the vehicle.
The processor may be a Central Processing Unit (CP U), or may be other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and the various interfaces and lines connecting the various parts of the overall computer device.
The memory may be used to store computer programs and/or modules, and the processor may implement various functions of the computer device by executing or executing the computer programs and/or modules stored in the memory, as well as by invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (e.g., a sound playing function, an image playing function, etc.); the storage data area may store data (e.g., audio data, video data, etc.) created according to the use of the cellular phone. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) Card, a flash memory Card (F lash Card), at least one magnetic disk storage device, a flash memory device, or other volatile solid state storage device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, server, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), servers and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for checking an error frame of an automobile CAN bus is characterized by comprising the following steps:
when an error frame occurs in an automobile CAN bus network, identifying a network segment to be detected where the error frame is located;
confirming a to-be-tested electronic controller corresponding to the to-be-tested network segment according to the network topology structure of the automobile CAN bus network;
controlling a switch/relay preset on a to-be-tested electronic controller to be disconnected;
and when the error frame in the automobile CAN bus network disappears, determining that the electronic controller to be tested is the target electronic controller.
2. The method for checking the CAN bus error frame of the automobile according to claim 1, wherein the step of controlling the switch/relay preset on the electronic controller to be tested to be turned off comprises the following steps:
sending a test instruction for disconnecting the switch/relay to a to-be-tested electronic controller preset with the switch/relay;
and when the electronic controller to be tested is detected to respond to the test instruction, the switch/relay is judged to be switched off.
3. The method for checking the CAN bus error frame of the vehicle as claimed in claim 2, wherein the step of sending the test command for opening the switch/relay to the electronic controller to be tested preset with the switch/relay further comprises the following steps:
and when detecting that the electronic controller to be tested does not respond to the test instruction, detecting whether the test instruction is correctly sent out, and detecting whether the network segment to be tested where the error frame is positioned can be identified and confirming the electronic controller to be tested corresponding to the network segment to be tested.
4. The method for checking the CAN bus error frame of the vehicle as claimed in claim 2, wherein the step of sending the test instruction for opening the switch/relay to the electronic controller to be tested, which is preset with the switch/relay, comprises the following steps:
when one to-be-tested electronic controller corresponding to the to-be-tested network segment is detected, sending a test instruction for disconnecting the switch/relay to the to-be-tested electronic controller with the preset switch/relay;
and when detecting that a plurality of to-be-tested electronic controllers corresponding to the network segment to be tested exist, sending a test instruction for disconnecting the switches/relays to the plurality of to-be-tested electronic controllers preset with the switches/relays.
5. The method for checking an automotive CAN bus error frame as set forth in claim 2, wherein said step of confirming that the electronic controller to be tested is the target electronic controller when detecting that the error frame in the automotive CAN bus network disappears comprises the steps of:
detecting whether an error frame in an automobile CAN bus network exists or not;
when detecting that an error frame in the automobile CAN bus network disappears, confirming that the electronic controller to be tested is a target electronic controller;
and when detecting that the error frame in the automobile CAN bus network exists, determining that the electronic controller to be tested is a non-target electronic controller.
6. The method for inspecting an automotive CAN bus error frame as set forth in claim 5, wherein the step of confirming that the electronic controller to be tested is a non-target electronic controller when the presence of an error frame in the automotive CAN bus network is detected comprises the steps of:
confirming other electronic controllers to be tested corresponding to the network segment to be tested;
controlling switches/relays preset on other electronic controllers to be tested to be disconnected;
and when detecting that the error frame in the automobile CAN bus network disappears, confirming that other electronic controllers to be tested are target electronic controllers.
7. The method for inspecting the CAN bus error frame of the vehicle according to claim 1, wherein the step of identifying the network segment to be tested where the error frame is located comprises the steps of:
the control CAN tool is in network communication connection with the automobile CAN bus through the vehicle diagnosis interface;
and acquiring the network segment to be tested where the error frame of the automobile CAN bus network is located by the CAN tool.
8. The vehicle control unit according to claim 1, wherein after the step of confirming that the electronic controller to be tested is the target electronic controller when detecting that the error frame in the vehicle CAN bus network disappears, the vehicle control unit further comprises the following steps:
sending a test instruction for connecting the switch/relay to a target electronic controller preset with the switch/relay;
and when the target electronic controller is detected to respond to the test instruction, judging the connection of the switch/relay.
9. A system for checking an automotive CAN bus error frame, comprising:
the network segment identification module is used for identifying the network segment to be detected where the error frame is located when the error frame is obtained in the automobile CAN bus network;
the controller identification module is used for identifying the electronic controller to be tested corresponding to the network segment to be tested according to the network topology structure of the automobile CAN bus network;
the detection instruction transceiving module is used for controlling a switch/relay preset on the electronic controller to be detected to be switched off;
and the target controller judging module is used for confirming that the electronic controller to be tested is the target electronic controller when the error frame in the automobile CAN bus network disappears.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out all or part of the method steps of the method of checking automotive CAN bus error frames according to claims 1 to 8.
CN202010712435.4A 2020-07-22 2020-07-22 Method, system and storage medium for checking error frame of automobile CAN bus Active CN112003774B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010712435.4A CN112003774B (en) 2020-07-22 2020-07-22 Method, system and storage medium for checking error frame of automobile CAN bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010712435.4A CN112003774B (en) 2020-07-22 2020-07-22 Method, system and storage medium for checking error frame of automobile CAN bus

Publications (2)

Publication Number Publication Date
CN112003774A true CN112003774A (en) 2020-11-27
CN112003774B CN112003774B (en) 2021-12-14

Family

ID=73467079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010712435.4A Active CN112003774B (en) 2020-07-22 2020-07-22 Method, system and storage medium for checking error frame of automobile CAN bus

Country Status (1)

Country Link
CN (1) CN112003774B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112684371A (en) * 2020-12-07 2021-04-20 深圳市道通科技股份有限公司 Fault positioning method and diagnostic equipment of automobile bus and automobile detection system and method
CN115242609A (en) * 2022-07-13 2022-10-25 东风越野车有限公司 Whole vehicle CAN bus fault frame analysis method and device and vehicle

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102176140A (en) * 2010-11-25 2011-09-07 西北工业大学 Remote control controlled area network (CAN) bus testing device and method
CN103259686A (en) * 2013-05-31 2013-08-21 浙江大学 CAN bus network fault diagnosis method based on disperse error events
CN107659465A (en) * 2017-09-13 2018-02-02 北京新能源汽车股份有限公司 The examination device and investigation method of a kind of vehicle CAN erroneous frame
CN109738722A (en) * 2018-12-29 2019-05-10 中国重汽集团济南动力有限公司 A kind of localization method carrying out electromagnetic interference source in vehicle based on CAN bus data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102176140A (en) * 2010-11-25 2011-09-07 西北工业大学 Remote control controlled area network (CAN) bus testing device and method
CN103259686A (en) * 2013-05-31 2013-08-21 浙江大学 CAN bus network fault diagnosis method based on disperse error events
CN107659465A (en) * 2017-09-13 2018-02-02 北京新能源汽车股份有限公司 The examination device and investigation method of a kind of vehicle CAN erroneous frame
CN109738722A (en) * 2018-12-29 2019-05-10 中国重汽集团济南动力有限公司 A kind of localization method carrying out electromagnetic interference source in vehicle based on CAN bus data

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112684371A (en) * 2020-12-07 2021-04-20 深圳市道通科技股份有限公司 Fault positioning method and diagnostic equipment of automobile bus and automobile detection system and method
WO2022121693A1 (en) * 2020-12-07 2022-06-16 深圳市道通科技股份有限公司 Automobile bus fault positioning method, diagnostic device, and automobile detection system and method
CN112684371B (en) * 2020-12-07 2023-11-21 深圳市道通科技股份有限公司 Fault positioning method, diagnosis equipment and automobile detection system and method for automobile bus
CN115242609A (en) * 2022-07-13 2022-10-25 东风越野车有限公司 Whole vehicle CAN bus fault frame analysis method and device and vehicle
CN115242609B (en) * 2022-07-13 2023-10-20 东风越野车有限公司 Whole vehicle CAN bus fault frame analysis method and device and vehicle

Also Published As

Publication number Publication date
CN112003774B (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN110032173B (en) Automatic matching method for automobile diagnosis system and related equipment
CN112003774B (en) Method, system and storage medium for checking error frame of automobile CAN bus
CN109656172B (en) Method and device for obtaining baud rate
CN102804698A (en) Method For Operating A Bus System, In Particular A Can Bus
CN103439961A (en) Automobile electronic control unit diagnostic function test method and system
CN108445860B (en) Diagnostic apparatus, diagnostic request processing method, and computer-readable storage medium
CN113485920B (en) Method and device for realizing DoIP entity, readable storage medium and electronic equipment
CN113406944B (en) Vehicle diagnosis method, device, equipment and computer readable storage medium
CN111988194B (en) Method and device for diagnosing automobile line
US9781527B2 (en) Smart plug and play automatic OBD-II system tester
CN113359657A (en) ECU diagnosis configuration code checking method and system and electronic control unit
CN112509176B (en) Fault repair method and device based on vehicle data
CN111142504A (en) Bus detection device and method
JP2002139544A (en) Test module and method for comparison test
EP4099641A1 (en) Transceiver device
CN112153578B (en) Vehicle configuration code self-checking method and vehicle
CN114281065A (en) Electronic control unit flashing method and device for vehicle and diagnostic equipment
CN115202679A (en) ECU (electronic control Unit) upgrading method and device based on vehicle-mounted Ethernet
CN111031514A (en) Data forwarding processor and data forwarding processing method based on wireless communication
CN112863008B (en) Fault recording method and device, storage medium and computer equipment
CN113219947B (en) Automobile line diagnosis system, method and equipment and readable storage medium
CN115309131A (en) Vehicle OBD diagnosis function test system
CN117130635A (en) Diagnostic upgrading method, diagnostic system, electronic equipment and automobile
CN116679679A (en) Off-line simulation verification method and system for controller finished automobile CAN bus fault
CN117234560A (en) Remote upgrading method and device for automobile

Legal Events

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