ISO 15765-2 supplies transport and network-layer services over CAN. A short message uses a Single Frame. A longer message begins with a First Frame and continues with Consecutive Frames after Flow Control.
Reading the network or diagnostic trace
Flow Control specifies the size of a block and the minimum separation between Consecutive Frames. The usable bytes per frame depend on the addressing format and CAN data length.
See UDS over CAN and the vehicle diagnostics protocol guide.
Sources: ACTIA IME overview and standard or technical reference.
Detailed reference
ISO 15765-2 is the transport that turns one diagnostic message into CAN frames and back again. A CAN data frame holds eight bytes, or up to 64 on CAN FD. A read of many identifiers, a flash block or a fault-memory dump is longer than that. The transport splits the message, asks the receiver how fast to continue, and numbers the pieces so a missing frame is visible. The services inside the message are on the diagnostic communication protocols page. The CAN frame they ride in is on the CAN page. Volkswagen Group modules that open a channel before they will carry diagnostics are on the TP 2.0 page.
Where the address sits
Normal addressing puts the diagnostic address entirely in the CAN identifier. The first data byte is then the protocol control information. Extended addressing uses an extra address byte in front of that, so a single CAN identifier can still reach more than one server. The price is one fewer payload byte in every frame. Either way the control unit only accepts the identifier and address pair it was built with. A request on the functional identifier and a request on the physical identifier are different conversations, even when the service byte is the same.
Four frame types
The high nibble of the first control byte names the frame. The low nibble, and sometimes the next bytes, belong to that type.
| High nibble | Frame | What the rest of the control field says |
|---|---|---|
| 0 | Single frame | The low nibble is the number of payload bytes. No further frame is coming. |
| 1 | First frame | The low nibble plus the next byte are a 12-bit length, so this length encoding supports up to 4,095 bytes. The sender then waits. |
| 2 | Consecutive frame | The low nibble is the sequence number. It starts at 1 and wraps from 15 back to 0. |
| 3 | Flow control | The low nibble is the flow state. The next byte is the block size. The byte after that is the separation time. |
A single frame on a classic CAN frame carries at most seven payload bytes, or six when the extended address byte is present. The control byte is the reason a seven-byte answer is not an eight-byte CAN frame of pure data. Short frames are often padded out to the CAN length. The fill byte is the control unit's choice. 00, 55 and AA hexadecimal all appear. A check that demands one of them will fail on a unit that uses another.
A first frame is the start of anything longer. After it, the sender stops until flow control arrives. Each consecutive frame then carries the next slice, and the sequence nibble lets the receiver see a skip. The transport does not add a second checksum. The CAN frame already has one, and the diagnostic message has whatever check its own service defines.
Flow control
The receiver answers a first frame with three control bytes. The flow state in the low nibble is the instruction:
| State | Name | What the sender does |
|---|---|---|
| 0 | Continue to send | Send the next run of consecutive frames, spaced by at least the separation time, and stop after the block size for another flow-control frame. |
| 1 | Wait | The receiver is busy. Send nothing until the next flow-control frame. |
| 2 | Overflow | The length in the first frame is more than this receiver will accept. The transfer ends. |
A block size of zero means the sender may finish the message without another flow-control frame. Any other block size is how many consecutive frames are allowed before the sender has to wait again. The separation time is the minimum gap between those frames. Values from 0 to 127 are milliseconds. Values from F1 to F9 hexadecimal are 100 to 900 microseconds. A sender that ignores the separation time overruns a slow control unit, and the usual symptom is a sequence that starts correctly and then stops being acknowledged.
ISO 15765-2 also defines an extended First Frame length encoding. CAN FD changes how many bytes can fit into each CAN frame, up to 64 bytes. Both endpoints need to support the selected framing and data-link configuration. The arbitration and the data-phase rate of the CAN frame underneath are unchanged by the transport. They are set by the network, as the CAN page describes.
What a trace is showing
A legislated CAN session, ISO 15765-4, uses this transport at the rate of that diagnostic network. A single-frame service 01 request is a short CAN frame whose first data byte is a small length and whose next bytes are the service and the parameter identifier. A long read comes back as a first frame, a flow-control frame from the tester, and then the consecutive frames. The sample rate of a log is still the rate of those requests and the control unit's own update, not the bit rate of the pair.
Keyword Protocol on CAN and Unified Diagnostic Services on CAN can share this transport and still be different service lists. The first byte after the transport control field is the service identifier. Matching a definition file to the wrong service produces values that parse and still do not mean what the file claims.
Sources
- ISO 15765-2. Transport and network layer services on CAN: single frame, first frame, consecutive frame and flow control, including the 2016 provisions for CAN FD.
- ISO 15765-4. Emissions-related communication on CAN, using that transport.
- Diagnostic communication protocols for serial logging. How the services inside these frames are named, and why the bus rate is not the sample rate.
Related CAN references
See UDS over CAN for the diagnostic services carried by ISO-TP, OBD-II and UDS diagnostic CAN IDs for addressing examples and the CAN bus ID database for vehicle-specific CAN references.