J1939-21-TP (SAE J1939-21)

Some J1939 Parameter Groups are defined as multipacket capable. These groups can use the J1939-21 transport protocol (J1939-21-TP) when the number of payload bytes exceeds what can be transported using a single frame (else they are transmitted directly). J1939-21-TP can carry up to 1785 data bytes.

flowchart LR A[Multipacket capable message] --> C{"Payload exceeds one frame?"} C -->|No| D["Transmit message using message PGN"] C -->|Yes| E["Transmit message using transport PGN(s)"]

J1939-21-TP uses two PGNs in combination: The connection-management PGN (TP.CM / 0xEC00) and the data-transfer PGN (TP.DT / 0xED00). Both PGNs are of type PDU1 - allowing for both destination-specific and broadcast (using the global address, 0xFF) communication. Destination-specific transfers use flow-control.

Note

The J1939 transport protocol differs from other transport-protocols by using distinct message identifiers for transporting multi-frame messages.

The connection-management PGN (TP.CM) defines a range of frame types for initialization, flow-control and termination. Transfers using flow-control are initiated using the TP.CM_RTS frame and transfers not using flow-control with the TP.CM_BAM frame. A simplified interpretation of the initialization frames is provided below.

Initialization (TP.CM_RTS = 0x10 / TP.CM_BAM = 0x20)

BYTE 0

BYTE 1-2

BYTE 3

BYTE 4

BYTE 5-7

Control (0x10/0x20)

Total bytes

Total packets

-

PGN

The data-transfer PGN (TP.DT) defines a single frame type provided below.

Transport data (TP.DT)

BYTE 0

BYTE 1-7

Sequence number

Data


Below provides 3 examples of the use of J1939-21-TP when transporting payloads exceeding a single frame:

  1. PDU2 (broadcast) type PGN

  2. PDU1 (destination-specific) type PGN with 0xFF (global-address) as destination

  3. PDU1 (destination-specific) type PGN with 0x02 (receiver-address) as destination

All examples assume the following parameters:

  • Message priority 0x07

  • Transmitting node with source-address 0x01

  • A bus capable of 8 data byte payloads

To clearly demonstrate the difference between a direct single-frame transfer and multi-frame transfer, each example shows one transfer of 8 bytes (0x01 to 0x08) and one transfer of 10 bytes (0x01 to 0x0A).


Example 1, PDU2 (broadcast) type PGN

The transmitting node wants to broadcast PGN 0xF0AA (PDU2)

Payload of 8 bytes (direct single-frame transfer):

ID: 1CF0AA01 (P: 0x07, PF: 0xF0, GE: 0xAA, SA: 0x01), Data: 0102030405060708

Payload of 10 bytes (multi-frame transfer):

ID: 1CECFF01 (P: 0x07, PF: 0xEC, GE: 0xFF, SA: 0x01), Data: 200A0002FFAAF000    (TP.BAM)
ID: 1CEBFF01 (P: 0x07, PF: 0xEB, GE: 0xFF, SA: 0x01), Data: 0101020304050607    (TP.DT)
ID: 1CEBFF01 (P: 0x07, PF: 0xEB, GE: 0xFF, SA: 0x01), Data: 0208090AFFFFFFFF    (TP.DT)

The assembled message becomes:

ID: 1CF0AA01 (P: 0x07, PF: 0xF0, GE: 0xAA, SA: 0x01), Data: 0102030405060708090A

Note

Notice how the multi-frame transmission uses the connection management (0xEC00) and data transfer (0xEB00) messages, with the original PGN and data contained in the payload.


Example 2, PDU1 (destination-specific) type PGN with 0xFF (global-address) as destination

The transmitting node wants to broadcast PGN 0xEF00 (PDU1). To broadcast a destination-specific PDU, the destination address is set to the global-address 0xFF.

Payload of 8 bytes (direct single-frame transfer):

ID: 1CEFFF01 (P: 0x07, PF: 0xEF, GE: 0xFF, SA: 0x01), Data: 0102030405060708

Payload of 10 bytes (multi-frame transfer):

ID: 1CECFF01 (P: 0x07, PF: 0xEC, GE: 0xFF, SA: 0x01), Data: 200A0002FFFFEF00    (TP.BAM)
ID: 1CEBFF01 (P: 0x07, PF: 0xEB, GE: 0xFF, SA: 0x01), Data: 0101020304050607    (TP.DT)
ID: 1CEBFF01 (P: 0x07, PF: 0xEB, GE: 0xFF, SA: 0x01), Data: 0208090AFFFFFFFF    (TP.DT)

The assembled message becomes:

ID: 1CEFFF01 (P: 0x07, PF: 0xEF, GE: 0xFF, SA: 0x01), Data: 0102030405060708090A

Note

Notice how transferring PDU1 using the global address is very similar to the transfer of PDU2 in Example 1.


Example 3, PDU1 (destination-specific) type PGN with 0x02 (receiver-address) as destination

The transmitting node wants to transmit PGN 0xEF00 (PDU1) to a specific node with source-address (SA) 0x02.

Payload of 8 bytes (direct single-frame transfer):

ID: 1CEF0201 (P: 0x07, PF: 0xEF, DA: 0x02, SA: 0x01), Data: 0102030405060708

Payload of 10 bytes (multi-frame transfer with flow-control):

ID: 1CEC0201 (P: 0x07, PF: 0xEC, DA: 0x02, SA: 0x01), Data: 100A00020100EF00    (TP.CM_RTS)
ID: 1CEC0102 (P: 0x07, PF: 0xEC, DA: 0x01, SA: 0x02), Data: 110101FFFF00EF00    (TP.CM_CTS)
ID: 1CEB0201 (P: 0x07, PF: 0xEB, DA: 0x02, SA: 0x01), Data: 0101020304050607    (TP.DT)
ID: 1CEC0102 (P: 0x07, PF: 0xEC, DA: 0x01, SA: 0x02), Data: 110102FFFF00EF00    (TP.CM_CTS)
ID: 1CEB0201 (P: 0x07, PF: 0xEB, DA: 0x02, SA: 0x01), Data: 0208090AFFFFFFFF    (TP.DT)
ID: 1CEC0102 (P: 0x07, PF: 0xEC, DA: 0x01, SA: 0x02), Data: 130A0002FF00EF00    (TP.CM_EOMA)

The assembled message becomes:

ID: 1CEF0201 (P: 0x07, PF: 0xEF, DA: 0x02, SA: 0x01), Data: 0102030405060708090A

Note

Notice how this destination specific transfer uses flow-control.