CAN protocol supports transfer of 8 bytes of data in one frame. What if you want to transfer large data? SAE J1939/21 specifications defines fragmented transmission of large data known as transport protocol (TP). TP sends message of more than 8 bytes of data in multiple packets. SAE J1939/21 specifications defines various network services, message requests and acknowledgment. it defines format of frames, sending, handshaking and reassembling of packets.
SAE J1939 TP supports sending data to global destination address (BAM) and sending data to specific destination (CM). Data transfer part is similar in both the ways, they differ in how they start and how fast data is transferred.
SAE J1939 TP use two specific parameter groups for fragmented transmission of large data. First is transport protocol connection management message (TP.CM); it contains connection command, PGN identifier of the TP message and information about how to reconstruct the message. Second is transport protocol data transfer message (TP.DT); it contains sequence number in first byte and 7 bytes of data. A maximum of 1785 bytes can be transferred using transport protocol.
Broadcast Announce Message Transport Protocol (BAM TP)
BAM TP messages are intended for complete network, so there is no handshake messages required. The sender starts with sending TP.CM message with command BAM (32) and then sender send all the data through TP.DT messages untill all data is sent. The transmitter sends all data TP.DT messages at a minimum interval of 50 ms.
BAM TP.CM Message
- PGN: 60416 (0xEC00)
- Priority: 7
- Length: 8 bytes
- Destination: Global (255)
- Byte 1: BAM (32)
- Byte 2 and 3: Message size in bytes
- Byte 4: Number of packets
- Byte 5: Reserved (0xff)
- Byte 6 to 8: PGN
BAM TP.DT Message
- PGN: 60160 (0xEB00)
- Priority: 7
- Length: 8 bytes
- Destination: Global (255)
- Byte 1: Sequence number (1 to 255)
- Byte 2 to 8: Data
Below example shows transmission of BAM TP messages for PGN 65260 (0xFEEC) with 17 bytes of data.
- TP.CM message
Time in ms | PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
0 | 60416 | 255 | 32 | 18 | 0 | 3 | 255 | 236 (0xEC) | 254 (0xFE) | 0 |
- TP.DT message 1
Time in ms | PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
50 | 60160 | 255 | 1 | Data byte 1 | Data byte 2 | Data byte 3 | Data byte 4 | Data byte 5 | Data byte 6 | Data byte 7 |
- TP.DT message 2
Time in ms | PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
100 | 60160 | 255 | 2 | Data byte 8 | Data byte 9 | Data byte 10 | Data byte 11 | Data byte 12 | Data byte 13 | Data byte 14 |
- TP.DT message 3
Time in ms | PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
150 | 60160 | 255 | 3 | Data byte 15 | Data byte 16 | Data byte 17 | 255 | 255 | 255 | 255 |
Destination Specific Transport Protocol (CM TP)
Peer to peer or CM TP contains handshaking to guarantee successful data transfer. The sender starts with a “request to send” (RTS) message. The receiver then controls the TP communication with “clear to send” (CTS) messages and finally ends TP session with “end of message acknowledge”. The data of the TP.CM Clear to Send message contains the current sequence number to transfer as well as the number of TP.DT packets allowed. The originator then sends TP.DT messages starting at the sequence requested and stops after reaching the number of TP.DT messages allowed. This process continues until all the data is transferred. The receiving device then has to send a TP.CM message with command byte EndofMsgACK confirming that all the data was successfully received.
RTS TP.CM Message
- PGN: 60416 (0xEC00)
- Priority: 7
- Length: 8 bytes
- Destination: Specific
- Byte 1: RTS (16)
- Byte 2 and 3: Message size in bytes
- Byte 4: Number of packets
- Byte 5: Total number of packet sent in response to CTS.
- Byte 6 to 8: PGN
CTS TP.CM Message
- PGN: 60416 (0xEC00)
- Priority: 7
- Length: 8 bytes
- Destination: Specific
- Byte 1: CTS (17)
- Byte 2: Max number of packets that can be sent at once. (Not larger than byte 5 of RTS)
- Byte 3: Next sequence number to start with
- Byte 4 and 5: Reserved (0xff)
- Byte 6 to 8: PGN
End of Message Acknowledge TP.CM Message
- PGN: 60416 (0xEC00)
- Priority: 7
- Length: 8 bytes
- Destination: Specific
- Byte 1: EndofMsgACK (19)
- Byte 2 and 3: Total message size in bytes
- Byte 4: Total number of packets
- Byte 5: Reserved (0xff)
- Byte 6 to 8: PGN
Connection Abort Message TP.CM Message
- PGN: 60416 (0xEC00)
- Priority: 7
- Length: 8 bytes
- Destination: Specific
- Byte 1: Connection abort (255)
- Byte 2 and 3: Connection abort reason
- Byte 3 to 5: Reserved (0xff)
- Byte 6 to 8: PGN
Below example shows transmission of CM TP messages for PGN 65260 (0xFEEC) with 17 bytes of data.
- RTS Message
PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
60416 | 255 | 16 | 17 | 0 | 3 | 255 | 236 (0xEC) | 254 (0xFE) | 0 |
- CTS Messasge
PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
60416 | 255 | 17 | 2 | 1 | 255 | 255 | 236 (0xEC) | 254 (0xFE) | 0 |
- TP.DT message
PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
60160 | 255 | 1 | Data byte 1 | Data byte 2 | Data byte 3 | Data byte 4 | Data byte 5 | Data byte 6 | Data byte 7 |
- TP.DT Message
PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
60160 | 255 | 2 | Data byte 8 | Data byte 9 | Data byte 10 | Data byte 11 | Data byte 12 | Data byte 13 | Data byte 14 |
- CTS Message
PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
60416 | 255 | 17 | 0 | 255 | 255 | 255 | 236 (0xEC) | 254 (0xFE) | 0 |
- CTS Message
PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
60416 | 255 | 17 | 1 | 3 | 255 | 255 | 236 (0xEC) | 254 (0xFE) | 0 |
- TP.DT Message
PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
60160 | 255 | 3 | Data byte 15 | Data byte 16 | Data byte 17 | 255 | 255 | 255 | 255 |
- EndofMsgAck Message
PGN | Destination | Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
60416 | 255 | 19 | 17 | 0 | 3 | 255 | 236 (0xEC) | 254 (0xFE) | 0 |