diagnostics with canoe - vector · 2018. 10. 23. · 3 typical doip testing tasks and challenges...

21
V1.0 | 2018-10-09 Setting up a Diagnostic Test System based on DoIP Diagnostics with CANoe

Upload: others

Post on 23-Apr-2021

68 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

V1.0 | 2018-10-09

Setting up a Diagnostic Test System based on DoIP

Diagnostics with CANoe

Page 2: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

2

u Diagnostics in CANoe

DoIP Basics

Live-Demo: DoIP test system

Agenda

Page 3: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

3

Typical DoIP Testing tasks and challenges

Diagnostics in CANoe

Task/Use Case Challenges

u Reuse of existing automated diagnostic tests (e.g. from CAN) on Ethernet-based network

u No Diagnostic Description available for Ethernet network

u New physical layer

u DoIP Vehicle identification / routing activation necessary

u Test of Ethernet or other network ECU behind DoIP Gateway

u No diagnostic description for Gateway available

u Test the Tester

u Create automated test for DoIP ECU

u HW SUT is not available

diagnostic ECU simulation necessary

Page 4: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

4

Overview

Diagnostics in CANoe

CANoe

MOST FlexRay

VN26xx VN16xxVN56xx VN88/89xx VN75/76xx I/O

AIO/DIOSensor buses

Analysis Simulation

Matlab/Simulink ®

OSEK/ AUTOSAR Emulation

Extensions (OEM specific, J1939, BAP, CANopen, AUTOSAR, ..)

External control

Logging

Offline

Online

TestDiagnostics

DiVa

COMGUI Panels

XCP/CCP

XIL-API / FDX

Ethernet

BroadR-Reach

Console

Session control

Fault memory window

OBD-II Test units

Test modules

CAN/LIN/K-Line

Page 5: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

5

Communication via…… “built-in diagnostic channel”:

u Uses almost all relevant communication parameters/attributes from diagnostic description and/or “Diagnostics/ISO TP” configuration dialog

u Used by all interactive diagnostic windows in CANoe/CANalyzer:

u Diagnostics Console Window

u Fault Memory Window

u Session Control Window

u Diagnostic Parameters Window

u No CAPL code necessary, but also usable with CAPL

… CAPL Callback Interface (CCI):

u (Almost) every parameter/attribute relevant for communication can be modified via CAPL for fault injection

u CAPL code necessary

u Can not be used by interactive diagnostic windows, i.e. changes of attributes/parameters via CAPL do not have an influence on the communication via these windows (exception: variant selection)

“Built-in” diagnostic channel vs. CAPL Callback Interface (CCI)

Diagnostics in CANoe

Page 6: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

6

Physical Layer

Built-in diagnostics channel up to CANoe V9.0 SPx

Diagnostics in CANoe

Diagnostic Layer

Transport Layer

DiagnosticWindows

CANoe/CANalyzer“built-in”

DiagnosticChannel

Test Modules,Test Units

Simulation Nodes

Transport Protocol DLL

CAPL Callback Interface (CCI)

alternatively

Page 7: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

7

Physical Layer

Built-in diagnostics channel since CANoe 10.0

Diagnostics in CANoe

Diagnostic Layer

Transport Layer

DiagnosticWindows

CANoe/CANalyzer“built-in”

DiagnosticChannel

Test Modules,Test Units, Simulation Nodes

Transport Protocol DLL

CAPL Callback Interface (CCI)

alternatively

Page 8: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

8

Necessary mainly for following use cases:

u Fault injection on tester or simulation side (especially on TP or lower levels!)

u Gateway implementation

Reference implementations (CAPL include files) for simple simulation/test purposes are available for:

u CAN TP

u LIN TP

u Flexray TP (AUTOSAR & ISO)

u DoIP

u K-Line

CAPL Callback Interface (CCI)

Diagnostics in CANoe

Page 9: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

9

Diagnostics in CANoe

u DoIP Basics

Live-Demo: DoIP test system

Agenda

Page 10: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

10

Vehicle and external network

DoIP Basics

Externalnetwork

According to ISO 13400-2:2012(E)

Vehicle network

ECU 1.1

ECU 1.2

ECU 1.<u>

DoIP edge node

gateway 1

DoIP gateway

<w>

Network node 1

DoIPnode 1

ECU 2.1

ECU 2.2

ECU 2.<v>

Network node <x>

DoIPnode <y>

External test

equipment

Network node 2

Network node <z>

Vehicle sub-network 1 Vehicle sub-network 2

IP-based network

IP-based network

Activation line

......

... ... ...

...

Page 11: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

11

Nested header structure

DoIP Basics

Eth Hdr DoIPIP Hdr TCP/UDP Hdr Eth CRCEthernet frame:

Max. 1518 Bytes (without VLAN-Tag)

