<s>
ISO	B-General_Concept
15765-2	I-General_Concept
,	O
or	O
ISO-TP	B-General_Concept
(	O
Transport	O
Layer	O
)	O
,	O
is	O
an	O
international	O
standard	O
for	O
sending	O
data	B-Protocol
packets	I-Protocol
over	O
a	O
CAN-Bus	B-Protocol
.	O
</s>
<s>
The	O
protocol	O
allows	O
for	O
the	O
transport	O
of	O
messages	O
that	O
exceed	O
the	O
eight	O
byte	O
maximum	O
payload	O
of	O
CAN	O
frames	B-Protocol
.	O
</s>
<s>
ISO-TP	B-General_Concept
segments	O
longer	O
messages	O
into	O
multiple	O
frames	B-Protocol
,	O
adding	O
metadata	O
that	O
allows	O
the	O
interpretation	O
of	O
individual	O
frames	B-Protocol
and	O
reassembly	O
into	O
a	O
complete	O
message	O
packet	B-Protocol
by	O
the	O
recipient	O
.	O
</s>
<s>
It	O
can	O
carry	O
up	O
to	O
232-1	O
(	O
4294967295	O
)	O
bytes	O
of	O
payload	O
per	O
message	O
packet	B-Protocol
starting	O
from	O
the	O
2016	O
version	O
.	O
</s>
<s>
In	O
the	O
OSI	O
Model	O
,	O
ISO-TP	B-General_Concept
covers	O
the	O
layer	O
3	O
(	O
network	O
layer	O
)	O
and	O
4	O
(	O
transport	O
layer	O
)	O
.	O
</s>
<s>
The	O
most	O
common	O
application	O
for	O
ISO-TP	B-General_Concept
is	O
the	O
transfer	O
of	O
diagnostic	O
messages	O
with	O
OBD-2	O
equipped	O
vehicles	O
using	O
KWP2000	O
and	O
UDS	B-Application
,	O
but	O
is	O
used	O
broadly	O
in	O
other	O
application-specific	O
CAN	O
implementations	O
.	O
</s>
<s>
ISO-TP	B-General_Concept
can	O
be	O
operated	O
with	O
its	O
own	O
addressing	O
as	O
so-called	O
Extended	O
Addressing	O
or	O
without	O
address	O
using	O
only	O
the	O
CAN	O
ID	O
(	O
so-called	O
Normal	O
Addressing	O
)	O
.	O
</s>
<s>
For	O
clarity	O
the	O
protocol	O
description	O
below	O
is	O
based	O
on	O
Normal	O
Addressing	O
with	O
eight	O
byte	O
CAN	O
frames	B-Protocol
.	O
</s>
<s>
In	O
total	O
,	O
six	O
types	O
of	O
addressing	O
are	O
allowed	O
by	O
the	O
ISO	B-General_Concept
15765-2	I-General_Concept
Protocol	O
.	O
</s>
<s>
ISO-TP	B-General_Concept
prepends	O
one	O
or	O
more	O
metadata	O
bytes	O
to	O
the	O
payload	O
data	O
in	O
the	O
eight	O
byte	O
CAN	O
frame	O
,	O
reducing	O
the	O
payload	O
to	O
seven	O
or	O
fewer	O
bytes	O
per	O
frame	O
.	O
</s>
<s>
ISO	B-General_Concept
15765-2	I-General_Concept
is	O
a	O
part	O
of	O
ISO	B-General_Concept
15765	I-General_Concept
(	O
headlined	O
Road	O
vehicles	O
—	O
Diagnostic	O
communication	O
over	O
Controller	B-Protocol
Area	I-Protocol
Network	I-Protocol
(	O
DoCAN	O
)	O
)	O
,	O
which	O
has	O
the	O
following	O
parts	O
:	O
</s>
<s>
The	O
ISO-TP	B-General_Concept
defines	O
four	O
frame	O
types	O
:	O
</s>
<s>
Type	O
Code	O
Description	O
Single	O
frame	O
(	O
SF	O
)	O
0	O
The	O
single	O
frame	O
transferred	O
contains	O
the	O
complete	O
payload	O
of	O
up	O
to	O
7	O
bytes	O
(	O
normal	O
addressing	O
)	O
or	O
6	O
bytes	O
(	O
extended	O
addressing	O
)	O
First	O
frame	O
(	O
FF	O
)	O
1	O
The	O
first	O
frame	O
of	O
a	O
longer	O
multi-frame	O
message	O
packet	B-Protocol
,	O
used	O
when	O
more	O
than	O
6/7	O
bytes	O
of	O
data	O
segmented	O
must	O
be	O
communicated	O
.	O
</s>
<s>
The	O
first	O
frame	O
contains	O
the	O
length	O
of	O
the	O
full	O
packet	B-Protocol
,	O
along	O
with	O
the	O
initial	O
data	O
.	O
</s>
<s>
Consecutive	O
frame	O
(	O
CF	O
)	O
2	O
A	O
frame	O
containing	O
subsequent	O
data	O
for	O
a	O
multi-frame	O
packet	B-Protocol
Flow	O
control	O
frame	O
(	O
FC	O
)	O
3	O
the	O
response	O
from	O
the	O
receiver	O
,	O
acknowledging	O
a	O
First-frame	O
segment	O
.	O
</s>
<s>
It	O
lays	O
down	O
the	O
parameters	O
for	O
the	O
transmission	O
of	O
further	O
consecutive	O
frames	B-Protocol
.	O
</s>
<s>
A	O
message	O
longer	O
than	O
7	O
bytes	O
requires	O
segmenting	O
the	O
message	O
packet	B-Protocol
over	O
multiple	O
frames	B-Protocol
.	O
</s>
<s>
The	O
flow	O
control	O
frame	O
has	O
three	O
PCI	O
bytes	O
specifying	O
the	O
interval	O
between	O
subsequent	O
frames	B-Protocol
and	O
how	O
many	O
consecutive	O
frames	B-Protocol
may	O
be	O
sent	O
(	O
Block	O
Size	O
)	O
.	O
</s>
<s>
+Flow	O
Control	O
Bit	O
offset	O
7	O
..	O
4	O
(	O
byte	O
0	O
)	O
3	O
..	O
0	O
(	O
byte	O
0	O
)	O
15	O
..	O
8	O
(	O
byte	O
1	O
)	O
23	O
..	O
16	O
(	O
byte2	O
)	O
Description	O
type	O
if	O
the	O
transfer	O
is	O
allowed	O
Block	O
Size	O
Separation	O
Time	O
(	O
ST	O
)	O
,	O
minimum	O
delay	O
time	O
between	O
frames	B-Protocol
(	O
end	O
of	O
one	O
frame	O
and	O
the	O
beginning	O
of	O
the	O
other	O
)	O
Single	O
type	O
=	O
3	O
(	O
0	O
=	O
Continue	O
To	O
Send	O
,	O
1	O
=	O
Wait	O
,	O
2	O
=	O
Overflow/abort	O
)	O
0	O
=	O
remaining	O
"	O
frames	B-Protocol
"	O
to	O
be	O
sent	O
without	O
flow	O
control	O
or	O
delay	O
<=	O
127	O
,	O
separation	O
time	O
in	O
milliseconds	O
.	O
</s>
<s>
Single	O
type	O
=	O
3	O
(	O
0	O
=	O
Continue	O
To	O
Send	O
,	O
1	O
=	O
Wait	O
,	O
2	O
=	O
Overflow/abort	O
)	O
>	O
0	O
send	O
number	O
of	O
"	O
frames	B-Protocol
"	O
before	O
waiting	O
for	O
the	O
next	O
flow	O
control	O
frame	O
0xF1	O
to	O
0xF9	O
UF	O
,	O
100	O
to	O
900	O
microseconds	O
.	O
</s>
<s>
The	O
next	O
byte	O
is	O
the	O
block	O
size	O
,	O
the	O
count	O
of	O
frames	B-Protocol
that	O
may	O
be	O
sent	O
before	O
waiting	O
for	O
the	O
next	O
flow	O
control	O
frame	O
.	O
</s>
<s>
A	O
value	O
of	O
zero	O
allows	O
the	O
remaining	O
frames	B-Protocol
to	O
be	O
sent	O
without	O
flow	O
control	O
or	O
delay	O
.	O
</s>
<s>
The	O
third	O
byte	O
is	O
the	O
Separation	O
Time	O
(	O
ST	O
)	O
,	O
the	O
minimum	O
delay	O
time	O
between	O
frames	B-Protocol
.	O
</s>
<s>
ST	O
values	O
up	O
to	O
127	O
(	O
0x7F	O
)	O
specify	O
the	O
minimum	O
number	O
of	O
milliseconds	O
to	O
delay	O
between	O
frames	B-Protocol
,	O
while	O
values	O
in	O
the	O
range	O
241	O
(	O
0xF1	O
)	O
to	O
249	O
(	O
0xF9	O
)	O
specify	O
delays	O
increasing	O
from	O
100	O
to	O
900	O
microseconds	O
.	O
</s>
<s>
Robust	O
implementations	O
should	O
be	O
prepared	O
to	O
accept	O
frames	B-Protocol
from	O
a	O
sender	O
that	O
misinterprets	O
this	O
as	O
the	O
frame	O
repetition	O
rate	O
i.e.	O
</s>
<s>
The	O
sender	O
transmits	O
the	O
rest	O
of	O
the	O
message	O
using	O
Consecutive	O
Frames	B-Protocol
.	O
</s>
<s>
The	O
sequence	O
number	O
starts	O
at	O
1	O
and	O
increments	O
with	O
each	O
frame	O
sent	O
(	O
1	O
,	O
2	O
,...,	O
15	O
,	O
0	O
,	O
1	O
,...	O
)	O
,	O
with	O
which	O
lost	O
or	O
discarded	O
frames	B-Protocol
can	O
be	O
detected	O
.	O
</s>
<s>
So	O
the	O
first	O
set	O
of	O
CF(Consecutive frames )	O
start	O
from	O
"	O
1	O
"	O
.	O
</s>
