0% found this document useful (0 votes)
14 views36 pages

T6 - Can HLP - Iso-Tp

The document outlines the structure and specifications of the CAN protocol and its application in on-board and off-board diagnostics for vehicles. It details the layers of the ISO/OSI reference model as they relate to the CAN protocol, including the mandatory standards for diagnostics in Europe and the U.S. Additionally, it discusses the evolution of on-board diagnostics (OBD) from proprietary solutions to standardized protocols, emphasizing the importance of communication between vehicle ECUs and diagnostic testers.

Uploaded by

motoatope69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views36 pages

T6 - Can HLP - Iso-Tp

The document outlines the structure and specifications of the CAN protocol and its application in on-board and off-board diagnostics for vehicles. It details the layers of the ISO/OSI reference model as they relate to the CAN protocol, including the mandatory standards for diagnostics in Europe and the U.S. Additionally, it discusses the evolution of on-board diagnostics (OBD) from proprietary solutions to standardized protocols, emphasizing the importance of communication between vehicle ECUs and diagnostic testers.

Uploaded by

motoatope69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Ilker Demirkol

ilker.demirkol@upc.edu
2
No. of
ISO/OSI ref model CAN protocol specification
layer

7 Application Application specific

6 Presentation

5 Session Higher Layer Protocols (HLP)


4 Transport

3 Network

2 Data Link
CAN protocol
(with free choice of medium)
1 Physical
 Transportation of messages > 8 bytes

 Networking through gateways

 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

 Legislated vs. Manufacturer Enhanced vs.


World-wide Harmonized [REF]

6
 Guarantees standardized access to vehicle information for:
 fault diagnostics by repair shop
 emission inspection by technical inspection agencies

 Mandatory in Europe for:


 gasoline vehicles manufactured: 2001
 diesel vehicles manufactured: 2003

 Needs a standard protocol


 to communicate
 1980-88: Several proprietary OBD solutions
 1991-94: California Air Resources Board (CARB) requires:
 All vehicles sold from 1991 have OBD capability (OBD-I)
 In 1994, OBD-II was released, which includes the specification of
the connector
 1996: OBD-II is mandatory for all cars sold in US
 2001: EU makes EOBD mandatory for all gasoline vehicles
 2008: All cars sold in the United States are required to use
the ISO 15765-4 (and therefore ISO-TP)

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

7 Application Application specific

6 Presentation

5 Session Higher Layer Protocols (HLP)


4 Transport

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

 Quality of Service Data Link

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

 … before the other features …

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?

 Note: You cannot change the CAN standard

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)

 … before the other features …

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?

 Note: You cannot change the CAN standard


 Hint: Indicate the GW’s ID somewhere

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

 Addressing scheme examples (6 defined in the std.) :


 Normal Addressing:
▪ Addresses are the CAN identifiers
 Extended Addressing (for gateways):
▪ 1 PCI Byte (first byte of CAN payload) for gateway address
1 CAN Frame Data Payload
 Frame Types: 4 bit 4 bit 8 bit 8 bit

Single Frame: 0x0 Data Length 0..7 Data Bytes
Standard frame for unsegmented data
First Frame: 0x1 Data Length Data Length 6 Data Bytes
Initial frame in a sequence of frames
Consecutive Frame: 0x2 Seq Number 1..7 Data Bytes
Subsequent frame in the sequence (SN modulo 24)
Flow Control Frame: 0x3 Flow Status Block Size Separation Time
Response of the receiver specifying min. delay and
max. buffer size (=block size) for consecutive frames
• Flow Status: 0 = Clear To Send, 1 = Wait, 2 = Overflow/abort
• Block Size (BS): # of frames that can be sent before waiting for the
0-127ms
next flow control frame 0-127ms
• Separation Time (ST): 0..127 => 0..127 ms, 241-249 =>100..900 μs 0-127ms

 In case of error (timeout or wrong sequence number):


 Application layer is informed but not the sender of the message


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

 Legislated vs. Manufacturer Enhanced vs.


World-wide Harmonized [REF]
28
OSI Layer Legislated On-Board Manufacturer Enhanced Legislated WWH-OBD
Diagnostics (OBD) Diagnostics
ISO 14229-1 (UDS)/
Application (layer 7) ISO 15031 (OBD) ISO 14229-1 (UDS)
ISO 27145

Presentation (layer 6) ISO 15031 (OBD) Manufacturer specific ISO 27145

Session (layer 5) ISO 14229-2 (UDS)


Transport (layer 4)
ISO 15765-2 (ISO-TP)
Network (layer 3)
Data link (layer 2)
CAN, LIN, FlexRay,… or Manufacturer specific
Physical (layer 1)

UDS: Unified Diagnostic Services

29
 For “Manufacturer Enhanced Diagnostics”
 Enables interoperability between off-board diagnostic tester and on-
board ECU

 Client-Server with simple request-response communication


 Client (=diagnostic tester) initiates request and waits for
confirmation
 Server (=ECU) receives indication and sends response
Service Request
Service ID Request Parameters
SID

Positive Response
SID + 40 Response Parameters

Negative Response
Error ID (7F) SID Error Code
Service Request
Service ID Parameter ID Request Parameters
SID PID

 Service Identifier (SID):


 1-10 for OBD. Examples:
▪ 1: Request current diagnostic data Note: These are different than CAN ID!
▪ 2: Request freeze frame data • 11-bit CAN ID for OBD Request and Response:
▪ 3: Show stored DTCs Initial Request: 0x7DF
▪ 9: Request vehicle information Response: 0x7E8 - 0x7EF
 >= 16 for non-OBD UDS

 Parameter Identifier (PID):


 Ex: SID 1, PID 0C requests the engine RPM
 Example services (SIDs) defined:
 Diagnostic Management: Control of diagnostic sessions (SID 0x10)
▪ "Programming Session" used to upload software
▪ "Safety system diagnostic session" to test safety-critical functions, such as
airbag tests
 Data Transmission Services: Read from and write to ECUs
▪ Read Memory By Address (SID 0x23)
…
 Black box for the cars
 2015 and newer vehicles are required to equip
 Constantly records last ~20 sec info about:
 Vehicle's speed
 Braking
 Tilt of the vehicle on the road
 Airbag deployment
 Seat belt status
 …
 A crash data retrieval (CDR) tool will use OBD to pull this data
34
 Here you see OBD2, CAN, ISO-TP in action:
 https://www.youtube.com/watch?v=OhShoU_E-
0g&feature=emb_logo

35
36

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy