Transfer Data
The TransferData service transfers data blocks between the tester and ECU as part of a download or upload sequence initiated by RequestDownload (0x34) or RequestUpload (0x35).
The data mover. 0x36 is the middle of the transfer chain: it carries the actual bytes, one block at a time, each tagged with a block-sequence-counter. Direction depends on what opened the transfer — 0x34 (download) puts data in the request, 0x35 (upload) puts it in the response.
Block Streaming Transfer Pipeline (0x34 -> 0x36 -> 0x37)
Sequential Block Transfer with Automatic Counter Rollover
Overview
“The TransferData service is used by the client to transfer data to (download) or from (upload) the server.”
Each 0x36 request carries a blockSequenceCounter that must match what the ECU expects — that is how the ECU detects a lost or duplicated block. The block size is capped by the maxNumberOfBlockLength from the 0x34/0x35 response.
Transfer in Context
Step through blocks flowing in both directions, plus the errors you hit most: a wrong counter (0x73), no active transfer (0x24), and a voltage drop (0x93).
Transfer Runner
Watch blocks flow — both directions, plus the common errors and how to recover.
After 0x34, push the firmware in blocks and close with 0x37.
Press Play or Step to begin the sequence.
Block Sequence Counter
Drive the counter yourself. Watch it advance with each accepted block, wrap from 0xFF back to 0x01, and reject a wrong value with NRC 0x73.
Block Sequence Counter
The BSC is the heart of 0x36. Send blocks to watch it advance and wrap, and send a wrong one to see NRC 0x73. (Assumes an active transfer, PROGRAMMING + unlocked.)
Last frame
Send a block to begin.
Wrap behavior: in this simulator the counter wraps 0xFF → 0x01 (it never uses 0x00). When retrying a failed block, resend the same counter — do not advance it.
Message Structure
The request and response shapes differ by direction. Pick a frame and inspect each byte.
Protocol anatomy
0x36 Transfer Data
0x36 Response
Session & Security
SID 0x36 TransferData Stream Matrix
Permissions by stream type across diagnostic sessions. Select a row for details.
| Transfer Stream & BSC Phase | DEFAULT 0x01 | EXTENDED 0x03 | PROGRAMMING 0x02 | Security |
|---|---|---|---|---|
| ~ | Level 3 Flash | |||
| Level 1 | ||||
| Level 3 Flash | ||||
| — |
Keep the session alive: send TesterPresent (3E 80) every 2–3 seconds during a long transfer. If the S3 timer (≈5s) expires, the transfer state is lost and the next 0x36 returns 0x7F/0x24.
If security authorization lapses or is revoked during block streaming, subsequent 0x36 blocks are immediately rejected with NRC 0x33 (SecurityAccessDenied) or NRC 0x24 (RequestSequenceError).
Server processes sequential payload blocks, writes/reads data buffers, and validates consecutive blockSequenceCounter values.
| From session | To session | Transition command | Security state effect |
|---|---|---|---|
| 0x02 Programming | 0x01 Default | Security state drops to LOCKED. Active transfer terminates abruptly. | |
| Transfer Active | Session Timeout | S3 timer expires, security session drops, block counter state is wiped. | |
| Transfer In Progress | ECU Reset | Hard reset wipes all write buffers and re-locks ECU. |
Triggered when this service or requested resource requires an active security unlock that has not been granted.
Triggered during unlock attempts if the calculated key fails ECU cryptographic verification.
Enforced delay lockout if the maximum number of failed key submissions (typically 3) has been exceeded.
Service Dependencies
0x36 streams binary data blocks between tester and ECU during download and upload operations. Select a node to inspect interactions.
Inspect a related service
0x34 RequestDownload
Download Initiator · 0x34 -> OPENS DOWNLOAD PIPELINE
How it relates to TransferData
In download mode, 0x34 sets up the flash memory boundary, resets internal block sequence counter to 0x01, and returns maxNumberOfBlockLength. 0x36 TransferData cannot be called without prior 0x34 negotiation.
Session permissions
- 0x01 Default
- Blocked
- 0x02 Programming
- Allowed
- 0x03 Extended
- Blocked
- 0x04 Safety
- Blocked
- Opens write transfer state machine inside ECU bootloader
- Initializes block sequence counter to 0x01
- Defines upper limit for payload size per block
- Sets up memory write pointers at starting base address
Typical request
34 00 44 ...- 34
- SID: RequestDownload
- 00
- DFI: Plain
- 44
- ALFID: 4B addr, 4B size
Timing
0x36 block size must be <= maxNumberOfBlockLength from 0x74.
Failure risk: NRC 0x24 / SEQUENCE_ERROR
Calling 0x36 without prior 0x34/0x35 yields NRC 0x24 (requestSequenceError).
Example packet exchange
- Tester → ECU
34 00 44 00 10 00 00 00 00 20 00Negotiate 8KB Download
- ECU → Tester
74 20 04 02Max Block Size = 1026 Bytes
- Tester → ECU
36 01 [1024B]Transmit Block 1
Diagnostic workflow
1. Transfer Pipeline Negotiation (0x34 or 0x35)
Negotiate memory boundaries and obtain maxNumberOfBlockLength
2. Initial Block Transmission (BSC = 0x01)
Send first block starting at blockSequenceCounter 0x01
3. Sequential Block Looping & Counter Wrap
Increment counter 0x01..0xFF; wraps from 0xFF to 0x00 on block 256
4. Request Transfer Exit Dispatch (0x37)
Transmit 37 to conclude payload streaming and close transfer state machine
5. Post-Transfer Cryptographic Integrity Audit (0x31)
Execute CheckMemory / signature verification routine via 0x31
Service rules at a glance
- Block Sequence Counter (BSC) Wrapping
- The blockSequenceCounter starts at 0x01, increments by 1, and wraps from 0xFF directly to 0x00 (not 0x01). Counter mismatch returns NRC 0x73.
- Block Size Compliance
- Block payload length must never exceed maxNumberOfBlockLength returned in 0x74/0x75 response; exceeding returns NRC 0x13 or NRC 0x31.
- Duplicate Block Retransmission
- If a CAN communication error occurs, retransmitting the exact same blockSequenceCounter causes the ECU to re-acknowledge without re-writing.
- Programming Failure Code
- Internal flash write errors during block processing return NRC 0x72 (generalProgrammingFailure).
Multi-Block Sequences
Download — 2 KB in 512-byte blocks
Write Firmware to ECU
10 stepsUpload — ECU returns data in each response
Read Data from ECU
8 stepsNegative Response Codes
Negative response codes
Payload is empty (missing blockSequenceCounter) or exceeds the maxNumberOfBlockLength negotiated during 0x34/0x35.
This negative response indicates a rejection while processing the Transfer Data (SID 0x36) request. Verify preconditions, session levels, and message formatting per ISO 14229.
Troubleshooting Guide
Troubleshooting guide
Click any issue to expand diagnosis steps and resolution.
Timing Parameters
| Parameter | Typical Value | Context |
|---|---|---|
| P2 (Response) | 50–150 ms | Per-block acknowledgement |
| P2* (Enhanced) | 5000 ms | Real ECUs use this during a flash write (may answer NRC 0x78) |
| S3 (Session Timeout) | 5000 ms | Hold with 3E 80 so the transfer state survives between blocks |
| Inter-block delay | 0–50 ms | Gap between consecutive blocks |
ISO 14229-1 References
Standard: ISO 14229-1:2020, Section 14.4 — TransferData. Related: §14.2 RequestDownload (0x34), §14.3 RequestUpload (0x35), §14.5 RequestTransferExit (0x37).
Key points
- Request: 36 + blockSequenceCounter + data (download only)
- Response: 76 + blockSequenceCounter + data (upload only)
- The BSC starts at 0x01 and, in this simulator, wraps 0xFF → 0x01
- This simulator emits NRC 0x7F, 0x33, 0x24, 0x13, 0x73, 0x31, and (when voltage is configured) 0x92/0x93
- 0x71 (suspend), 0x72 (programming failure) and 0x78 (response pending) are ISO-defined real-ECU behaviors, not emitted here
Quick Reference & Best Practices
TransferData
the middleTransfer sequence
Request
Positive response
Tester puts data in the request; ECU acks with 76 BSC.
Tester sends only the BSC; ECU returns 76 BSC + data.
- Service ID
- 0x36
- Positive Response
- 0x76
- Role
- Moves the data blocks
- Required session
- PROGRAMMING or EXTENDED
- Security
- Must be unlocked (0x27)
- Precondition
- A 0x34/0x35 transfer must be active (else 0x24)
- Block counter
- Starts 0x01, wraps 0xFF → 0x01 (this sim)
- ISO ref
- ISO 14229-1:2020 §14.4