# WriteDataByIdentifier (0x2E)

> WriteDataByIdentifier (0x2E) writes a data record to an ECU by its two-byte data identifier (DID). The request 2E F1 98 followed by the data writes DID 0xF198, the positive response 6E F1 98 echoes the identifier. Writing changes ECU state, so most writable DIDs require the extended session and SecurityAccess. Which identifiers are writable, in which session, is a core thing to validate.

UDS WriteDataByIdentifier (0x2E) writes a data identifier (DID) to an ECU. The request and response bytes, which session it needs and what to validate.

Source: https://auto-st.com/glossary/write-data-by-identifier-0x2e · Updated: 2026-10-07

## What is WriteDataByIdentifier (0x2E)?

WriteDataByIdentifier writes a named data record into an ECU. The two bytes after the service ID are the data identifier (DID), and the rest of the request is the new data. The positive response echoes only the identifier, with no data.

A normal exchange:

| Direction | Bytes | Meaning |
|---|---|---|
| Request | `2E F1 98 01 02 03 04` | write DID 0xF198 with four bytes |
| Positive response | `6E F1 98` | write accepted |
| Negative response | `7F 2E 33` | securityAccessDenied |

Other typical negative responses are `7F 2E 31` (requestOutOfRange, DID not writable), `7F 2E 13` (incorrectMessageLengthOrInvalidFormat, data length wrong for the DID), `7F 2E 22` (conditionsNotCorrect) and `7F 2E 7F` (serviceNotSupportedInActiveSession).

## Where is it defined?

ISO 14229-1:2020 defines WriteDataByIdentifier (0x2E) in the Data transmission functional unit. The standard specifies the request as the SID, the two-byte identifier and the data record, the positive response as the SID plus 0x40 and the identifier, and the fixed data length per identifier. The access rules and the identifier list come from the OEM diagnostic description. On CAN the transport is ISO 15765-2.

## What it means in practice

Writing to a DID changes ECU state, so it is the service a careful test touches last. Which identifiers are writable, in which session and at which security level, is defined by the specification. In validation, engineers check:

- each writable DID is writable only in the intended session and after the intended unlock;
- a write to a read-only DID gives NRC 0x31, not a silent success;
- the data length is enforced: a short or long record gives NRC 0x13 and no partial write;
- the value reads back exactly as written with 0x22;
- conditions such as a running engine correctly produce conditionsNotCorrect.

We regularly see writable identification DIDs, serial numbers and fingerprints among them, that accept a write in the extended session without any SecurityAccess, which lets a record that should be fixed be overwritten.

## How AutoST tests it

Because writing is destructive, AutoST keeps write-probing (0x2E) off by default and asks for explicit confirmation before it runs. When enabled, it probes DID writes with wrong-length and write-back checks against the identifiers from your imported ODX, PDX or CDD file, records whether the ECU enforces the correct length and which session and security level each write requires, and never brute-forces unknown identifiers.

## FAQ

**How is 0x2E different from 0x22?**

ReadDataByIdentifier (0x22) returns the current value of a DID; WriteDataByIdentifier (0x2E) replaces it. 0x2E carries the new data in the request and changes ECU state, so it almost always needs a higher session and SecurityAccess than the matching read.

**Can one request write several DIDs?**

No. Unlike 0x22, WriteDataByIdentifier writes exactly one identifier per request: the SID, the two identifier bytes, then the data record. The ECU must know the fixed length of that DID to validate the request.

**What happens on a wrong length?**

If the data does not match the length the ECU expects for that DID, it answers with NRC 0x13 (incorrectMessageLengthOrInvalidFormat) and does not write. A correct implementation never writes a partial record.

## Sources

- [ISO 14229-1:2020 Road vehicles, Unified diagnostic services (UDS), Part 1: Application layer, Data transmission functional unit, WriteDataByIdentifier (0x2E)](https://www.iso.org/standard/72439.html)
- [ISO 15765-2 Road vehicles, Diagnostic communication over CAN (DoCAN), Part 2: Transport protocol and network layer services](https://www.iso.org/standard/84211.html)

## Related

- [DID (Data Identifier)](https://auto-st.com/glossary/did)
- [ReadDataByIdentifier (0x22)](https://auto-st.com/glossary/read-data-by-identifier-0x22)
- [UDS (Unified Diagnostic Services)](https://auto-st.com/glossary/uds)
- [Your ODX and CDD, turned into tests.](https://auto-st.com/did-routine-scanning)
- [Know every door into the ECU.](https://auto-st.com/uds-enumeration)
- [UDS Message Decoder](https://auto-st.com/tools/uds-message-decoder)

---
AutoST by Zyberum. Canonical page: https://auto-st.com/glossary/write-data-by-identifier-0x2e
