Automotive Technologies
Automotive Domain:
1. ECU (Electronic Control Unit)
A small computer found in vehicles. Controls specific functions: engine, brakes, infotainment, diagnostics, etc. Communicates with other ECUs or diagnostic tools using protocols like UDS.
2. TLS (Transport Layer Security)
A cryptographic protocol used to secure communication over a network. Ensures data encryption, integrity, and authentication. TLS is what powers HTTPS in your browser — the secure version of HTTP. In automotive diagnostics, TLS can be used to secure UDS over DoIP (i.e., encrypted diagnostic communication over Ethernet).
3. TLS Communication
Refers to any data exchange over a network that is encrypted using TLS. Ensures that the messages between the diagnostic tool and ECU: Are not visible to unauthorized listeners (encryption), Cannot be tampered with (integrity), Are from a trusted source (authentication).
4. TLS Certificate
A digital file used to verify identity and establish secure connections.
Contains:
In this context: The ECU might only allow communication from diagnostic tools that can present a valid certificate. This certificate proves that your diagnostic tool is trusted and authorized to connect.
What is Automotive Diagnostics?
Automotive Diagnostics refers to: The process of monitoring, identifying, and troubleshooting faults in a vehicle’s systems using electronic tools and communication protocols. Modern vehicles have many ECUs (Electronic Control Units) — each managing different functions like the engine, transmission, ABS, airbags, infotainment, etc. Diagnostics helps engineers, mechanics, and tools communicate with these ECUs to:
Detect issues (like error codes)
Why is it needed?
Key Components of Diagnostics
Common Diagnostic Use Cases
What is DoIP?
DoIP (Diagnostics over IP)
A diagnostic communication protocol defined in ISO 13400. It allows automotive diagnostic tools to communicate with ECUs using standard IP networks (like Ethernet). It's designed to replace slower transport layers like CAN for high-bandwidth tasks (e.g., flashing software).
Where is DoIP used?
Use Case Description
Firmware flashing Update ECU software over fast Ethernet instead of CAN (much faster).
Diagnostics Read trouble codes, run ECU tests, monitor live data via a connected tester.
Remote diagnostics OEMs or garages can diagnose a car remotely using networked diagnostic tools.
Vehicle production Used in factory lines to configure and test ECUs quickly.
Secure access (TLS) OEMs may require secure, authenticated sessions using certificates.
How does DoIP interact with an ECU?
Step-by-Step Interaction Example:
Imagine a diagnostic tool connected to a car over Ethernet:
1. Discovery Phase (Vehicle Announcement)
The tester sends a DoIP Discovery Request via UDP.
All connected ECUs (or a gateway) respond with a Vehicle Announcement.
The tester learns the vehicle IP address and available ECU IDs.
2. Establish TCP Connection
The tester opens a TCP connection (port 13400) to the target ECU (or DoIP gateway).
3. Routing Activation
The tester sends a Routing Activation Request to establish a secure diagnostic channel.
ECU replies with a positive response, and the connection is now authorized.
4. Send UDS Messages
Now the tester sends UDS (Unified Diagnostic Services) messages encapsulated in DoIP frames.
Example UDS command: 10 01 → Diagnostic Session Control (default session)
The ECU responds with a UDS reply.
5. Terminate Session
Once done, the session is closed, and the connection is released.
Real-World Example:
- You’re using a diagnostic tool (like Vector Canoe, Softing DTS, or a Python-based tool), connected to a vehicle's Ethernet port.
You send a DoIP discovery.
The Body ECU responds.
You open a secure TCP session.
You send 0x22 F1 90 to read the VIN number.
ECU responds with 49 F1 90 57 41 55 ... containing the VIN.
You then send 0x19 02 to read trouble codes (DTCs).
ECU responds with the DTC list.
Why DoIP over CAN?
Feature CAN DoIP (Ethernet)
Speed Up to 1 Mbps 100 Mbps – 1 Gbps
Cable length Short Long (e.g., factory floor)
Data size Small packets Large payloads (flash files)
Secure (TLS) ❌ Not standard ✅ Built-in support
Remote access ❌ ✅ Possible
Tools That Support DoIP:
Vector CANoe / CANalyzer
Softing DTS
ETAS INCA
UDSonCAN / UDSonIP tools
Python (socket + custom DoIP logic)
Let me know if you want:
A flowchart of DoIP interaction
A Python-based DoIP + UDS tool