Skip to Content
UDS Simulator 2.0 Released

Docs baseline actions

Copy this page URLEdit page
Docs0x36 Transfer Data

Service Interaction Protocol

Transfer Data

0x36
Protocol Identifier
The TransferData service is used to transfer data blocks between the tester and ECU as part of a download or upload sequence initiated by RequestDownload (0x34) or RequestUpload (0x35).

Overview

ISO 14229-1

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)

ByteFieldValueDescription
0SID0x36Transfer Data
1blockSequenceCounter0x01-0xFFBlock number (starts at 0x01, wraps at 0xFF)
2-NtransferRequestParameterRecordVariableData block (max size from 0x34/0x35 response)

Response Format (Download)

ByteFieldValueDescription
0Response SID0x76Positive Response
1blockSequenceCounterEchoEcho of block number

Response Format (Upload)

ByteFieldValueDescription
0Response SID0x76Positive Response
1blockSequenceCounterEchoEcho of block number
2-NtransferResponseParameterRecordVariableData 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

tx_packet

Block 1

36 01 [512 bytes of firmware]

> First data block

rx_packet

Response

76 01

> Block 1 received

tx_packet

Block 2

36 02 [512 bytes of firmware]

> Second data block

rx_packet

Response

76 02

> Block 2 received

Continue until all data transferred

Upload Data Blocks

tx_packet

Request Block 1

36 01

> Request first block

rx_packet

Response

76 01 [512 bytes from ECU]

> Block 1 data

tx_packet

Request Block 2

36 02

> Request second block

rx_packet

Response

76 02 [512 bytes from ECU]

> Block 2 data

ECU sends data in response

Wrong Block Sequence

tx_packet

Block 3 (skipped 2)

36 03 [data]

> Out of sequence

rx_packet

Error Response

7F 36 73

> Wrong block sequence counter

Error
Blocks must be sent in order

No Active Transfer

tx_packet

Request

36 01 [data]

> Without 0x34/0x35 first

rx_packet

Error Response

7F 36 24

> Request sequence error

Error
Must call RequestDownload or RequestUpload first

UML Sequence Diagrams

Multiple Block Download

Download 2KB in 512-byte Blocks

12 steps
Tester
ECU

Anticipated Behavior

warning _entry

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.

info _entry

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)

NRCNameDescription
0x13Incorrect Message LengthBlock too large or missing data
0x24Request Sequence ErrorNo active download/upload (missing 0x34/0x35)
0x71Transfer Data SuspendedTransfer interrupted, must restart
0x72General Programming FailureFlash write error
0x73Wrong Block Sequence CounterOut-of-order block number
0x78Response PendingFlash programming in progress (NOT an error)