1.. _can_isotp:
2
3ISO-TP Transport Protocol
4#########################
5
6.. contents::
7    :local:
8    :depth: 2
9
10Overview
11********
12
13ISO-TP is a transport protocol defined in the ISO-Standard ISO15765-2 Road
14vehicles - Diagnostic communication over Controller Area Network (DoCAN).
15Part2: Transport protocol and network layer services. As its name already
16implies, it is originally designed, and still used in road vehicle diagnostic
17over Controller Area Networks. Nevertheless, it's not limited to applications in
18road vehicles or the automotive domain.
19
20This transport protocol extends the limited payload data size for classical
21CAN (8 bytes) and CAN-FD (64 bytes) to theoretically four gigabytes.
22Additionally, it adds a flow control mechanism to influence the sender's
23behavior. ISO-TP segments packets into small fragments depending on the payload
24size of the CAN frame. The header of those segments is called Protocol Control
25Information (PCI).
26
27Packets smaller or equal to seven bytes on Classical CAN are called
28single-frames (SF). They don't need to fragment and do not have any flow-control.
29
30Packets larger than that are segmented into a first-frame (FF) and as many
31consecutive-frames (CF) as required. The FF contains information about the length of
32the entire payload data and additionally, the first few bytes of payload data.
33The receiving peer sends back a flow-control-frame (FC) to either deny,
34postpone, or accept the following consecutive frames.
35The FC also defines the conditions of sending, namely the block-size (BS) and
36the minimum separation time between frames (STmin). The block size defines how
37many CF the sender is allowed to send, before he has to wait for another FC.
38
39.. image:: isotp_sequence.svg
40   :width: 20%
41   :align: center
42   :alt: ISO-TP Sequence
43
44API Reference
45*************
46
47.. doxygengroup:: can_isotp
48