Service Interaction Protocol
Transfer Data
Overview
TransferData is the middle step in the download/upload sequence. Each request contains a block sequence counter that ensures data integrity. The maximum block size is determined by the preceding RequestDownload or RequestUpload response.
Interactions with Other SIDs
Prerequisites & Dependencies
- 0x34RequestDownload must be active for tester→ECU transfers
- 0x35RequestUpload must be active for ECU→tester transfers
- 0x37RequestTransferExit completes the sequence
Data Direction
After 0x34 (Download)
Tester sends data IN request
After 0x35 (Upload)
ECU sends data IN response
Message Format
Request Format (Download)
| Byte | Field | Value | Description |
|---|---|---|---|
| 0 | SID | 0x36 | Transfer Data |
| 1 | blockSequenceCounter | 0x01-0xFF | Block number (starts at 0x01, wraps at 0xFF) |
| 2-N | transferRequestParameterRecord | Variable | Data block (max size from 0x34/0x35 response) |
Response Format (Download)
| Byte | Field | Value | Description |
|---|---|---|---|
| 0 | Response SID | 0x76 | Positive Response |
| 1 | blockSequenceCounter | Echo | Echo of block number |
Response Format (Upload)
| Byte | Field | Value | Description |
|---|---|---|---|
| 0 | Response SID | 0x76 | Positive Response |
| 1 | blockSequenceCounter | Echo | Echo of block number |
| 2-N | transferResponseParameterRecord | Variable | Data block from ECU |
Block Sequence Counter
Counter Behavior
- Start: First block is always 0x01
- Increment: Each subsequent block increments by 1
- Wrap: After 0xFF, wraps to 0x00 (not 0x01)
- Validation: ECU rejects out-of-sequence blocks
Sequence: 01 → 02 → 03 → … → FE → FF → 00 → 01 → 02 → …
TX/RX Examples
Download Data Blocks
Block 1
36 01 [512 bytes of firmware]> First data block
Response
76 01> Block 1 received
Block 2
36 02 [512 bytes of firmware]> Second data block
Response
76 02> Block 2 received
Upload Data Blocks
Request Block 1
36 01> Request first block
Response
76 01 [512 bytes from ECU]> Block 1 data
Request Block 2
36 02> Request second block
Response
76 02 [512 bytes from ECU]> Block 2 data
Wrong Block Sequence
Block 3 (skipped 2)
36 03 [data]> Out of sequence
Error Response
7F 36 73> Wrong block sequence counter
No Active Transfer
Request
36 01 [data]> Without 0x34/0x35 first
Error Response
7F 36 24> Request sequence error
UML Sequence Diagrams
Multiple Block Download
Download 2KB in 512-byte Blocks
12 stepsAnticipated Behavior
Block Size Limit: Never exceed the maxNumberOfBlockLength returned by 0x34/0x35. The last block may be smaller if the total size doesn’t divide evenly.
Response Pending: Flash programming may take time. The ECU may send NRC 0x78 (Response Pending) while writing data to flash memory.
Negative Response Codes (NRCs)
| NRC | Name | Description |
|---|---|---|
| 0x13 | Incorrect Message Length | Block too large or missing data |
| 0x24 | Request Sequence Error | No active download/upload (missing 0x34/0x35) |
| 0x71 | Transfer Data Suspended | Transfer interrupted, must restart |
| 0x72 | General Programming Failure | Flash write error |
| 0x73 | Wrong Block Sequence Counter | Out-of-order block number |
| 0x78 | Response Pending | Flash programming in progress (NOT an error) |