CN115129021A - Method and device for testing vehicle-mounted Ethernet - Google Patents

Method and device for testing vehicle-mounted Ethernet Download PDF

Info

Publication number
CN115129021A
CN115129021A CN202110330371.6A CN202110330371A CN115129021A CN 115129021 A CN115129021 A CN 115129021A CN 202110330371 A CN202110330371 A CN 202110330371A CN 115129021 A CN115129021 A CN 115129021A
Authority
CN
China
Prior art keywords
vehicle
ethernet
ecu
tested piece
state
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
CN202110330371.6A
Other languages
Chinese (zh)
Other versions
CN115129021B (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.)
Guangzhou Automobile Group Co Ltd
Original Assignee
Guangzhou Automobile Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Automobile Group Co Ltd filed Critical Guangzhou Automobile Group Co Ltd
Priority to CN202110330371.6A priority Critical patent/CN115129021B/en
Publication of CN115129021A publication Critical patent/CN115129021A/en
Application granted granted Critical
Publication of CN115129021B publication Critical patent/CN115129021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0224Process history based detection method, e.g. whereby history implies the availability of large amounts of data
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and a device for testing a vehicle-mounted Ethernet, comprising the following steps of S1, determining the Ethernet mode of a vehicle-mounted tested piece ECU; step S2, determining the integrity of the Ethernet cable by obtaining the cable state; step S3, switching an industrial Ethernet interface through the vehicle-mounted Ethernet interface, and communicating the computer terminal with the vehicle-mounted tested piece ECU; step S4, determining the Ethernet protocol stack function state of the vehicle-mounted tested piece ECU; step S5, a plurality of vehicle-mounted Ethernet gateway interfaces are set into a loop through a virtual local area network, and the interface states of all vehicle-mounted Ethernet gateways are determined through detecting the receiving condition of data; step S6, determining the DoIP function state of the vehicle-mounted tested piece ECU; step S7, it is determined whether the vehicle has the basic function of the in-vehicle ethernet. The invention has the advantages of effective control cost and low cost, and can be put into test application in batches; the workload of testers is reduced, the testing steps are simplified, and the knowledge requirements of the testers are reduced.

Description

