DoIP gateway architecture under AUTOSAR CP architecture, communication method of DoIP gateway architecture and vehicle
By designing a DoIP gateway under the AUTOSAR CP architecture to achieve the conversion between UDSonDoIP and UDSonDoCAN, the problems of interoperability and high-bandwidth transmission between external Testers and vehicle nodes are solved, improving data transmission efficiency and compatibility, and ensuring security.
Patent Information
- Application Number
- CN202511559357.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2025-12-23
AI Technical Summary
The existing AUTOSAR CP architecture lacks interoperability between external testers and other DoIP nodes in the vehicle, and traditional protocols struggle to support high-bandwidth, fast, and reliable data transmission and compatibility with older CAN devices.
Design a DoIP gateway under the AUTOSAR CP architecture, including an Ethernet protocol stack, a DoIP-Server module, a DoIP-Client module, and a PduR module, to implement the functions of UDSonDoIP to UDSonDoIP and UDSonDoCAN to UDSonDoIP. The DoIP gateway connects the Tester end and the DoIP node, and uses the Ethernet and CAN protocol stacks for data conversion and routing management.
It improves data transmission efficiency in high-bandwidth Ethernet diagnostic communication, isolates the external tester from the in-vehicle nodes, provides good security, and is compatible with older CAN diagnostic equipment, meeting the vehicle's compatibility upgrade requirements.
Smart Images

