Tuning Wiki

For diagnostic addressing and read-only request examples, see Volkswagen CAN diagnostics in the Protocols section.

TP 2.0 is the Volkswagen Group transport that opens a diagnostic channel on CAN and then carries the bytes of a Keyword Protocol or later session across it. It is connection-oriented. The tester and the control unit agree a pair of CAN identifiers, a block size and a set of gaps, and only then move the diagnostic service. A module that speaks ISO-TP answers a different handshake. A module that still expects TP 2.0 stays silent if it is offered a single-frame service request on the legislated identifiers. The services themselves are on the diagnostic communication protocols page.

Broadcast

A broadcast is a fixed seven-byte frame, sent five times so a single lost copy does not drop the announcement. The first byte is the logical address of the destination. The second byte is the opcode: 23 hexadecimal asks, 24 hexadecimal answers. The next three bytes are the service identifier and its parameters. The last two bytes are 00 00 when a reply is expected. When no reply is expected, that pair alternates between 55 55 and AA AA hexadecimal, so a listener can see that the repeats belong to one announcement.

Opening a channel

Channel setup uses a CAN identifier derived from the module's logical address. Every control unit has its own address, and further addresses name groups. The setup frame is seven bytes.

ByteContents
0Logical address of the destination
1Opcode
2 and 3Receive identifier, least significant byte first. The top nibble of byte 3 is 0 when the identifier is valid and 1 when it is not set yet
4 and 5Transmit identifier, in the same form
6Application type, the field that selects which service this channel is for

The opcodes at this step are C0 hexadecimal for the channel request, D0 hexadecimal for a positive reply, and D6, D7 or D8 hexadecimal for a refusal. A refusal can be temporary. The tester may repeat the request.

In the request, the tester names the CAN identifier it wants to receive on and marks the other identifier invalid. In the positive reply, the control unit names the identifier it wants to receive on and copies the tester's identifier into the other field. From the next frame onward, each side transmits on the identifier the other is listening to. Those identifiers belong to this channel. They are not the setup identifier.

Parameters, test, break, disconnect

The first frame on the new identifiers sets the pace. Opcode A0 hexadecimal carries the block size and the timing the other side must respect when it sends back. Opcode A1 hexadecimal returns the parameters for the opposite direction. The block size is how many CAN frames the sender may transmit before it has to wait for an acknowledgement. The timing bytes include the minimum gap between those frames.

Opcode A3 hexadecimal is a connection test. The other side answers with its parameter response, which is how a quiet channel is told from a dead one. Opcode A4 hexadecimal is a break: the receiver throws away everything since the last acknowledgement. Opcode A8 hexadecimal disconnects, and the other side disconnects as well. Leaving a channel open and simply unplugging the tester is how a later session finds the control unit still allocated.

The data frames

Once the channel is up, byte 0 is split. The low nibble is the sequence number. The high nibble says whether this frame carries payload or only an acknowledgement.

A payload nibble has its top bit clear. One flag says the sender is now waiting for an acknowledgement. Another says this is the last frame of the block. Bytes 1 to 7 are the diagnostic message. Seven bytes is the payload of one CAN frame after that control byte.

An acknowledgement nibble has its top bit set. A ready flag in that nibble is the permission to send the next block. An acknowledgement frame has no diagnostic payload. A trace of a long read is a run of payload frames, an acknowledgement, another run, and so on, on the two dynamic identifiers agreed at setup. The sequence nibble is what shows a skipped frame. The transport relies on the CAN frame's own check.

Sources

  • Volkswagen Group transport protocol TP 2.0. Channel setup opcodes C0, D0 and D6 to D8 hexadecimal, parameter opcodes A0 and A1, test A3, break A4, disconnect A8, and the broadcast opcodes 23 and 24 hexadecimal.
  • ISO-TP on CAN. The later transport on the same physical bus, with a different handshake.

For an overview of both generations, see Volkswagen TP 1.6 and TP 2.0 in the illustrated protocol guide.