Method and device for testing vehicle-mounted Ethernet
Technical Field
The invention relates to the technical field of Ethernet, in particular to a method and a device for testing a vehicle-mounted Ethernet.
Background
The device for testing the vehicle-mounted Ethernet function can be used in the development stage of ECU (electronic control Unit) devices, the DV testing stage and the after-sales troubleshooting stage. As an auxiliary testing device, a feedback value can be provided for the function of the vehicle-mounted Ethernet, and a means for judging the function of the vehicle-mounted Ethernet is provided.
Functionality of the onboard ethernet and troubleshooting. In the prior art, Ethernet testing tools with stronger speciality, such as CANOE, are used, and the testing equipment has the advantages of high price, large volume, low portability and high complexity, and needs operators to have experience accumulation of Ethernet knowledge.
As described above, the existing testing equipment has many limitations, one is high price, the other is large volume, low portability, and the other is high complexity, and requires the operator to have experience accumulation of ethernet knowledge.
Disclosure of Invention
The invention aims to provide a method and a device for testing a vehicle-mounted Ethernet, which solve the technical problems that the existing method is high in cost and complexity and requires operators to have experience accumulation of Ethernet knowledge.
In one aspect, a method for testing a vehicle-mounted ethernet network is provided, which includes the following steps:
step S1, determining the Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the vehicle-mounted ECU and the connection state of the vehicle-mounted tested piece ECU;
step S2, determining the integrity of the Ethernet cable by acquiring the cable state;
step S3, the industrial Ethernet interface is switched through the vehicle-mounted Ethernet interface, and the computer terminal is communicated with the vehicle-mounted tested ECU;
step S4, sending ping message to the vehicle-mounted tested piece ECU, and determining the Ethernet protocol stack function state of the vehicle-mounted tested piece ECU;
step S5, a plurality of vehicle-mounted Ethernet gateway interfaces are set into a loop through a virtual local area network, and the interface states of all vehicle-mounted Ethernet gateways are determined through detecting the receiving condition of data;
step S6, sending a DoIP request message to the vehicle-mounted tested piece ECU, and determining the DoIP function state of the vehicle-mounted tested piece ECU;
and step S7, determining whether the vehicle has the basic function of the vehicle-mounted Ethernet according to the received Ethernet cable state of the vehicle-mounted tested ECU, the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested ECU.
Preferably, in step S1, the determining the ethernet mode of the vehicle-mounted tested piece ECU specifically includes:
setting an Ethernet mode of a test vehicle-mounted ECU as a master device mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not, and if so, determining that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave equipment mode; if not, setting the Ethernet mode of the test vehicle-mounted ECU to be a slave device mode;
re-detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not; if the connection is made, the Ethernet mode of the vehicle-mounted tested piece ECU is judged to be the main equipment mode; if not, judging that the ECU of the vehicle-mounted tested piece does not work normally; and outputs the test result.
Preferably, in step S2, the determining the ethernet cable status specifically includes:
acquiring the connection state of an Ethernet cable; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; and if the Ethernet cable is not connected, judging that the Ethernet cable is disconnected.
Preferably, in step S4, the determining the functional state of the ethernet protocol stack of the vehicle-mounted measured-piece ECU specifically includes:
sending a message to a vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU returns a data packet, judging that the Ethernet protocol stack function of the vehicle-mounted tested piece ECU is normal; and if the vehicle-mounted tested piece ECU does not return the data packet, judging that the function of the Ethernet protocol stack of the vehicle-mounted tested piece ECU is abnormal.
Preferably, in step S5, the determining the interface states of all vehicle ethernet gateways specifically includes:
setting adjacent vehicle-mounted Ethernet gateway interfaces into a group of communicated virtual local area networks, and forming a loop by all the vehicle-mounted Ethernet gateway interfaces through a plurality of groups of adjacent virtual local area networks;
sending detection data from a data inlet of the loop, and receiving the detection data by a data outlet of the loop;
if the data outlet successfully receives the detection data, all the vehicle-mounted Ethernet interfaces are judged to be in a normal working state; and if the data outlet does not successfully receive the detection data, judging that at least one vehicle-mounted Ethernet interface is in an abnormal working state.
Preferably, in step S6, the determining the DoIP function state of the vehicle-mounted measured-item ECU specifically includes:
sending a request message to a vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU replies, judging that the DoIP function of the vehicle-mounted tested piece ECU is normal; and if the vehicle-mounted tested piece ECU does not reply, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal.
Preferably, in step S7, the determining whether the vehicle has the basic vehicle ethernet function specifically includes:
if the Ethernet cable state of the vehicle-mounted tested piece ECU is complete, and the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU are normal, determining that the vehicle-mounted Ethernet basic function is achieved;
and if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected, or any one of the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
On the other hand, a device for testing the vehicle-mounted ethernet is also provided, so as to implement the method for testing the vehicle-mounted ethernet, including: the microcontroller module and the routing module are connected with each other;
the microcontroller module is used for determining the Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the vehicle-mounted ECU and the connection state of the vehicle-mounted tested piece ECU; the system is also used for determining the interface states of all vehicle-mounted Ethernet gateways by detecting the receiving condition of data; the system is used for sending a message to the vehicle-mounted tested piece ECU and determining the function state of the Ethernet protocol stack of the vehicle-mounted tested piece ECU; sending a request message to a vehicle-mounted tested piece ECU, and determining the DoIP functional state of the vehicle-mounted tested piece ECU;
the routing module is used for determining the integrity of the Ethernet cable by acquiring the cable state; the industrial Ethernet interface is switched through the vehicle-mounted Ethernet interface, and the computer terminal is communicated with the vehicle-mounted tested ECU;
the routing module is further used for setting a plurality of vehicle-mounted Ethernet gateway interfaces into a loop through a virtual local area network;
the microcontroller module is also used for determining whether the vehicle has the basic functions of the vehicle-mounted Ethernet according to the received Ethernet cable state of the vehicle-mounted tested piece ECU, the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU.
Preferably, the microcontroller module is further configured to set an ethernet mode of the test vehicle-mounted ECU to a master device mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not, and if so, determining that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave equipment mode; if not, setting the Ethernet mode of the test vehicle-mounted ECU to be a slave device mode;
re-detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not; if the connection is made, the Ethernet mode of the vehicle-mounted tested piece ECU is judged to be the main equipment mode; if not, judging that the ECU of the vehicle-mounted tested piece does not work normally; and outputting a test result;
the device is also used for sending a message to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU returns a data packet, the Ethernet protocol stack function of the vehicle-mounted tested piece ECU is judged to be normal; if the vehicle-mounted tested piece ECU does not return a data packet, judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is abnormal in function;
the data output port is used for receiving the detection data, and if the data output port receives the detection data successfully, all the vehicle-mounted Ethernet interfaces are judged to be in a normal working state; if the data outlet does not successfully receive the detection data, judging that at least one vehicle-mounted Ethernet interface is in an abnormal working state;
the device is also used for sending a request message to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU replies, the device judges that the DoIP function of the vehicle-mounted tested piece ECU is normal; if the vehicle-mounted tested piece ECU does not respond, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal;
and the Ethernet control unit is used for receiving the Ethernet cable state of the vehicle-mounted detected piece ECU, the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted detected piece ECU, and if the Ethernet cable state of the vehicle-mounted detected piece ECU is complete and the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted detected piece ECU are all normal, judging that the vehicle-mounted Ethernet basic function is achieved;
and if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected, or any one of the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
Preferably, the routing module is further configured to acquire an ethernet cable connection status; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; if the Ethernet cable is not connected, judging that the Ethernet cable is disconnected;
the system comprises a plurality of vehicle-mounted Ethernet gateway interfaces, a plurality of virtual local area networks and a plurality of control modules, wherein the vehicle-mounted Ethernet gateway interfaces are connected with the vehicle-mounted Ethernet gateway interfaces through the control modules;
the detection data is sent from a data inlet of the loop and received by a data outlet of the loop.
In summary, the embodiment of the invention has the following beneficial effects:
the method and the device for testing the vehicle-mounted Ethernet provided by the invention have the advantages that the test can be realized through software on the basis of the original hardware without adding additional hardware equipment, the cost is effectively controlled, the cost is low, and the method and the device can be put into test application in batches. The intelligent autonomous testing process is adopted, the workload of testers is reduced, the testing steps are simplified, the knowledge requirements of the testers are reduced, and the operation is simple. The method is fast positioned during development, and eliminates the problems of setting of an Ethernet mode (master/slave mode), setting of a VLAN (setting port for sending a data packet with VLAN information) and setting of a TCPIP protocol stack (ping playback request message). The method can be used for verifying the development of the diagnosis function of the vehicle-mounted electronic control unit by simulating the function of the DoIP Client terminal.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is within the scope of the present invention for those skilled in the art to obtain other drawings based on the drawings without inventive labor.
Fig. 1 is a main flowchart of a method for testing a vehicle ethernet in an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a method and an apparatus for testing a vehicle ethernet in an embodiment of the present invention.
Fig. 3 is a logic diagram illustrating the determination of the ethernet mode of the vehicle-mounted ECU according to the embodiment of the present invention.
Fig. 4 is a logic diagram illustrating the determination of the ethernet cable status according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of the vehicle-mounted ethernet interface switching industrial ethernet interface in the embodiment of the present invention.
Fig. 6 is a schematic structural diagram illustrating that a plurality of vehicle ethernet gateway interfaces are arranged in a loop through a virtual local area network in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings.
Fig. 1 is a schematic diagram illustrating an embodiment of a method for testing a vehicle ethernet according to the present invention. In this embodiment, the method comprises the steps of:
step S1, determining the Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the vehicle-mounted ECU and the connection state of the vehicle-mounted tested piece ECU; it can be understood that the ethernet mode of the ECU on the device under test is mainly a master-slave mode (master-slave).
In the specific embodiment, as shown in fig. 3, when the detection mode state is started, the ethernet mode of the test vehicle-mounted ECU (local machine) is first set as the master mode; detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not, and if so, determining that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode (slave mode); if not, setting the Ethernet mode of the tested vehicle-mounted ECU to be a slave device mode (slave mode); then, whether the test vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU is detected again; if the connection is made, the Ethernet mode of the vehicle-mounted tested piece ECU is judged to be the master device mode (master mode); if the connection is not made, judging that the ECU of the vehicle-mounted tested piece does not work normally; and outputs the test results to a display device, such as a liquid crystal display.
Step S2, determining the integrity of the Ethernet cable by acquiring the cable state; it will be appreciated that the ethernet cable status can be used to determine whether the ethernet cable is disconnected or has a bad contact. Specifically, the state of the ethernet cable can be determined through a preset obtaining method, for example, a chip data manual is queried to determine the function and the using method of the local device for obtaining the state of the ethernet cable, and then the state of the ethernet cable can be directly obtained.
In the specific embodiment, as shown in fig. 4, it is first determined that a test vehicle-mounted ECU is connected to a vehicle-mounted tested piece ECU on a hardware basis, and then an ethernet cable connection state is acquired; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; and if the connection state of the Ethernet cable is not connected, judging that the Ethernet cable is disconnected.
Step S3, as shown in fig. 5, the industrial ethernet interface is switched through the vehicle-mounted ethernet interface, specifically, one end of the local computer is connected to the vehicle-mounted tested ECU through the vehicle-mounted ethernet interface, and the other end is connected to a personal computer (computer terminal) through the industrial ethernet interface, so as to communicate the computer terminal with the vehicle-mounted tested ECU; it will be appreciated that the pc may be connected to the onboard ECU under certain specific requirements.
Step S4, sending a message to the vehicle-mounted tested piece ECU, and determining the Ethernet protocol stack functional state of the vehicle-mounted tested piece ECU; it can be understood that, when a DV test is performed, sending a ping message needs to be implemented in a high-temperature laboratory to check whether the ethernet protocol stack function of a tested piece is normal; however, since a common personal computer cannot enter a high-temperature laboratory to send messages, the personal computer can be replaced by the local computer to enter the high-temperature laboratory to execute the ping message sending task.
In the specific embodiment, a message is sent to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU returns a data packet, the Ethernet protocol stack function of the vehicle-mounted tested piece ECU is judged to be normal; and if the vehicle-mounted tested piece ECU does not return the data packet, judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is abnormal in function. In the high-temperature laboratory test, other test equipment can not be separated from the personal computer, and the device can be separated from the connection of the personal computer and can be tested together with the tested piece.
Step S5, a plurality of vehicle-mounted Ethernet gateway interfaces are set into a loop through a virtual local area network, and the interface states of all vehicle-mounted Ethernet gateways are determined through detecting the receiving condition of data; it can be understood that, because the vehicle-mounted gateway has a plurality of interfaces, in the test process, all the interfaces can be tested only by connecting a plurality of ECUs, and the data loopback can be controlled by the VLAN (virtual local area network) technology to complete the multi-interface test of the vehicle-mounted ethernet gateway.
In a specific embodiment, as shown in fig. 6, adjacent vehicle-mounted ethernet gateway interfaces are set as a group of communicated virtual local area networks, all vehicle-mounted ethernet gateway interfaces form a loop through a plurality of groups of adjacent virtual local area networks, specifically, a plurality of VLAN ids are set, two interfaces are in a group, 6 VLANs are set in total, and other ECU tests are performed in the same way; sending detection data from a data inlet of the loop, and receiving the detection data by a data outlet of the loop; if the data outlet successfully receives the detection data, all the vehicle-mounted Ethernet interfaces are judged to be in a normal working state; and if the data outlet does not successfully receive the detection data, judging that at least one vehicle-mounted Ethernet interface is in an abnormal working state. All the interfaces are traversed through the VLANID limiting data, so that one testing device can complete testing of a plurality of interfaces, and the existing method is to use a plurality of testing devices for testing.
Step S6, sending a request message to the vehicle-mounted tested piece ECU, and determining the DoIP functional state of the vehicle-mounted tested piece ECU; it can be understood that the machine can be used as a DoIP Client, a DoIP request message is sent through simulation, if a tested piece replies, the DoIP function of the tested piece is considered to work normally, and if the tested piece does not reply, the tested piece does not have the DoIP function, wherein the DoIP refers to diagnosis of the vehicle-mounted ECU through the Ethernet.
In the specific embodiment, a request message is sent to a vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU replies, the DoIP function of the vehicle-mounted tested piece ECU is judged to be normal; and if the vehicle-mounted tested piece ECU does not reply, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal.
And step S7, determining whether the vehicle has the basic function of the vehicle-mounted Ethernet according to the received Ethernet cable state of the vehicle-mounted tested ECU, the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested ECU. It can be understood that the basic functions of the vehicle-mounted ethernet are integrated to perform the test on the same device (the above steps S1-S6), specifically including the cable connectivity, the interface mode, the ICMP, the TCPIP, and the DoIP function tests, and the tests are performed in sequence. Only if the test results pass, the tested piece is considered to have the basic function of the vehicle-mounted Ethernet.
In the specific embodiment, if the ethernet cable state of the vehicle-mounted tested piece ECU is complete and the ethernet protocol stack functional state, the interface state of the vehicle-mounted ethernet gateway and the DoIP functional state of the vehicle-mounted tested piece ECU are all normal, it is determined that the vehicle-mounted ethernet basic function is provided;
and if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected, or any one of the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
Fig. 2 is a schematic diagram of an embodiment of an apparatus for testing a vehicle ethernet according to the present invention. In this embodiment, the apparatus is used to implement a method for testing a vehicle ethernet, and includes: the microcontroller module and the routing module are connected with each other;
the microcontroller module is used for determining the Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the vehicle-mounted ECU and the connection state of the vehicle-mounted tested piece ECU; the interface state of all vehicle-mounted Ethernet gateways is determined by detecting the receiving condition of the data; the device is used for sending a message to the vehicle-mounted tested piece ECU and determining the functional state of the Ethernet protocol stack of the vehicle-mounted tested piece ECU; sending a request message to a vehicle-mounted tested piece ECU, and determining the DoIP functional state of the vehicle-mounted tested piece ECU;
the routing module is used for determining the integrity of the Ethernet cable by acquiring the cable state; the industrial Ethernet interface is switched through the vehicle-mounted Ethernet interface, and the computer terminal is communicated with the vehicle-mounted tested ECU;
the routing module is further used for setting a plurality of vehicle-mounted Ethernet gateway interfaces into a loop through a virtual local area network;
the microcontroller module is also used for determining whether the vehicle has the basic functions of the vehicle-mounted Ethernet according to the received Ethernet cable state of the vehicle-mounted tested ECU, the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested ECU.
In a specific embodiment, the microcontroller module is further configured to set an ethernet mode of the vehicle-mounted ECU to be a master mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not, and if so, determining that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode; if not, setting the Ethernet mode of the tested vehicle-mounted ECU to be a slave device mode;
re-detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not; if the connection is made, the Ethernet mode of the vehicle-mounted tested piece ECU is judged to be the main equipment mode; if not, judging that the ECU of the vehicle-mounted tested piece does not work normally; and outputting a test result;
the device is also used for sending a message to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU returns a data packet, the Ethernet protocol stack function of the vehicle-mounted tested piece ECU is judged to be normal; if the vehicle-mounted tested piece ECU does not return a data packet, judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is abnormal in function;
the data output port is used for receiving the detection data, and if the data output port receives the detection data successfully, all the vehicle-mounted Ethernet interfaces are judged to be in a normal working state; if the data outlet does not successfully receive the detection data, judging that at least one vehicle-mounted Ethernet interface is in an abnormal working state;
the device is also used for sending a request message to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU replies, the device judges that the DoIP function of the vehicle-mounted tested piece ECU is normal; if the vehicle-mounted tested piece ECU does not respond, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal;
and the Ethernet gateway is used for receiving the Ethernet cable state, the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU, and if the Ethernet cable state of the vehicle-mounted tested piece ECU is complete and the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU are normal, determining that the vehicle-mounted Ethernet basic function is achieved;
and if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected, or any one of the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
More specifically, the routing module is further configured to obtain a connection state of the ethernet cable; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; if the Ethernet cable is not connected, judging that the Ethernet cable is disconnected;
the system comprises a plurality of vehicle-mounted Ethernet gateway interfaces, a plurality of virtual local area networks and a plurality of control modules, wherein the vehicle-mounted Ethernet gateway interfaces are connected with the vehicle-mounted Ethernet gateway interfaces through the control modules;
the detection data is sent from a data inlet of the loop and received by a data outlet of the loop.
In summary, the embodiment of the invention has the following beneficial effects:
the method and the device for testing the vehicle-mounted Ethernet provided by the invention have the advantages that the test can be realized through software on the basis of the original hardware without adding additional hardware equipment, the cost is effectively controlled, the cost is low, and the method and the device can be put into test application in batches. The intelligent autonomous testing process is adopted, the workload of testers is reduced, the testing steps are simplified, the knowledge requirements of the testers are reduced, and the operation is simple. The method is fast positioned during development, and eliminates the problems of setting of an Ethernet mode (master/slave mode), setting of a VLAN (setting port for sending a data packet with VLAN information) and setting of a TCPIP protocol stack (ping playback request message). The method can be used for verifying the development of the diagnosis function of the vehicle-mounted electronic control unit by simulating the function of the DoIP Client terminal.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A method for testing a vehicle-mounted Ethernet is characterized by comprising the following steps:
step S1, determining the Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the vehicle-mounted ECU and the connection state of the vehicle-mounted tested piece ECU;
step S2, determining the integrity of the Ethernet cable by acquiring the cable state;
step S3, switching an industrial Ethernet interface through the vehicle-mounted Ethernet interface, and communicating the computer terminal with the vehicle-mounted tested piece ECU;
step S4, sending a message to the vehicle-mounted tested piece ECU, and determining the Ethernet protocol stack functional state of the vehicle-mounted tested piece ECU;
step S5, a plurality of vehicle-mounted Ethernet gateway interfaces are set into a loop through a virtual local area network, and the interface states of all vehicle-mounted Ethernet gateways are determined by detecting the receiving condition of data;
step S6, sending a request message to the vehicle-mounted tested piece ECU, and determining the DoIP functional state of the vehicle-mounted tested piece ECU;
and step S7, determining whether the vehicle has the basic function of the vehicle-mounted Ethernet according to the integrity of the Ethernet cable of the vehicle-mounted tested piece ECU, the functional state of the Ethernet protocol stack, the interface state of the vehicle-mounted Ethernet gateway and the DoIP functional state of the vehicle-mounted tested piece ECU.
2. The method according to claim 1, wherein in step S1, the determining the ethernet mode of the vehicle-mounted device under test ECU specifically includes:
setting an Ethernet mode of a test vehicle-mounted ECU as a master device mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not, and if so, determining that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode; if not, setting the Ethernet mode of the tested vehicle-mounted ECU to be a slave device mode;
re-detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not; if the connection is made, the Ethernet mode of the vehicle-mounted tested piece ECU is judged to be the main equipment mode; if not, judging that the ECU of the vehicle-mounted tested piece does not work normally; and outputs the test result.
3. The method according to claim 2, wherein in step S2, the determining the ethernet cable status specifically includes:
acquiring the connection state of an Ethernet cable; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; and if the connection state of the Ethernet cable is not connected, judging that the Ethernet cable is disconnected.
4. The method according to claim 3, wherein in step S4, the determining the functional state of the ethernet protocol stack of the vehicle-mounted device-under-test ECU specifically includes:
sending a message to a vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU returns a data packet, judging that the Ethernet protocol stack function of the vehicle-mounted tested piece ECU is normal; and if the vehicle-mounted tested piece ECU does not return the data packet, judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is abnormal in function.
5. The method according to claim 4, wherein in step S5, the determining the interface states of all vehicle ethernet gateways specifically includes:
setting adjacent vehicle-mounted Ethernet gateway interfaces into a group of communicated virtual local area networks, and forming a loop by all the vehicle-mounted Ethernet gateway interfaces through a plurality of groups of adjacent virtual local area networks;
sending detection data from a data inlet of the loop, and receiving the detection data by a data outlet of the loop;
if the data outlet successfully receives the detection data, all the vehicle-mounted Ethernet interfaces are judged to be in a normal working state; and if the data outlet does not successfully receive the detection data, judging that at least one vehicle-mounted Ethernet interface is in an abnormal working state.
6. The method according to claim 4, wherein in step S6, the determining the DoIP functional state of the vehicle-mounted tested piece ECU specifically comprises:
sending a request message to a vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU replies, judging that the DoIP function of the vehicle-mounted tested piece ECU is normal; and if the vehicle-mounted tested piece ECU does not reply, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal.
7. The apparatus according to claim 6, wherein in step S7, the determining whether the vehicle has the basic ethernet function specifically includes:
if the Ethernet cable state of the vehicle-mounted tested piece ECU is complete, and the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU are normal, determining that the vehicle-mounted Ethernet basic function is achieved;
and if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected, or any one of the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
8. An apparatus for testing an on-board ethernet network for carrying out the method according to any one of claims 1 to 7, comprising: the microcontroller module and the routing module are connected with each other;
the microcontroller module is used for determining the Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the device for testing the vehicle-mounted Ethernet and the connection state of the device and the vehicle-mounted tested piece ECU; the system is also used for determining the interface states of all vehicle-mounted Ethernet gateways by detecting the receiving condition of data; the system is used for sending a message to the vehicle-mounted tested piece ECU and determining the function state of the Ethernet protocol stack of the vehicle-mounted tested piece ECU; sending a request message to a vehicle-mounted tested piece ECU, and determining the DoIP functional state of the vehicle-mounted tested piece ECU;
the routing module is used for determining the integrity of the Ethernet cable by acquiring the cable state; the industrial Ethernet interface is switched through the vehicle-mounted Ethernet interface, and the computer terminal is communicated with the vehicle-mounted tested ECU;
the routing module is further used for setting a plurality of vehicle-mounted Ethernet gateway interfaces into a loop through a virtual local area network;
the microcontroller module is also used for determining whether the vehicle has the basic functions of the vehicle-mounted Ethernet according to the received Ethernet cable state of the vehicle-mounted tested piece ECU, the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU.
9. The apparatus of claim 8, wherein the microcontroller module is further configured to set an ethernet mode of testing the in-vehicle ECU to a master mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not, and if so, determining that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode; if not, setting the Ethernet mode of the test vehicle-mounted ECU to be a slave device mode;
re-detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not; if the connection is made, the Ethernet mode of the vehicle-mounted tested piece ECU is judged to be the main equipment mode; if not, judging that the ECU of the vehicle-mounted tested piece does not work normally; and outputting a test result;
the device is also used for sending a message to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU returns a data packet, the Ethernet protocol stack function of the vehicle-mounted tested piece ECU is judged to be normal; if the vehicle-mounted tested piece ECU does not return a data packet, judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is abnormal in function;
the data output port is used for receiving the detection data, and if the data output port receives the detection data successfully, all the vehicle-mounted Ethernet interfaces are judged to be in a normal working state; if the data outlet does not successfully receive the detection data, judging that at least one vehicle-mounted Ethernet interface is in an abnormal working state;
the device is also used for sending a request message to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU replies, the device judges that the DoIP function of the vehicle-mounted tested piece ECU is normal; if the vehicle-mounted tested piece ECU does not respond, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal;
and the Ethernet gateway is used for receiving the Ethernet cable state, the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU, and if the Ethernet cable state of the vehicle-mounted tested piece ECU is complete and the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU are normal, determining that the vehicle-mounted Ethernet basic function is achieved;
and if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected, or any one of the Ethernet protocol stack function state, the interface state of the vehicle-mounted Ethernet gateway and the DoIP function state of the vehicle-mounted tested piece ECU is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
10. The apparatus of claim 9, wherein the routing module is further configured to obtain an ethernet cable connection status; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; if the Ethernet cable is not connected, judging that the Ethernet cable is disconnected;
the system comprises a plurality of vehicle-mounted Ethernet gateway interfaces, a plurality of virtual local area networks and a plurality of control modules, wherein the vehicle-mounted Ethernet gateway interfaces are connected with the vehicle-mounted Ethernet gateway interfaces through the control modules;
the detection data is sent from a data inlet of the loop and received by a data outlet of the loop.
CN202110330371.6A 2021-03-29 2021-03-29 Method and device for testing vehicle-mounted Ethernet Active CN115129021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110330371.6A CN115129021B (en) 2021-03-29 2021-03-29 Method and device for testing vehicle-mounted Ethernet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110330371.6A CN115129021B (en) 2021-03-29 2021-03-29 Method and device for testing vehicle-mounted Ethernet

