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

Method and device for testing vehicle-mounted Ethernet Download PDF

Info

Publication number
CN115129021B
CN115129021B CN202110330371.6A CN202110330371A CN115129021B CN 115129021 B CN115129021 B CN 115129021B CN 202110330371 A CN202110330371 A CN 202110330371A CN 115129021 B CN115129021 B CN 115129021B
Authority
CN
China
Prior art keywords
vehicle
ecu
ethernet
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.)
Active
Application number
CN202110330371.6A
Other languages
Chinese (zh)
Other versions
CN115129021A (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

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 an Ethernet mode of a 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 piece ECU; s4, determining the functional state of an Ethernet protocol stack of the vehicle-mounted tested piece ECU; s5, setting a plurality of vehicle-mounted Ethernet gateway interfaces into a loop through a virtual local area network, and determining interface states of all vehicle-mounted Ethernet gateways through detecting data receiving conditions; s6, determining the DoIP function state of the vehicle-mounted tested piece ECU; step S7, determining whether the vehicle has the on-board Ethernet basic function. The invention has the advantages of effective control cost and low cost, and can be put into test application in batches; the workload of the 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 present invention relates to the field of ethernet technologies, and in particular, to a method and an apparatus for testing a vehicle-mounted ethernet.
Background
The device for testing the vehicle-mounted Ethernet function can be used for a development stage, a DV test stage and an after-sale fault checking stage of an ECU. 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 can be provided.
And (5) the function of the vehicle-mounted Ethernet and troubleshooting. In the prior art, an Ethernet testing tool with relatively strong professionals, such as CANOE, is used, and the testing equipment is high in price, large in size, low in portability and high in complexity, and needs experience accumulation of Ethernet knowledge of operators.
As described above, the existing test equipment has many limitations, including high price, large volume, low portability, and high complexity, and requires experience accumulation of ethernet knowledge for operators.
Disclosure of Invention
The invention aims to provide a method and a device for testing a vehicle-mounted Ethernet, which solve the technical problems of high cost and high complexity of the existing method and the requirement that operators have experience accumulation of Ethernet knowledge.
In one aspect, a method for testing a vehicle-mounted ethernet network is provided, comprising the steps of:
step S1, determining an Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the tested vehicle-mounted ECU and the connection state of the tested vehicle-mounted 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 piece ECU;
step S4, sending a ping message to the vehicle-mounted tested piece ECU, and determining the functional state of an Ethernet protocol stack of the vehicle-mounted tested piece ECU;
s5, setting a plurality of vehicle-mounted Ethernet gateway interfaces into a loop through a virtual local area network, and determining interface states of all vehicle-mounted Ethernet gateways through detecting data receiving conditions;
step S6, a DoIP request message is sent to the vehicle-mounted tested piece ECU, and the DoIP function state of the vehicle-mounted tested piece ECU is determined;
and S7, determining whether the vehicle has the vehicle-mounted Ethernet basic function according to the received Ethernet cable state, ethernet protocol stack functional state, interface state of the vehicle-mounted Ethernet gateway and DoIP functional state of the vehicle-mounted tested ECU.
Preferably, in step S1, the determining the ethernet mode of the vehicle-mounted measured object ECU specifically includes:
setting an Ethernet mode of a test vehicle-mounted ECU as a main equipment mode;
detecting and testing whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU, if so, judging that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode; if the test vehicle-mounted ECU is not connected, setting an Ethernet mode of the test vehicle-mounted ECU as a slave device mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not again; if the vehicle-mounted tested piece ECU is connected, judging that an Ethernet mode of the vehicle-mounted tested piece ECU is a main equipment mode; if the vehicle-mounted tested piece ECU is not connected, judging that the vehicle-mounted tested piece ECU does not work normally; and outputs the test result.
Preferably, in step S2, the determining an ethernet cable state 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; if the Ethernet cable connection state is unconnected, the Ethernet cable is determined to be disconnected.
Preferably, in step S4, the determining the ethernet protocol stack function status of the vehicle-mounted tested piece ECU specifically includes:
sending a message to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU returns a data packet, judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is normal in function; 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.
Preferably, in step S5, the determining interface states of all the on-vehicle ethernet gateways specifically includes:
setting adjacent vehicle-mounted Ethernet gateway interfaces as 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;
transmitting the detection data from the data inlet of the loop, and receiving the detection data from the data outlet of the loop;
if the data outlet successfully receives the detection data, judging that all the vehicle-mounted Ethernet interfaces are 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.
Preferably, in step S6, the determining the DoIP function status of the vehicle-mounted measured-piece ECU specifically includes:
sending a request message to the vehicle-mounted tested piece ECU, and judging that the DoIP function of the vehicle-mounted tested piece ECU is normal if the vehicle-mounted tested piece ECU replies; and if the vehicle-mounted tested piece ECU does not recover, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal.
Preferably, in step S7, whether the real vehicle has an on-board ethernet basic function specifically includes:
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, judging that the vehicle-mounted Ethernet basic function is provided;
if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected or any one of 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 is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
In another aspect, a device for testing a vehicle-mounted ethernet is provided, so as to implement the method for testing a vehicle-mounted ethernet, including: a microcontroller module and a routing module connected to 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 tested vehicle-mounted ECU and the connection state of the tested vehicle-mounted piece ECU; the interface states of all the vehicle-mounted Ethernet gateways are determined by detecting the receiving condition of the data; the method comprises the steps of determining the functional state of an Ethernet protocol stack of a vehicle-mounted tested piece ECU, and sending a message to the vehicle-mounted tested piece ECU; sending a request message to the vehicle-mounted tested piece ECU, and determining the DoIP function 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 computer terminal is communicated with the vehicle-mounted tested piece ECU through the vehicle-mounted Ethernet interface switching industrial Ethernet interface;
the routing module is also 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 vehicle-mounted Ethernet basic function according to the received Ethernet cable state, ethernet protocol stack functional state, interface state of the vehicle-mounted Ethernet gateway and DoIP functional state of the vehicle-mounted tested ECU.
Preferably, the microcontroller module is further configured to set an ethernet mode of the test vehicle-mounted ECU as a main device mode;
detecting and testing whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU, if so, judging that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode; if the test vehicle-mounted ECU is not connected, setting an Ethernet mode of the test vehicle-mounted ECU as a slave device mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not again; if the vehicle-mounted tested piece ECU is connected, judging that an Ethernet mode of the vehicle-mounted tested piece ECU is a main equipment mode; if the vehicle-mounted tested piece ECU is not connected, judging that the vehicle-mounted tested piece ECU does not work normally; and outputting a test result;
the system is also used for sending a message to the vehicle-mounted tested piece ECU, and judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is normal in function if the vehicle-mounted tested piece ECU returns a data packet; 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;
the system is also used for acquiring whether the data outlet successfully receives the detection data or not, and if the data outlet successfully receives the detection data, judging that all the vehicle-mounted Ethernet interfaces are 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 vehicle-mounted tested piece ECU 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 DoIP function of the vehicle-mounted tested piece ECU is judged to be 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;
the method comprises the steps that an Ethernet cable state, an Ethernet protocol stack functional state, an interface state of a vehicle-mounted Ethernet gateway and a DoIP functional state of the vehicle-mounted tested ECU are received, and if the Ethernet cable state of the vehicle-mounted tested 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 ECU are all normal, the vehicle-mounted Ethernet basic function is judged to be provided;
if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected or any one of 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 is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
Preferably, the routing module is further configured to obtain an ethernet cable connection state; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; if the connection state of the Ethernet cable is unconnected, judging that the Ethernet cable is disconnected;
the system comprises a vehicle-mounted Ethernet gateway interface, a plurality of groups of vehicle-mounted Ethernet gateway interfaces, a plurality of virtual local area networks and a plurality of network-mounted Ethernet gateway interfaces, wherein the vehicle-mounted Ethernet gateway interfaces are arranged as a group of communicated virtual local area networks;
the detection data is sent from the data entry of the loop and received by the data exit of the loop.
In summary, the embodiment of the invention has the following beneficial effects:
according to the method and the device for testing the vehicle-mounted Ethernet, disclosed by the invention, the test can be realized through software on the basis of 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, so that the workload of a tester is reduced, the testing steps are simplified, the knowledge requirement of the tester is reduced, and the operation is simple. Quick positioning in development, elimination of Ethernet mode setting problem (master/slave mode), VLAN setting problem (setting port sends data packet with VLAN information), TCPIP protocol stack problem (ping echo 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.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are required in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that it is within the scope of the invention to one skilled in the art to obtain other drawings from these drawings without inventive faculty.
Fig. 1 is a schematic flow chart of a method for testing a vehicle-mounted 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-mounted ethernet in an embodiment of the present invention.
Fig. 3 is a logic schematic diagram of determining an ethernet mode of a vehicle-mounted ECU according to an embodiment of the present invention.
Fig. 4 is a logic diagram of determining an ethernet cable status in an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an on-board ethernet interface switching industrial ethernet interface according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a plurality of vehicle ethernet gateway interfaces configured as a loop through a virtual local area network according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings, for the purpose of making the objects, technical solutions and advantages of the present invention more apparent.
Fig. 1 is a schematic diagram of an embodiment of a method for testing a vehicle ethernet network according to the present invention. In this embodiment, the method comprises the steps of:
step S1, determining an Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the tested vehicle-mounted ECU and the connection state of the tested vehicle-mounted piece ECU; it is understood that the ethernet mode of the ECU-carried test piece is mainly a master-slave device mode (master-slave).
In a specific embodiment, as shown in fig. 3, when the mode state starts to be detected, firstly, an ethernet mode of a test vehicle ECU (local) is set as a master mode; detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not, and if so, judging that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave mode (slave mode); if not, setting the Ethernet mode of the test vehicle-mounted ECU as a slave mode (slave mode); then, detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not again; if the vehicle-mounted tested piece ECU is connected, judging that the Ethernet mode of the vehicle-mounted tested piece ECU is a master mode; if the vehicle-mounted tested piece ECU is not connected, judging that the vehicle-mounted tested piece ECU 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 it may be determined whether the ethernet cable is disconnected or in poor contact by the ethernet cable status. Specifically, the ethernet cable state may be determined by a preset obtaining method, for example, a chip data manual is queried to determine a function and a use method of obtaining the ethernet cable state of the host, and then the ethernet cable state may be directly obtained, where the chip data manual mainly records a basic description about technical features of a product, including basic configuration of the product (such as capacity of a built-in Flash and RAM, number of peripheral devices, etc.), number and allocation of pins, electrical characteristics, package information, order codes, and the like.
In a specific embodiment, as shown in fig. 4, firstly, it is determined that a test vehicle-mounted ECU and a vehicle-mounted tested piece ECU are connected on a hardware basis, and then, an ethernet cable connection state is obtained; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; if the Ethernet cable connection state is unconnected, the Ethernet cable is determined to be 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 machine is connected with the vehicle-mounted tested piece ECU through the vehicle-mounted Ethernet interface, and the other end of the local machine is connected with a personal computer (computer terminal) through the industrial Ethernet interface, so that the computer terminal is communicated with the vehicle-mounted tested piece ECU; it will be appreciated that the personal computer may be connected to the vehicle ECU under certain specific requirements.
Step S4, a message is sent to the vehicle-mounted tested piece ECU, and the Ethernet protocol stack functional state of the vehicle-mounted tested piece ECU is determined; it can be understood that when performing DV test, it is necessary to implement sending a ping message in a high-temperature laboratory to check whether the ethernet protocol stack of the tested piece functions normally; however, since a common personal computer cannot enter a high-temperature laboratory to send messages, the personal computer can replace the personal computer to enter the high-temperature laboratory to execute the task of sending ping messages.
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 of the vehicle-mounted tested piece ECU is judged to be normal in function; 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 cannot be separated from a personal computer, and the invention can be separated from the connection of the personal computer to test together with a tested piece.
S5, setting a plurality of vehicle-mounted Ethernet gateway interfaces into a loop through a virtual local area network, and determining interface states of all vehicle-mounted Ethernet gateways through detecting data receiving conditions; it can be understood that, because the vehicle-mounted gateway has a plurality of interfaces, in the test process, a plurality of ECUs need to be connected to reach all interfaces for testing, and the data loop back can be controlled through VLAN (virtual local area network) technology, so that the multi-interface test of the vehicle-mounted Ethernet gateway is completed.
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 set as a group, 6 VLANs are set in total, and other ECU (electronic control unit) tests are pushed in this way; transmitting the detection data from the data inlet of the loop, and receiving the detection data from the data outlet of the loop; if the data outlet successfully receives the detection data, judging that all the vehicle-mounted Ethernet interfaces are 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. All interfaces are traversed through 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, a request message is sent to the vehicle-mounted tested piece ECU, and the DoIP function state of the vehicle-mounted tested piece ECU is determined; it can be understood that the local machine can be used as a DoIP Client to send a DoIP request message through simulation, if the tested piece replies, the DoIP function of the tested piece is considered to work normally, if the tested piece does not reply, the tested piece is considered to have no DoIP function, wherein the DoIP refers to diagnosis of the vehicle-mounted ECU through Ethernet.
In the specific embodiment, a request message is sent to the 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 recover, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal.
And S7, determining whether the vehicle has the vehicle-mounted Ethernet basic function according to the received Ethernet cable state, ethernet protocol stack functional state, interface state of the vehicle-mounted Ethernet gateway and DoIP functional state of the vehicle-mounted tested ECU. It will be appreciated that the on-board ethernet basic functions are integrated and tested on the same device (steps S1-S6 above), specifically including cable connectivity, interface mode, ICMP, TCPIP, doIP functional testing, and the testing is performed sequentially. Only if these tests 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, determining that the vehicle-mounted ethernet basic function is provided;
if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected or any one of 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 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 configured to implement a method for testing an on-board ethernet network, including: a microcontroller module and a routing module connected to 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 tested vehicle-mounted ECU and the connection state of the tested vehicle-mounted piece ECU; the interface states of all the vehicle-mounted Ethernet gateways are determined by detecting the receiving condition of the data; the method comprises the steps of determining the functional state of an Ethernet protocol stack of a vehicle-mounted tested piece ECU, and sending a message to the vehicle-mounted tested piece ECU; sending a request message to the vehicle-mounted tested piece ECU, and determining the DoIP function 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 computer terminal is communicated with the vehicle-mounted tested piece ECU through the vehicle-mounted Ethernet interface switching industrial Ethernet interface;
the routing module is also 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 vehicle-mounted Ethernet basic function according to the received Ethernet cable state, ethernet protocol stack functional state, interface state of the vehicle-mounted Ethernet gateway and DoIP functional state of the vehicle-mounted tested ECU.
In a specific embodiment, the microcontroller module is further configured to set an ethernet mode of the test vehicle-mounted ECU as a main device mode;
detecting and testing whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU, if so, judging that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode; if the test vehicle-mounted ECU is not connected, setting an Ethernet mode of the test vehicle-mounted ECU as a slave device mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not again; if the vehicle-mounted tested piece ECU is connected, judging that an Ethernet mode of the vehicle-mounted tested piece ECU is a main equipment mode; if the vehicle-mounted tested piece ECU is not connected, judging that the vehicle-mounted tested piece ECU does not work normally; and outputting a test result;
the system is also used for sending a message to the vehicle-mounted tested piece ECU, and judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is normal in function if the vehicle-mounted tested piece ECU returns a data packet; 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;
the system is also used for acquiring whether the data outlet successfully receives the detection data or not, and if the data outlet successfully receives the detection data, judging that all the vehicle-mounted Ethernet interfaces are 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 vehicle-mounted tested piece ECU 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 DoIP function of the vehicle-mounted tested piece ECU is judged to be 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;
the method comprises the steps that an Ethernet cable state, an Ethernet protocol stack functional state, an interface state of a vehicle-mounted Ethernet gateway and a DoIP functional state of the vehicle-mounted tested ECU are received, and if the Ethernet cable state of the vehicle-mounted tested 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 ECU are all normal, the vehicle-mounted Ethernet basic function is judged to be provided;
if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected or any one of 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 is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
The routing module is further specifically configured to obtain an ethernet cable connection state; if the connection state of the Ethernet cable is connection, judging that the Ethernet cable is complete; if the connection state of the Ethernet cable is unconnected, judging that the Ethernet cable is disconnected;
the system comprises a vehicle-mounted Ethernet gateway interface, a plurality of groups of vehicle-mounted Ethernet gateway interfaces, a plurality of virtual local area networks and a plurality of network-mounted Ethernet gateway interfaces, wherein the vehicle-mounted Ethernet gateway interfaces are arranged as a group of communicated virtual local area networks;
the detection data is sent from the data entry of the loop and received by the data exit of the loop.
In summary, the embodiment of the invention has the following beneficial effects:
according to the method and the device for testing the vehicle-mounted Ethernet, disclosed by the invention, the test can be realized through software on the basis of 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, so that the workload of a tester is reduced, the testing steps are simplified, the knowledge requirement of the tester is reduced, and the operation is simple. Quick positioning in development, elimination of Ethernet mode setting problem (master/slave mode), VLAN setting problem (setting port sends data packet with VLAN information), TCPIP protocol stack problem (ping echo 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.
The foregoing disclosure is illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (10)

1. A method of testing a vehicle-mounted ethernet network, comprising the steps of:
step S1, determining an Ethernet mode of the vehicle-mounted tested piece ECU according to the Ethernet mode of the tested vehicle-mounted ECU and the connection state of the tested vehicle-mounted 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 piece ECU;
step S4, a message is sent to the vehicle-mounted tested piece ECU, and the Ethernet protocol stack functional state of the vehicle-mounted tested piece ECU is determined;
s5, setting a plurality of vehicle-mounted Ethernet gateway interfaces into a loop through a virtual local area network, and determining interface states of all vehicle-mounted Ethernet gateways through detecting data receiving conditions;
step S6, a request message is sent to the vehicle-mounted tested piece ECU, and the DoIP function state of the vehicle-mounted tested piece ECU is determined;
and S7, determining whether the vehicle has the vehicle-mounted Ethernet basic function according to the received integrity of the Ethernet cable 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.
2. The method according to claim 1, wherein in step S1, the determining the ethernet mode of the vehicle-mounted ECU specifically includes:
setting an Ethernet mode of a test vehicle-mounted ECU as a main equipment mode;
detecting and testing whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU, if so, judging that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode; if the test vehicle-mounted ECU is not connected, setting an Ethernet mode of the test vehicle-mounted ECU as a slave device mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not again; if the vehicle-mounted tested piece ECU is connected, judging that an Ethernet mode of the vehicle-mounted tested piece ECU is a main equipment mode; if the vehicle-mounted tested piece ECU is not connected, judging that the vehicle-mounted tested piece ECU 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 state 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; if the Ethernet cable connection state is unconnected, the Ethernet cable is determined to be disconnected.
4. The method of claim 3, wherein in step S4, the determining the ethernet protocol stack function status of the vehicle-mounted measurand ECU specifically includes:
sending a message to the vehicle-mounted tested piece ECU, and if the vehicle-mounted tested piece ECU returns a data packet, judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is normal in function; 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 interface states of all the on-board ethernet gateways specifically includes:
setting adjacent vehicle-mounted Ethernet gateway interfaces as 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;
transmitting the detection data from the data inlet of the loop, and receiving the detection data from the data outlet of the loop;
if the data outlet successfully receives the detection data, judging that all the vehicle-mounted Ethernet interfaces are 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.
6. The method according to claim 4, wherein in step S6, the determining the DoIP function status of the vehicle-mounted ECU specifically includes:
sending a request message to the vehicle-mounted tested piece ECU, and judging that the DoIP function of the vehicle-mounted tested piece ECU is normal if the vehicle-mounted tested piece ECU replies; and if the vehicle-mounted tested piece ECU does not recover, judging that the DoIP function of the vehicle-mounted tested piece ECU is abnormal.
7. The method according to claim 6, wherein in step S7, the determining whether the vehicle has an on-board ethernet basic function specifically includes:
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, judging that the vehicle-mounted Ethernet basic function is provided;
if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected or any one of 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 is abnormal, judging that the vehicle-mounted Ethernet basic function is not provided.
8. An apparatus for testing an ethernet network on board a vehicle for implementing the method of any of claims 1-7, comprising: a microcontroller module and a routing module connected to 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 vehicle-mounted tested piece ECU; the interface states of all the vehicle-mounted Ethernet gateways are determined by detecting the receiving condition of the data; the method comprises the steps of determining the functional state of an Ethernet protocol stack of a vehicle-mounted tested piece ECU, and sending a message to the vehicle-mounted tested piece ECU; sending a request message to the vehicle-mounted tested piece ECU, and determining the DoIP function 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 computer terminal is communicated with the vehicle-mounted tested piece ECU through the vehicle-mounted Ethernet interface switching industrial Ethernet interface;
the routing module is also 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 vehicle-mounted Ethernet basic function according to the received Ethernet cable state, ethernet protocol stack functional state, interface state of the vehicle-mounted Ethernet gateway and DoIP functional state of the vehicle-mounted tested ECU.
9. The apparatus of claim 8, wherein the microcontroller module is further configured to set an ethernet mode of the test vehicle ECU to a master mode;
detecting and testing whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU, if so, judging that the Ethernet mode of the vehicle-mounted tested piece ECU is a slave device mode; if the test vehicle-mounted ECU is not connected, setting an Ethernet mode of the test vehicle-mounted ECU as a slave device mode;
detecting whether the vehicle-mounted ECU is connected with the vehicle-mounted tested piece ECU or not again; if the vehicle-mounted tested piece ECU is connected, judging that an Ethernet mode of the vehicle-mounted tested piece ECU is a main equipment mode; if the vehicle-mounted tested piece ECU is not connected, judging that the vehicle-mounted tested piece ECU does not work normally; and outputting a test result;
the system is also used for sending a message to the vehicle-mounted tested piece ECU, and judging that the Ethernet protocol stack of the vehicle-mounted tested piece ECU is normal in function if the vehicle-mounted tested piece ECU returns a data packet; 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;
the system is also used for acquiring whether the data outlet successfully receives the detection data or not, and if the data outlet successfully receives the detection data, judging that all the vehicle-mounted Ethernet interfaces are 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 vehicle-mounted tested piece ECU 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 DoIP function of the vehicle-mounted tested piece ECU is judged to be 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;
the method comprises the steps that an Ethernet cable state, an Ethernet protocol stack functional state, an interface state of a vehicle-mounted Ethernet gateway and a DoIP functional state of the vehicle-mounted tested ECU are received, and if the Ethernet cable state of the vehicle-mounted tested 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 ECU are all normal, the vehicle-mounted Ethernet basic function is judged to be provided;
if the Ethernet cable state of the vehicle-mounted tested piece ECU is disconnected or any one of 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 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 connection state of the Ethernet cable is unconnected, judging that the Ethernet cable is disconnected;
the system comprises a vehicle-mounted Ethernet gateway interface, a plurality of groups of vehicle-mounted Ethernet gateway interfaces, a plurality of virtual local area networks and a plurality of network-mounted Ethernet gateway interfaces, wherein the vehicle-mounted Ethernet gateway interfaces are arranged as a group of communicated virtual local area networks;
the detection data is sent from the data entry of the loop and received by the data exit 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 CN115129021A (en) 2022-09-30
CN115129021B true 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)

Families Citing this family (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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107765676A (en) * 2017-11-01 2018-03-06 河北工业大学 A kind of onboard diagnostic system and its method based on Ethernet
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101630729B1 (en) * 2015-04-16 2016-06-24 현대자동차주식회사 Method and System for Providing Optimized Ethernet Communication for vehicle
KR102309438B1 (en) * 2017-06-23 2021-10-07 현대자동차주식회사 Vehicle Test System, Vehicle and Control Method Thereof
KR102320043B1 (en) * 2017-09-13 2021-11-01 현대자동차주식회사 Failure diagnosis apparatus and method for in-vehicle control unit

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN115129021A (en) 2022-09-30

Similar Documents

Publication Publication Date Title
CN107995068B (en) Network port testing method, equipment and computer readable storage medium
CN111786855B (en) Network card pressure testing method and device, electronic equipment and storage medium
CN112055096B (en) Method and device for automatically setting communication address of equipment
CN103138988B (en) Positioning treatment method and positioning treatment device of network faults
CN104865948A (en) Automatic vehicle controller diagnosing device and method
CN104568459A (en) OBD intelligent device, test method and system thereof, and ECU simulator
CN115129021B (en) Method and device for testing vehicle-mounted Ethernet
CN109031005B (en) Distributed relay protection device testing method and relay protection tester
CN109471763B (en) Method, device, equipment and system for grabbing trace of NVME (network video management entity) hard disk
US10613963B2 (en) Intelligent packet analyzer circuits, systems, and methods
CN110708715A (en) Service fault finding method and device for 5G base station
CN101800672A (en) Equipment detection method and equipment
CN111142504B (en) Bus detection device and method
CN110968004B (en) Cable test system based on FPGA prototype verification development board
CN101252477A (en) Determining method and analyzing apparatus of network fault root
CN116962184A (en) Method, system, terminal and medium for automatically deploying RoCE cluster
CN216391061U (en) Gigabit vehicle-mounted Ethernet testing device and system
CN112148537A (en) Bus monitoring device and method, storage medium, and electronic device
CN106021056B (en) A kind of Arinc429 communication chips Auto-Test System and test method
CN112034296B (en) Avionics fault injection system and method
CN111092788B (en) Switch test system
Kocić et al. A novel solution for an ECU simulator as a key component for automated testing and verification of a vehicle diagnostic device
CN109981394B (en) Communication method and device based on enhanced CAN bus protocol analyzer
CN113341938B (en) Automobile controller testing system and control method thereof
CN113009246A (en) PSE equipment detection device and PSE equipment detection method

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