ProtocolVersion

Inv. ProtocolVersion

PayloadType

DoIP Payload

1 41 2 0…4294967295

DoIP message:

Bytes:

PayloadLength

DoIP SourceAddress

DoIP TargetAddress

User Datae.g. UDS request

2 2 0…4294967291

DoIP payload(e.g. Diagnostic Message):

Bytes:

“Logical” DoIP addressesare needed for addressing

ECUs in “conventional”networks like CAN, LIN,

FlexRay, MOST etc.

Contains diagnosticrequest or response, e.g.0x10 0x03 = extended

Diagnostic Session

Page 12: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

12

DoIP Header Structure (example)

DoIP Basics

Item Byte Example Meaning

Protocol Version 0 0x02 DoIP Version 2(ISO 13400-2:2012)

Inverse Protocol Version 1 0xFD DoIP Version 2(ISO 13400-2:2012)

Payload Type 2 0x00 Vehicle Identification Requestwith VIN3 0x03

Payload Length 4 0x00 Payload Length = 17 (0x11)

5 0x00

6 0x00

7 0x11

DoIP Payload 8…24 … Vehicle Identification Number (VIN)

Page 13: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

13

Connection and Vehicle Discovery

DoIP Basics

According to ISO 13400-2:2012(E)

DoIP ECUNetworkExt. test

equipment

Physical Connect &(optional) address assignment via Auto-IP or DHCP

Vehicle announcement (3x)

Vehicle announcement (3x)

Vehicle identification responseVehicle identification response

Vehicle identification requestVehicle identification request

Alt [Tester is already reachable]

[Tester did not receive the initial vehicle announcement]

Page 14: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

14

u Case 1: Withoutparameters

Vehicle Identification Sequence (1/2)

DoIP Basics

1) EID = Entity Identification, typically contains the MAC address of the DoIP entity (here: of the ECU / Gateway)

Ext. test equipment

DoIP ECU/Gateway1

UDP: Vehicle identification request ()

UDP: Vehicle identification response (VIN1, EID11), …)

DoIP ECU/Gateway2

UDP: Vehicle identification response (VIN2, EID2, …)

Page 15: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

15

u Case 2: With Parameters,e.g. VIN

Vehicle Identification Sequence (2/2)

DoIP Basics

UDP: Vehicle identification request (VIN1)

UDP: Vehicle identification response (VIN1, EID1, …)

Ext. test equipment

DoIP ECU/Gateway1

DoIP ECU/Gateway2

Discard request if VIN does not match

Page 16: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

16

DoIP Session Example

DoIP Basics

According to ISO 13400-2:2012(E)

Non-DoIP ECU

DoIP Gateway

Ext. test equipment

Connection and vehicle discovery

Routing activation request

Routing activation response

Diagnostic responseDiagnostic message [Response]

Diagnostic requestDiagnostic message [Request]

Loop

Open TCP socket

Close TCP socket

Diagnostic message positive ack.

Connection successful

Initialize non-DoIP network, if necessary

Page 17: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

17

Routing Activation Request

DoIP Basics

TCP: Routing activation request (SA1), Activation Type)

TCP: Routing activation response (SA, TA2), Routing Activation Response Code)

1) SA = Source Address, here equal to Tester Log. Address

2) TA = Target Address, here equal to ECU Log. Address

Ext. test equipment

DoIP ECU/Gateway

Page 18: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

18

Diagnostic Messages

DoIP Basics

TCP: Diagnostic Message (SA, TA, UD1))

TCP: Diagnostic Message Positive Acknowledgement (SA, TA, ACK Code, …)2)

1) UD = User Data, contains the Diagnostic Request/Response

2) Only sent by a gateway after receiving, processing and copying the message correctly into the destination network transmission buffer

TCP: Diagnostic Message (TA, SA, UD)

Ext. test equipment

DoIP ECU/Gateway

Page 19: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

19

Diagnostics in CANoe

DoIP Basics

u Live-Demo: DoIP test system

Agenda

Page 20: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

20

CANoe and CANalyzer as diagnostic tools

u (AN-IND-1-001_CANoe_CANalyzer_as_Diagnostic_Tools.pdf)

CAPL Callback Interface in CANoe

u (AN-IND-1-012_CAPL_Callback_Interface.pdf)

Diagnostics via CANoe Gateways

u (AN-IND-1-004_Diagnostics_via_Gateway_in_CANoe.pdf)

Further documentation: Application notes

Live-Demo: DoIP test system

Page 21: Diagnostics with CANoe - Vector · 2018. 10. 23. · 3 Typical DoIP Testing tasks and challenges Diagnostics in CANoe Task/Use Case Challenges uReuse of existing automated diagnostic

V1.0 | 2018-10-09

Contact: [email protected]

Diagnostics with CANoe