Publications (2)

Publication Number Publication Date
CN115129021A true CN115129021A (en) 2022-09-30
CN115129021B CN115129021B (en) 2024-03-01

Family

ID=83374310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110330371.6A Active CN115129021B (en) 2021-03-29 2021-03-29 Method and device for testing vehicle-mounted Ethernet

Country Status (1)

Country Link
CN (1) CN115129021B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116074216A (en) * 2023-01-09 2023-05-05 中国第一汽车股份有限公司 Test method and test device for vehicle-mounted Ethernet physical layer and cloud server

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160308822A1 (en) * 2015-04-16 2016-10-20 Hyundai Motor Company Method and system for providing optimized ethernet communication for vehicle
CN107765676A (en) * 2017-11-01 2018-03-06 河北工业大学 A kind of onboard diagnostic system and its method based on Ethernet
US20180374282A1 (en) * 2017-06-23 2018-12-27 Hyundai Motor Company Vehicle test system, vehicle and vehicle test method
US20190079842A1 (en) * 2017-09-13 2019-03-14 Hyundai Motor Company Failure diagnosis apparatus and method for in-vehicle control unit
CN110138624A (en) * 2019-07-04 2019-08-16 上海赫千电子科技有限公司 Vehicle-mounted ethernet test equipment, system and test method
CN110471400A (en) * 2019-08-30 2019-11-19 上海怿星电子科技有限公司 A kind of vehicle-mounted Ethernet real steering vectors method
KR20200030167A (en) * 2018-09-12 2020-03-20 현대자동차주식회사 Ethernet controller for vehicle, ethernet network including the same and method of communication between can communicationi protocol and the same
KR20200143780A (en) * 2019-06-17 2020-12-28 현대자동차주식회사 Communication method for ethernet network of vehicle
CN112241157A (en) * 2020-09-04 2021-01-19 北京新能源汽车技术创新中心有限公司 Loopback testing device and method for diagnosing communication link fault of vehicle central gateway
CN112367223A (en) * 2020-10-29 2021-02-12 中国第一汽车股份有限公司 Ethernet test method, device, equipment and medium for gateway controller

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160308822A1 (en) * 2015-04-16 2016-10-20 Hyundai Motor Company Method and system for providing optimized ethernet communication for vehicle
US20180374282A1 (en) * 2017-06-23 2018-12-27 Hyundai Motor Company Vehicle test system, vehicle and vehicle test method
US20190079842A1 (en) * 2017-09-13 2019-03-14 Hyundai Motor Company Failure diagnosis apparatus and method for in-vehicle control unit
CN107765676A (en) * 2017-11-01 2018-03-06 河北工业大学 A kind of onboard diagnostic system and its method based on Ethernet
KR20200030167A (en) * 2018-09-12 2020-03-20 현대자동차주식회사 Ethernet controller for vehicle, ethernet network including the same and method of communication between can communicationi protocol and the same
KR20200143780A (en) * 2019-06-17 2020-12-28 현대자동차주식회사 Communication method for ethernet network of vehicle
CN110138624A (en) * 2019-07-04 2019-08-16 上海赫千电子科技有限公司 Vehicle-mounted ethernet test equipment, system and test method
CN110471400A (en) * 2019-08-30 2019-11-19 上海怿星电子科技有限公司 A kind of vehicle-mounted Ethernet real steering vectors method
CN112241157A (en) * 2020-09-04 2021-01-19 北京新能源汽车技术创新中心有限公司 Loopback testing device and method for diagnosing communication link fault of vehicle central gateway
CN112367223A (en) * 2020-10-29 2021-02-12 中国第一汽车股份有限公司 Ethernet test method, device, equipment and medium for gateway controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116074216A (en) * 2023-01-09 2023-05-05 中国第一汽车股份有限公司 Test method and test device for vehicle-mounted Ethernet physical layer and cloud server

