A method and system for testing fast and slow recovery strategies of silent node bus shutdown
By configuring the ID segment mask of the jammer, the silent node is induced to send a response message, which solves the problem of testing the fast or slow recovery strategy of the silent node bus shutdown and achieves efficient and accurate testing results.
Patent Information
- Application Number
- CN202211088177.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-09-07
AI Technical Summary
It is difficult to effectively test the bus-off recovery strategy of silent nodes with existing technologies. In particular, it is difficult to implement BUSOFF recovery strategy testing on nodes that do not send application messages in the vehicle network through interference instruments.
By configuring the ID segment mask of the jammer, the diagnostic session response message can be jammed, while the diagnostic session request message can be sent normally, inducing the silent node to send a response message, and then entering the bus-off state, and measuring its fast and slow recovery time.
The accurate test of the bus-off recovery strategy of silent nodes is realized with simple operation and high success rate, and the BUSOFF recovery strategy test of silent nodes can be completed.
Smart Images

Figure CN115494823B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automobile sample testing, and relates to a method and system for testing a silent node bus shutdown fast or slow recovery strategy. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] The CAN bus, also known as the Controller Area Network, is a typical industrial fieldbus. As an industrial fieldbus, the CAN bus offers advantages such as fast transmission speed, a large number of connectable node devices, strong anti-interference capabilities, and timely communication, making it widely used in automotive control projects.
[0004] When a node sends a message in normal transmission mode, if a transmission error occurs, the transmission error count will increase. As long as the transmission error count does not exceed the set value, the CAN controller will automatically resend the message. If multiple transmission errors occur, causing the transmission error count to accumulate and exceed the set value, the node will jump to the bus-off state. The MCU can immediately know that the node has entered the bus-off state (for example, by querying the corresponding bit of the status register in the error interrupt processing logic). At this time, the MCU controls the CAN controller to enter the "fast recovery" process, that is, to control the CAN controller to stop sending and receiving messages and wait. After the timing reaches the required time T1 (such as 100ms), the MCU restarts and resumes the CAN controller to participate in bus communication, thus completing a "fast recovery" process.
[0005] Each time a node enters the "fast recovery" process, the MCU counts this. When the node's "fast recovery" count reaches a set value N (e.g., 5 times), the MCU will extend the wait time T2 for resuming bus communication (e.g., 1000ms) when it enters the bus-off state again. This implements the "slow recovery" process. The main difference between the "fast recovery" and "slow recovery" processes lies in the different wait times for the node to resume bus communication.
[0006] Programming the bus-off recovery behavior through the MCU complements the CAN controller's error management and recovery mechanisms, making the bus-off recovery process more flexible and adaptable to practical application needs. Manufacturers can customize the wait times for "fast recovery" and "slow recovery," as well as the number of "fast recovery" counts before entering "slow recovery," based on specific requirements.
[0007] In the actual component test and acceptance process, the sample needs to be strictly tested for the bus off (BUSOFF) fast and slow recovery. Usually, we only need to use an interferometer to interfere with any frame of application message sent by the tested node, which can achieve the purpose of making the tested node enter the BUSOFF state. After the tested node enters the BUSOFF state, the application layer software will try to restore the bus transmission through a pre-set strategy (for example, 100ms fast recovery 5 times, converted to 1000ms slow recovery, until the recovery is successful). The time interval between each attempt of the tested node to the bus can be read in the Trace window, such as Figure 1 shown.
[0008] However, in a vehicle network, some nodes (such as dashcams and DVRs) do not periodically send application messages, which makes busoff recovery strategies challenging. Because these nodes do not send application messages, we call them "silent nodes." Since these nodes do not send application messages, it is impossible to set up jammers to interfere with the node under test, making busoff recovery strategy testing impossible for silent nodes. Summary of the Invention
[0009] In order to solve the above problems, the present invention proposes a silent node bus off fast or slow recovery strategy testing method and system, and the present invention can complete the test of the silent node BUSSOFF recovery strategy.
[0010] According to some embodiments, the present invention adopts the following technical solutions:
[0011] A method for testing a silent node bus shutdown fast or slow recovery strategy includes the following steps:
[0012] Connect the sample under test and the interferometer to establish a communication channel;
[0013] Configure the jammer ID segment mask so that the diagnostic session response message can be jammed and the diagnostic session request message can be sent normally.
[0014] Induce the silent node under test to send a diagnostic session response message;
[0015] Using a jammer to interfere with the diagnostic session response message sent by the node under test, causing the node under test to enter a bus-off state;
[0016] Determine the bus-off recovery period of the node under test.
[0017] As an optional implementation, the specific process of inducing the silent node under test to send a diagnostic session response message includes sending a request to enter a default session through a diagnostic session request message, and inducing the silent node under test to send a response message to the bus to respond to enter the default session.
[0018] As an optional implementation, the ID segment mask is consistent with the binary expression length of the diagnostic session request message and the response message.
[0019] As an optional implementation, the ID segment mask is configured to assign values only at positions where the binary expressions of the diagnostic session request message and the response message are inconsistent, so that the response message can be interfered with and the diagnostic session request message can be sent normally.
[0020] As an optional implementation, after the node under test receives the diagnostic session request message, it sends an interference response message within a set time.
[0021] As an optional implementation, the length of the set time is determined through simulation, and a request is sent through a diagnostic session request message to enter the default session, inducing the silent node under test to send a response message to the bus, measuring the fast or slow recovery time of the node, and determining the set time based on the fast or slow recovery time.
[0022] A silent node bus shutdown fast and slow recovery strategy testing system, comprising:
[0023] The jammer is used to connect to the sample device under test, establish a communication channel, send interference, interfere with the diagnostic session response message sent by the node under test, and make the node under test enter the bus off state;
[0024] A configuration module is used to configure the jammer ID segment mask so that the diagnostic session response message can be jammed and the diagnostic session request message can be sent normally;
[0025] A message induction module is used to induce the silent node under test to send a diagnostic session response message;
[0026] The test calculation module is used to determine the bus shutdown recovery period of the tested silent node.
[0027] When the configuration module is configured, the configuration ID segment mask is consistent with the binary expression length of the diagnosis session request message and the response message, and a value is assigned only at the position where the binary expression of the diagnosis session request message and the response message is inconsistent.
[0028] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor of a terminal device and executing the steps in the method.
[0029] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded by the processor and executing the steps in the described method.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] The present invention is easy to operate and can complete the test by simply setting the mask and the inducement message in the correct order;
[0032] The test of the present invention has high accuracy and high success rate, and can complete the test of the BUSSOFF recovery strategy of the silent node. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0034] Figure 1 This is a screenshot of the BUSOFF recovery strategy for a normal node in the prior art;
[0035] Figure 2 is an implementation flow chart of this embodiment;
[0036] Figure 3 Schematic diagram of communication channel allocation in this embodiment;
[0037] Figure 4 Schematic diagram of the hardware configuration of this embodiment;
[0038] Figure 5 This is a schematic diagram of a sample message response in this embodiment;
[0039] Figure 6 FIG. 2 is a schematic diagram of the interference situation of this embodiment. DETAILED DESCRIPTION
[0040] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0041] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0042] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0043] A test method for silent node BUSSOFF recovery strategy, such as Figure 2 As shown, it includes the following parts:
[0044] 1. Through diagnostic messages, induce the node under test to send messages to the bus;
[0045] 2. Operate the jammer to precisely interfere with the messages sent by the node under test, causing it to enter the BUSOFF state.
[0046] Specifically, first connect the node under test and the interferometer.
[0047] By sending the diagnostic session request message 0x783 with 02 10 01 00 00 00 00 00 (requesting to enter the default session), the node under test is induced to send the message 0x793 to the bus with 02 50 01 00 00 00 00 00 (responding to enter the default session). Then, the jammer is used to precisely interfere with the diagnostic session response message ID 0x793 sent by the node under test, causing the node under test to enter the BUSOFF state.
[0048] It can be found here that first, it is necessary to ensure that the 0x783 message is sent successfully and can be correctly received by the node under test, and then operate the jammer to interfere with the 0x793 message within a certain time (for example, the node under test responds within 10ms). Obviously, it is impossible to achieve millisecond-level precise timing through manual operation here, so this embodiment provides a new method, using the ID segment mask "XXXXXX1XXXX" to accurately interfere with the 0x793 message.
[0049] The binary representation of ID 0x793 is "111 1001 0011," and the binary representation of ID 0x783 is "111 10000011." It can be seen that the binary representations of these two IDs differ only in the sixth bit (counting from left to right). The sixth bit of the ID segment mask "XXXXXX1XXXX" is "1," which means that ID 0x793 will be interfered with, while ID 0x783 can be sent normally.
[0050] When testing the fast and slow recovery of a silent node prototype, it is necessary to connect the prototype to a power source and an interference meter and wake it up using a local event. Since the prototype is a silent node, no messages can be seen when the CANOE software is started and monitored. This makes it impossible to interfere with a specific bit of the message and measure the fast and slow recovery.
[0051] As a typical embodiment, the specific implementation is achieved through test software.
[0052] Add a CAN FRAME in the CAN IG module of the software and simulate sending out a frame of the diagnostic ID 783 of the sample. This will induce the sample to send back a message with ID 793.
[0053] As long as the sample sends a message, the speed of its recovery can be measured. And when interfering with the sample, only the ID793 of the sample is interfered with.
[0054] Open CANOE, find the example project Disturbance(CAN) and open it, then you need to allocate the CAN channel of VH6501. Figure 3 shown.
[0055] like Figure 4 As shown, one thing to note is that when using the interference function of VH6501, you need to check Activate in the hardware configuration and simulate sending a frame of periodic diagnostic message ID783 to lure the sample to send back a message ID793. Figure 5 shown.
[0056] Open the MainConfigPanel panel through the Panel, use the TriggerConfiguration button in the panel to open the corresponding configuration panel, and convert the ID sent by the sample into a binary expression and write it into IDBase. For this silent node, we interfere with the specific bit of the sent message.
[0057] Open the SequencePanel, configure the baud rate and number of inserted sequence slices, set the interference polarity as needed, and set the interference IDBase bit to dominant Dominant.
[0058] Confirm the channel information, set the number of interferences and cycles, then stop the software and change the diagnosis to event-type messages.
[0059] like Figure 6 As shown, start the CANOE project, then click the Enable On Device button in the panel to start interference. At this time, the event-type diagnostic message is started and a frame is sent. The interference situation can be seen in the trace interface for subsequent testing.
[0060] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0061] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0062] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0063] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0064] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
[0065] Although the above describes the specific embodiments of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without any creative work are still within the scope of protection of the present invention.
Claims
1. A method for testing the fast or slow recovery strategy of a silent node bus shutdown, characterized in that: The following steps are involved: Connect the sample under test and the interferometer to establish a communication channel; Configure the jammer ID segment mask so that the diagnostic session response message can be jammed and the diagnostic session request message can be sent normally. Inducing the silent node under test to send a diagnostic session response message, the specific process includes sending a request to enter a default session through a diagnostic session request message, inducing the silent node under test to send a response message to the bus in response to entering the default session; Using a jammer to interfere with the diagnostic session response message sent by the node under test, causing the node under test to enter a bus-off state; Determine the bus shutdown recovery period of the node under test; The ID segment mask is consistent with the length of the binary expression of the diagnostic session request message and the response message; the ID segment mask is configured to assign values only at positions where the binary expressions of the diagnostic session request message and the response message are inconsistent, so that the response message can be interfered with and the diagnostic session request message can be sent normally.
2. A silent node bus shutdown fast or slow recovery strategy testing method as claimed in claim 1, characterized in that: After the node under test receives the diagnostic session request message, it sends an interference response message within a set time.
3. A silent node bus shutdown fast or slow recovery strategy testing method as claimed in claim 2, characterized in that: The length of the set time is determined through simulation. A diagnostic session request message is sent to enter the default session, the silent node under test is induced to send a response message to the bus, the fast and slow recovery time of the node is measured, and the set time is determined based on the fast and slow recovery time.
4. A silent node bus shutdown fast and slow recovery strategy test system, characterized by: include: The jammer is used to connect to the sample device under test, establish a communication channel, send interference, interfere with the diagnostic session response message sent by the node under test, and make the node under test enter the bus off state; A configuration module is used to configure the jammer ID segment mask so that the diagnostic session response message can be jammed and the diagnostic session request message can be sent normally; The message induction module is used to induce the silent node under test to send a diagnostic session response message. The specific process includes sending a request to enter the default session through a diagnostic session request message, and inducing the silent node under test to send a response message to the bus in response to entering the default session; A test calculation module is used to determine the bus shutdown recovery period of the tested silent node; When the configuration module is configured, the configuration ID segment mask is consistent with the binary expression length of the diagnosis session request message and the response message, and a value is assigned only at the position where the binary expression of the diagnosis session request message and the response message is inconsistent.
5. A computer-readable storage medium, characterized in that: A plurality of instructions are stored therein, and the instructions are suitable for being loaded by a processor of a terminal device and executing the steps of the method according to any one of claims 1 to 3.
6. A terminal device, characterized in that: The method comprises a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; and the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the steps in the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Bus_Off fault testing system and testing method
CN107959599A
Vehicle-mounted multimedia system for vehicle information diagnosis
CN109164789A