Figure CN121193565A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle communication. Specifically, this invention relates to a DoIP gateway architecture under the AUTOSAR CP architecture, its communication method, and a vehicle. Background Technology
[0002] As automotive electronic architecture continues to evolve towards domain-centralized and central computing platforms, traditional diagnostic technologies based on CAN / LIN buses are gradually becoming inadequate. High-computing-power modules such as intelligent driving and vehicle-to-everything (V2X) systems generate massive amounts of data, including data from cameras and OTA firmware packages, leading to increasingly higher bandwidth requirements for data transmission. Furthermore, driven by Software-Defined Vehicles (SDV), continuous FOTA (Firmware Over-The-Air) and big data diagnostics are needed throughout the entire lifecycle, making it difficult for traditional protocols to support fast, efficient, and reliable data updates.
[0003] Under the existing AUTOSAR CP architecture, the application of the Ethernet-based diagnostic communication protocol (DoIP) only enables communication between the AUTOSAR CP architecture and external testers, lacking interoperability between external testers and other DoIP nodes in the vehicle. Furthermore, when using high-bandwidth Ethernet for vehicle-wide diagnostic communication, there is a lack of compatibility with older CAN diagnostic equipment.
[0004] Therefore, this invention proposes a DoIP gateway architecture under the AUTOSAR CP architecture, its communication method, and a vehicle. Summary of the Invention
[0005] This invention aims to overcome the shortcomings of the prior art and proposes a DoIP gateway architecture under the AUTOSAR CP architecture, as well as its communication method and vehicle, to achieve the following objectives: under the AUTOSAR CP architecture, to realize UDSonDoIP to UDSonDoIP conversion, and further to realize the function of UDSonDoCAN to UDSonDoIP conversion.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: a DoIP gateway architecture under the AUTOSAR CP architecture, wherein the DoIP gateway is connected between the Tester end and the DoIP node, and the DoIP gateway includes an Ethernet protocol stack, a DoIP-Server module, a DoIP-Client module, and a PduR module, wherein the Tester end is connected to the DoIP-Server module through the Ethernet protocol stack, the DoIP-Server module is connected to the DoIP-Client module through the PduR module, and the DoIP-Client module is then connected to the DoIP node through the Ethernet protocol stack.
[0007] Preferably, the Ethernet protocol stack includes a SoAd unit, a TCP / IP unit, an EthIf unit, and an Eth unit connected in sequence. The SoAd unit is connected to the DoIP-Server module and / or the DoIP-Client module; the Eth unit is connected to the Tester end and / or the DoIP node.
[0008] Preferably, based on the DoIP gateway architecture, one communication link used for UDSonDoIP to UDSonDoIP diagnostic communication is: Tester→Eth→EthIf→TCP / IP→SoAd→DoIP-Server→PduR→DoIP-Client→SoAd→TCP / IP→EthIf→Eth→DoIP node.
[0009] Preferably, the DoIP gateway further includes a CAN protocol stack, and the Tester end is connected to the PduR module through the CAN protocol stack.
[0010] Preferably, the CAN protocol stack includes a CANTP unit, a CANIf unit, and a CAN unit, wherein the CANTP unit is connected to the PduR module; and the CAN unit is connected to the Tester terminal.
[0011] Preferably, based on the DoIP gateway architecture, one communication link used for UDSonDoCAN to UDSonDoIP diagnostic communication is: Tester→Can→CanIf→CanTP→PduR→DoIP-Client→SoAd→TCP / IP→EthIf→Eth→DoIP node.
[0012] This application also proposes a communication method for a DoIP gateway under the AUTOSAR CP architecture, specifically for UDSonDoIP to UDSonDoIP diagnostic communication. The method includes: The Tester sends a route activation request to the DoIP-Server via the Ethernet protocol stack. The route activation request contains a destination address TA, which points to a lower-level DoIP node. DoIP-Server receives and parses the route activation request, and after establishing a TCP connection with the lower-level DoIP node by calling DoIP-Client, it forwards the route activation request to the lower-level DoIP node through DoIP-Client; After receiving the route activation request and completing the activation, the lower-level DoIP node returns a route activation response to the DoIP-Client. The DoIP-Client receives the response and forwards it to the DoIP-Server. Finally, the DoIP-Server returns the route activation response to the Tester via the original path. The Tester sends a UDS diagnostic message to the DoIP-Server via the Ethernet protocol stack. The DoIP-Server forwards the UDS diagnostic message to the PduR module based on the [SA, TA] address pair in the message. PduR forwards the UDS diagnostic message to the DoIP-Client module according to the routing table; The DoIP-Client module encapsulates UDS diagnostic messages into DoIP packets and forwards them to lower-level DoIP nodes.
[0013] This application also proposes a communication method for a DoIP gateway under the AUTOSAR CP architecture, specifically for UDSonDoCAN to UDSonDoIP diagnostic communication, the method comprising: The Tester sends a UDS diagnostic message to the PduR module via the CAN protocol stack. The PduR module forwards the UDS diagnostic message to the DoIP-Client module according to the routing table; DoIP-Client constructs a route activation request and sends it to the lower-level DoIP node; After receiving the route activation request and completing the activation, the lower-level DoIP node returns a route activation response to the DoIP-Client. Upon receiving the response, the DoIP-Client encapsulates the UDS diagnostic message into a DoIP packet and forwards it to the lower-level DoIP node.
[0014] This application also proposes a vehicle that includes the DoIP gateway architecture under the aforementioned AUTOSAR CP architecture.
[0015] The technical effects of this invention are as follows: The implementation of the DoIP-Client module in this invention enables UDSonDoIP to UDSonDoIP conversion in high-bandwidth Ethernet-based diagnostic communication within the vehicle. In this scenario, the downstream nodes of the DoIP gateway implement Ethernet-based diagnostic communication, significantly improving data transmission efficiency compared to traditional CAN diagnostics. Furthermore, the external tester only needs to communicate with the DoIP gateway for DoIP diagnostics and is isolated from other nodes within the vehicle, thus isolating the in-vehicle network from the external network and providing excellent security. Secondly, the DoIP-Client module can also enable UDSonDoCAN to UDSonDoIP conversion after the vehicle is upgraded to high-speed Ethernet diagnostic communication. It is backward compatible with some older CAN diagnostic devices where the tester only supports CAN communication, while some in-vehicle nodes only support Ethernet diagnostics. In such cases, the gateway node must implement the DoIP-Client module's functionality to meet the vehicle's compatibility upgrade requirements. Attached Figure Description
[0016] Figure 1 This is a diagram of the UDSonDoIP to UDSonDoIP architecture provided by the present invention; Figure 2 This is a diagram of the UDSonDoCAN to UDSonDoIP architecture provided by the present invention. Detailed Implementation
[0017] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. This is to help those skilled in the art to have a more complete, accurate, and in-depth understanding of the inventive concept and technical solutions of the present invention, and to facilitate its implementation. It should be noted that the terms "first," "second," etc., used in this application are only for the convenience of describing the technical solutions and to distinguish components; the corresponding component configurations may be the same or different, and are not intended to limit the scope of this application. To make the technical solutions of the present invention clearer, the present invention will be explained and illustrated through the following embodiments. Example
[0018] This embodiment provides a DoIP gateway architecture under the AUTOSAR CP architecture. The DoIP gateway is connected between the Tester and the DoIP node. The DoIP gateway includes an Ethernet protocol stack, a DoIP-Server module, a DoIP-Client module, and a PduR module. The Tester is connected to the DoIP-Server module through the Ethernet protocol stack. The DoIP-Server module is connected to the DoIP-Client module through the PduR module. The DoIP-Client module is then connected to the DoIP node through the Ethernet protocol stack.
[0019] The DoIP-Server module is implemented according to the AUTOSAR CP standard and is used to complete communication with external Testers or upstream gateway nodes. The DoIP-Client module is compatible with the existing AUTOSAR CP standard and enables DoIP communication between the DoIP gateway and the next-level DoIP node. The DoIP-Server module and the DoIP-Client module are interconnected.
[0020] The Ethernet protocol stack in this embodiment includes a SoAd unit, a TCP / IP unit, an EthIf unit, and an Eth unit connected in sequence. The SoAd unit is connected to the DoIP-Server module and / or the DoIP-Client module; the Eth unit is connected to the Tester end and / or the DoIP node. The SoAd unit is a socket adapter used to adapt AUTOSAR communication methods (such as Pdu) to the standard TCP / IP socket programming interface. It allows the DoIP-Server module and the DoIP-Client module to use network programming (such as establishing connections, listening on ports, and sending data) like on a regular computer, without needing to concern themselves with the specific implementation of the underlying TCP / IP stack. The TCP / IP unit, or TCP / IP stack, provides implementations of network protocols such as TCP, UDP, IP, and ICMP, and is responsible for packet routing, addressing, and reliable transmission. The EthIf unit, or Ethernet interface, provides a unified interface for the upper-layer TCP / IP unit and manages multiple Ethernet ports. The Eth unit, or Ethernet driver unit, is responsible for sending and receiving Ethernet data frames.
[0021] like Figure 1 As shown, based on the above DoIP gateway architecture, this embodiment constructs a communication link for UDSonDoIP to UDSonDoIP diagnostic communication, enabling the vehicle to deploy high-bandwidth Ethernet-based diagnostic communication in a safer and more standardized manner. The UDSonDoIP to UDSonDoIP diagnostic communication link is as follows: Tester→Eth→EthIf→TCP / IP→SoAd→DoIP-Server→PduR→DoIP-Client→SoAd→TCP / IP→EthIf→Eth→DoIP node.
[0022] Correspondingly, this embodiment proposes a communication method for a DoIP gateway under the AUTOSAR CP architecture. Using the aforementioned DoIP gateway architecture under the AUTOSAR CP architecture, the method includes: The Tester sends a route activation request to the DoIP-Server via the Ethernet protocol stack. The route activation request contains a destination address TA, which points to a lower-level DoIP node. DoIP-Server receives and parses the route activation request. DoIP-Server can achieve data communication between DoIP-Server and DoIP-Client by calling the standard interface provided by the DoIP-Client module, thereby forwarding the route activation request to the DoIP-Client module. After receiving the route activation request, DoIP-Client establishes a TCP connection with the lower-level DoIP node, thereby forwarding the route activation request to the lower-level DoIP node through DoIP-Client. After receiving the route activation request and completing the activation, the lower-level DoIP node returns a route activation response to the DoIP-Client. The DoIP-Client receives the response and forwards it to the DoIP-Server. Finally, the DoIP-Server returns the route activation response to the Tester via the original path. The Tester sends a UDS diagnostic message to the DoIP-Server via the Ethernet protocol stack. The DoIP-Server forwards the UDS diagnostic message to the PduR module based on the [SA, TA] address pair in the message. PduR forwards the UDS diagnostic message to the DoIP-Client module according to the routing table; The DoIP-Client module encapsulates UDS diagnostic messages into DoIP packets and forwards them to lower-level DoIP nodes.
[0023] For the UDS diagnostic response message from the next-level DoIP node, the DoIP Client module receives it and forwards it to PduR according to [SA,TA] in the message; PduR forwards it to the DoIP Server module according to the routing table, and then sends it to Tester. Example
[0024] The difference between Example 2 and Example 1 is that the DoIP gateway also includes a CAN protocol stack, and the Tester can also connect to the PduR module through the CAN protocol stack.
[0025] The CAN protocol stack includes a CanTP unit, a CanIf unit, and a CAN unit. The CanTP unit is connected to the PduR module; the CAN unit is connected to the Tester terminal. The CanTP unit, or CAN transmission protocol, is used for CAN data transmission. The CanIf unit, or CAN interface, provides a unified interface for the upper-layer CanTP unit, shielding the differences between different CAN controller hardware. The CAN unit, or CAN driver unit, is responsible for handling the actual sending and receiving of CAN messages.
[0026] like Figure 2 As shown, based on the DoIP gateway architecture described above, Embodiment 2 constructs a communication link for UDSonDoCAN to UDSonDoIP diagnostic communication, enabling backward compatibility with older CAN diagnostic devices even after the vehicle is upgraded to Ethernet diagnostic communication. The UDSonDoCAN to UDSonDoIP diagnostic communication link is as follows: Tester→Can→CanIf→CanTP→PduR→DoIP-Client→SoAd→TCP / IP→EthIf→Eth→DoIP node.
[0027] Correspondingly, this embodiment provides a communication method for a DoIP gateway under the AUTOSAR CP architecture, the method including: The Tester sends a UDS diagnostic message to the PduR module via the CAN protocol stack. The PduR module forwards the UDS diagnostic message to the DoIP-Client module according to the routing table; Depending on the different data transmission methods of the CAN bus and Ethernet, the PduR module will identify the source of the UDS diagnostic message when forwarding it, namely the CAN bus and Ethernet data. Thus, the DoIP-Client can identify that the UDS diagnostic message is sent from the CAN bus. When it is detected that the UDS diagnostic message is sent from the CAN bus, the DoIP-Client constructs a route activation request and sends it to the lower-level DoIP node. After receiving the route activation request and completing the activation, the lower-level DoIP node returns a route activation response to the DoIP-Client. Upon receiving the response, the DoIP-Client encapsulates the UDS diagnostic message into a DoIP packet and forwards it to the lower-level DoIP node.
[0028] For the UDS diagnostic response message from the next-level DoIP node, the DoIP Client module receives it and forwards it to PduR according to [SA,TA] in the message; PduR forwards it to the CanTP module according to the routing table, and then sends it to Tester.
[0029] The present invention also provides a vehicle comprising a DoIP gateway architecture under any of the AUTOSAR CP architectures described in the above embodiments.
[0030] The implementation of the DoIP-Client module in this invention enables the UDSonDoIP to UDSonDoIP conversion application scenario shown in Example 1 within the vehicle's high-bandwidth Ethernet-based diagnostic communication. In this scenario, the downstream nodes of the DoIP gateway implement Ethernet-based diagnostic communication, significantly improving data transmission efficiency compared to traditional CAN diagnostics. Furthermore, the external Tester only needs to communicate with the DoIP gateway for DoIP diagnostics and is isolated from other nodes within the vehicle, thus isolating the in-vehicle network from the external network and providing excellent security. Secondly, the DoIP-Client module allows for backward compatibility with older CAN diagnostic devices after the vehicle is upgraded to high-speed Ethernet diagnostic communication. For example, in Example 2, the Tester only supports CAN communication, while some in-vehicle nodes only support Ethernet diagnostics. Therefore, the gateway node must implement the DoIP-Client module's functionality to meet the vehicle's compatibility upgrade requirements.
[0031] In this invention, the DoIP-Client module explicitly defines when to establish a TCP connection with the next-level DoIP node. Specifically, in Embodiment 1, the DoIP-Client module establishes a TCP connection when forwarding a route activation request; in Embodiment 2, the DoIP-Client module establishes a TCP connection after receiving a UDS diagnostic message from the PduR route. The advantages are: connection establishment is on demand, avoiding resource waste; it conforms to the DoIP protocol standard process, laying a solid foundation for interoperability between ECUs from different vehicle suppliers; and the DoIP Client module can correctly process and maintain the DoIP communication state for route activation response messages from the next-level node.
[0032] In this invention, the DoIP-Client module still follows the layered architecture of AUTOSAR, only implementing the behavior of DoIP-Client; all routing is still handled by PduR. Figure 1 As shown, routing between DoIP-Server and DoIP-SClient is handled by PduR; similarly, as... Figure 2 As shown, routing between CanTP and DoIP-Client is also handled by PduR. Thus, each module in the AUTOSAR CP standard performs its specific function, exhibiting good portability and scalability.
[0033] The present invention has been described above by way of example with reference to the accompanying drawings. Obviously, the specific implementation of the present invention is not limited to the above-described manner. Any non-substantial improvements made using the inventive concept and technical solution; or the direct application of the inventive concept and technical solution to other situations without modification, are all within the protection scope of the present invention.
Claims
1. A DoIP gateway architecture under an AUTOSAR CP architecture, characterized in that: The DoIP gateway is connected between the Tester and the DoIP node. The DoIP gateway includes an Ethernet protocol stack, a DoIP-Server module, a DoIP-Client module, and a PduR module. The Tester is connected to the DoIP-Server module through the Ethernet protocol stack. The DoIP-Server module is connected to the DoIP-Client module through the PduR module. The DoIP-Client module is then connected to the DoIP node through the Ethernet protocol stack.
2. The DoIP gateway architecture under the AUTOSAR CP architecture according to claim 1, characterized in that: The Ethernet protocol stack includes a SoAd unit, a TCP / IP unit, an EthIf unit, and an Eth unit connected in sequence. The SoAd unit is connected to the DoIP-Server module and / or the DoIP-Client module; the Eth unit is connected to the Tester end and / or the DoIP node.
3. The DoIP gateway architecture under the AUTOSAR CP architecture according to claim 2, characterized in that: Based on the DoIP gateway architecture, one communication link used for UDSonDoIP to UDSonDoIP diagnostic communication is: Tester→Eth→EthIf→TCP / IP→SoAd→DoIP-Server→PduR→DoIP-Client→SoAd→TCP / IP→EthIf→Eth→DoIP node.
4. A DoIP gateway architecture under an AUTOSAR CP architecture according to any one of claims 1-3, characterized in that: The DoIP gateway also includes a CAN protocol stack, and the Tester end connects to the PduR module through the CAN protocol stack.
5. The DoIP gateway architecture under the AUTOSAR CP architecture according to claim 4, characterized in that: The CAN protocol stack includes a CANTP unit, a CANIf unit, and a CAN unit. The CANTP unit is connected to the PduR module; the CAN unit is connected to the Tester terminal.
6. The DoIP gateway architecture under the AUTOSAR CP architecture according to claim 5, characterized in that: Based on the DoIP gateway architecture, one communication link for UDSonDoCAN to UDSonDoIP diagnostic communication is as follows: Tester→Can→CanIf→CanTP→PduR→DoIP-Client→SoAd→TCP / IP→EthIf→Eth→DoIP node.
7. A communication method for a DoIP gateway under an AUTOSAR CP architecture, using a DoIP gateway architecture under an AUTOSAR CP architecture according to any one of claims 1-6, characterized in that: For UDSonDoIP to UDSonDoIP diagnostic communication, the method includes: The Tester sends a route activation request to the DoIP-Server via the Ethernet protocol stack. The route activation request contains a destination address TA, which points to a lower-level DoIP node. DoIP-Server receives and parses the route activation request, and after establishing a TCP connection with the lower-level DoIP node by calling DoIP-Client, it forwards the route activation request to the lower-level DoIP node through DoIP-Client; After receiving the route activation request and completing the activation, the lower-level DoIP node returns a route activation response to the DoIP-Client. The DoIP-Client receives the response and forwards it to the DoIP-Server. Finally, the DoIP-Server returns the route activation response to the Tester via the original path. The Tester sends a UDS diagnostic message to the DoIP-Server via the Ethernet protocol stack. The DoIP-Server forwards the UDS diagnostic message to the PduR module based on the [SA, TA] address pair in the message. PduR forwards the UDS diagnostic message to the DoIP-Client module according to the routing table; The DoIP-Client module encapsulates UDS diagnostic messages into DoIP packets and forwards them to lower-level DoIP nodes.
8. A communication method for a DoIP gateway under an AUTOSAR CP architecture, using a DoIP gateway architecture under an AUTOSAR CP architecture according to any one of claims 1-6, characterized in that: For UDSonDoCAN to UDSonDoIP diagnostic communication, the method includes: The Tester sends a UDS diagnostic message to the PduR module via the CAN protocol stack. The PduR module forwards the UDS diagnostic message to the DoIP-Client module according to the routing table; DoIP-Client constructs a route activation request and sends it to the lower-level DoIP node; After receiving the route activation request and completing the activation, the lower-level DoIP node returns a route activation response to the DoIP-Client. Upon receiving the response, the DoIP-Client encapsulates the UDS diagnostic message into a DoIP packet and forwards it to the lower-level DoIP node.
9. A vehicle, characterized in that: The vehicle includes a DoIP gateway architecture under an AUTOSARCP architecture as described in any one of claims 1-6.