Also Published As

Publication number Publication date
CN115129021B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
CN108353004B (en) Method, system, and computer readable medium for testing Network Function Virtualization (NFV)
CN111786855B (en) Network card pressure testing method and device, electronic equipment and storage medium
CN112653600A (en) Network card performance testing method and device based on USB network card and electronic equipment
WO2022184069A1 (en) Automobile bus fault analysis method, diagnosis device, and bus fault analysis system
CN112367223A (en) Ethernet test method, device, equipment and medium for gateway controller
CN112241157A (en) Loopback testing device and method for diagnosing communication link fault of vehicle central gateway
CN114137937A (en) Automatic diagnostic function test method and system
CN102752161A (en) Test system
CN110708715B (en) Service fault finding method and device for 5G base station
CN115129021B (en) Method and device for testing vehicle-mounted Ethernet
CN108445860B (en) Diagnostic apparatus, diagnostic request processing method, and computer-readable storage medium
WO2021109476A1 (en) Ecu for activating testmode of real vehicle phy under in-vehicle ethernet architecture, and system
CN109471763B (en) Method, device, equipment and system for grabbing trace of NVME (network video management entity) hard disk
CN105515890A (en) OpenFlow protocol consistency testing method and equipment
CN111142504B (en) Bus detection device and method
CN110968004B (en) Cable test system based on FPGA prototype verification development board
CN113282070A (en) Bus port fault judgment method and system
CN216391061U (en) Gigabit vehicle-mounted Ethernet testing device and system
CN113886274A (en) Stability testing method, device, equipment and storage medium for Internet of vehicles terminal
Kocić et al. A novel solution for an ECU simulator as a key component for automated testing and verification of a vehicle diagnostic device
CN107204895A (en) A kind of method of testing and system of DUT port collisions disposal ability
CN113341938B (en) Automobile controller testing system and control method thereof
CN115291008A (en) Vehicle-mounted Ethernet switch test method, device, equipment and storage medium
Gajul et al. Automation solution for software testing of can based ecus
CN106921548A (en) A kind of automatic coagulation analyzer communication system based on CAN

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