SEARCH

— 葡萄酒 | 威士忌 | 白兰地 | 啤酒 —

Automotive Ethernet – DoIP

1. What Can DoIP Do?f2adf6936e9aef84fef6d1065dde7eee

Ethernet was first introduced into vehicles by BMW, with its application scenario being flashing/programming, to meet software data updates for components like LCD instrument clusters. Compared to traditional automotive diagnostics, DoIP refers to the transmission of UDS protocol data through Ethernet communication, i.e., Diagnostic communication over Internet Protocol. It is itself a protocol, standardized in ISO13400.Because DoIP can transmit large amounts of data with fast response speeds and can perform remote diagnostics through Ethernet, DoIP has become the inevitable trend for automotive diagnostics.Compared to traditional automotive systems, current automotive system frameworks all incorporate a DoIP protocol layer above TCP/IP. To better support OBD diagnostics, remote diagnostics, FOTA and other technologies, the overall automotive architecture has been adjusted, using switches to connect MPUs, MCUs, and other Ethernet ECUs through Ethernet, while isolating external and internal networks.

2. DoIP Protocol Composition

This protocol operates above TCP/IP. To receive DoIP protocol messages, the protocol specification requires listening to a dedicated port number 13400 allocated for the DoIP protocol stack. Both UDP and TCP must listen to this receiving port, while the sending port is a random value within the range [49152~65535].Protocol Format:DoIP messages consist of header (8 bytes) + payload (N bytes)Protocol Header [8 bytes] comprises four fields:

  • Protocol version [1 byte]
  • Inverse protocol version [1 byte]
  • Payload type [2 bytes]
  • Payload length [4 bytes]

Payload [N bytes] – The payload data varies according to the actual payload type.Typically, Protocol version is 0x02, with values above 0x02 currently in reserved status.Inverse protocol version is the inverted value of Protocol version; in this example, 0x02 inverted becomes 0xFD.The protocol specification specifically mentions that Protocol version can be 0xFF. This value serves the purpose of allowing clients and servers with mismatched protocol versions to bypass the case where requests are rejected due to protocol header version mismatch.

Payload Type:

Payload type represents the functions that the DoIP protocol stack can support.

Payload Type Value Name Protocol
0x0000 Generic DoIP header negative acknowledgment TCP/UDP
0x0001 Vehicle identification request message UDP
0x0002 Vehicle identification request message with EID UDP
0x0003 Vehicle identification request message with VIN UDP
0x0004 Vehicle announcement message / Vehicle identification response message UDP_Discovery / UDP_test_request
0x0005 Routing activation request TCP
0x0006 Routing activation response TCP
0x0007 Alive check request TCP
0x0008 Alive check response TCP
0x4001 DoIP entity status request UDP
0x4003 Diagnostic power mode information request UDP
0x8001 Diagnostic message TCP
0x8002 Diagnostic message positive acknowledgment TCP
0x8003 Diagnostic message negative acknowledgment TCP

Payload length allocates 4 bytes here, meaning DoIP messages can transmit a maximum of 4GB (0xFFFFFFFF).

Two Methods of Vehicle Discovery:

(1) After DoIP device startup, it first broadcasts a DoIP message (vehicle announcement message, Payload Type 0x0004) via UDP to all other nodes on the network, including diagnostic tools, with destination port 13400. This message carries information about the DoIP device’s DoIP version, VIN, logical address, etc. This message is sent three times, and diagnostic tools previously listening on port 13400 receive this information and learn the basic information of the DoIP device.(2) If the diagnostic tool doesn’t receive it, there’s another method: the diagnostic tool actively requests by broadcasting a DoIP request message (Payload Type 0x0001) via UDP with destination port 13400. The DoIP device, which has been listening on port 13400 since startup, receives this message and replies with a response carrying its own information to the diagnostic tool.

 

The prev: The next:

Related recommendations

Expand more!

Mo