T6 - Can HLP - Iso-Tp
T6 - Can HLP - Iso-Tp
ilker.demirkol@upc.edu
2
No. of
ISO/OSI ref model CAN protocol specification
layer
6 Presentation
3 Network
2 Data Link
CAN protocol
(with free choice of medium)
1 Physical
Transportation of messages > 8 bytes
Session-based communication
Flow control
…
On-board diagnostics:
Self-diagnosis of ECUs, when the car is on the move
Errors are recorded as Diagnostic Trouble Codes (DTCs)
Off-board diagnostics:
Communication between on-board ECU and an off-board tester
▪ Done at the service shop: Inspection, test, and configuration
6
Guarantees standardized access to vehicle information for:
fault diagnostics by repair shop
emission inspection by technical inspection agencies
8
Defines:
Connector specification and its pin-out
▪ A pin in the connector provides battery, so the connector
can power anything connected to it
Electrical signaling
Message format
Located close to the steering column, hidden
but accessible
9
Off-board
Diagnostic
Tester ECU ECU
Vehicle
Gateway
ECU ECU
Pin mapping
10
No. of
ISO/OSI ref model CAN protocol specification
layer
6 Presentation
3 Network
2 Data Link
CAN protocol
(with free choice of medium)
1 Physical
Transmission of packets over multiple intermediate hops
Example protocols: IPv4, IPv6, … ISO/OSI ref model
Application
Main functions: Presentation
Global addressing Session
Routing, e.g. Flooding, Link State Routing, … Transport
Fragmentation Network
Physical
Defines end-to-end logical connection
Protocols: ISO-TP, TCP, UDP, … ISO/OSI ref model
Main functions: Application
Reliability: Presentation
▪ Reliable (e.g. TCP) vs. Unreliable communication (e.g. UDP)
Session
Flow control: Overload at receivers Transport
Congestion control: Overload of the network Network
Data Link
Physical
Session Layer:
Opening, closing and managing a session between end ISO/OSI ref model
points
Application
▪ Connection-oriented vs. Connectionless
Presentation
Session
Presentation Layer:
Transport
Converts the data to a common representation used by the
Network
end systems
Data Link
Physical
General-purpose HLPs
ISO Transport Protocol (ISO-TP)
Special-purpose HLPs
Vehicle-Diagnostics:
▪ Unified Diagnostic Services (UDS)
▪ On-Board Diagnostics (OBD)
Vehicle-Operational:
▪ Proprietary: TP2.0 (VW), Volcano (Volvo), GMLAN (for General Motors), …
▪ CANopen
▪ SAE J1939 (heavy road vehicles), …
15
Industrial apps:
DeviceNet, CANopen, Profibus, …
Maritime:
Small boats: CAN-Kingdom, …
Large boards: CANopen, …
Agricultural machinery:
ISOBUS
Aviation:
CANaerospace, ARINC 825
16
ISO-TP = ISO Transport Protocol
Covers layers 3 (network layer) and 4 (transport layer)
Standardized under ISO 15765 “Road vehicles – Diagnostic Comm.
over CAN (DoCAN)”
▪ Designed to run ISO vehicle diagnostics protocols over CAN
▪ Part 2: “Transport protocol and network layer services”
▪ Part 4: “Requirements for emissions-related systems”
Most common application:
▪ Vehicle-diagnostics
Lightweight protocol with few but essential features:
Segmentation: Transmission of up to 4095 bytes of DATA
19
The scenario:
We have a CAN bus
A variable size application DATA: between 1 and 120 B, let’s say
How would you do this?
20
Lightweight protocol with few but essential features:
Segmentation: Transmission of up to 4095 bytes of DATA
Optional higher-layer addressing (for gateway-based bus systems)
21
The scenario:
We have a CAN bus
We want to send a message to a specific CAN ID
However, we want to ask the GW to forward it to other buses
How would you do this?
22
Lightweight protocol with few but essential features:
Segmentation: Transmission of up to 4095 bytes of DATA
Optional higher-layer addressing (for gateway-based bus systems)
Flow Control
Unreliable connection-oriented transport protocol
Uses a part of CAN data payload as ISO-TP header
Called Protocol Control Information (PCI)
Can take 1-3 bytes
23
End point addresses!
No automatic addressing, i.e., have to be predefined and statically
assigned
…
Remaining size to be sent @Tx
26
On-board diagnostics:
Self-diagnosis of ECUs, when the car is on the move
▪ State of functions performed by the subsystems, sensors, actuators
The errors are recorded in the memory as Diagnostic Trouble Codes
(DTCs)
Off-board diagnostics:
Communication between an on-board ECU and an off-board
diagnostic tester to facilitate inspection, test, and configuration
▪ Done at the service shop
29
For “Manufacturer Enhanced Diagnostics”
Enables interoperability between off-board diagnostic tester and on-
board ECU
Positive Response
SID + 40 Response Parameters
Negative Response
Error ID (7F) SID Error Code
Service Request
Service ID Parameter ID Request Parameters
SID PID
35
36