Blog · 2026-11-10

BMW CAN bus data format

Stefan Bogdanescu

Founder & Senior Architect

Decoding BMW Engine ECU Responses on the CAN Bus

Interfacing with a vehicle's Engine Control Unit (ECU) requires more than just sending bytes down the wire; it demands a precise understanding of the automotive diagnostic protocol, specifically UDS (ISO 14229-4). The logs provided in community discussions often highlight a common frustration: sending commands that appear syntactically correct but returning "NO DATA" or parsing responses that trigger <DATA ERROR flags. This usually stems from misinterpreting how the ECU structures its response frames or failing to account for sub-addressing and session management.

The specific scenario involves targeting a BMW 3 Series (2015) using an engine ECU log where 6F1 is identified as the query address and 612 as the response address. In CAN bus terminology, these are Extended Frame addresses if higher bits are set, though many OBD-II tools treat them as standard IDs for simplicity. The critical insight lies in how the UDS service 0x10 (ReadDTCInformation) constructs its response. Unlike a simple echo, the ECU does not merely return the fault code; it prefixes the data with sub-addresses and status bytes defined by the ISO 14229 standard.

When analyzing the log snippet:

6F1 12 04 18 02 FF FF
612 F1 10 17 58 07 4D FF 21 &lt;DATA ERROR

The request 12 04 18 02 FF FF targets Service ID 0x02 (ReadDataByIdentifier) with Data Identifier 0x1802. The response, however, starts with 612 F1. The byte F1 is the positive response code for Service 0x10 (ReadDTCInformation), but the subsequent bytes (17 58 07...) are often misinterpreted as raw data if the parser expects a specific format for 0x02. If the tool configured with AT SH 6F1 and AT CRA 612 is trying to parse this strictly as a continuation of the previous command without resetting the service context, it will fail. The ECU is responding correctly according to UDS rules, but the client application is likely expecting a direct byte-for-byte match that doesn't exist in automotive protocols.

A frequent pitfall when attempting to extract fault codes via terminal emulation like PuTTY or HyperTerminal is ignoring the Positive Response Code (0xF1 for 0x10 services) and expecting the data stream to begin immediately with the actual error code. In the example above, the response 612 F1 10... indicates that the ECU has acknowledged a ReadDTC request. The <DATA ERROR marker in the log suggests the receiving software rejected the frame because the length or content didn't match its internal state machine expectations.

To successfully retrieve DTCs, one must distinguish between reading data by identifier (0x2F) and reading by UDS service (0x10). The commands AT Z, AT SP 6, and AT SH configure the serial-to-CAN gateway or the specific hardware adapter (like a Vgate or ELM327) to operate in a specific mode. Setting SP 6 implies configuring for CAN FD or a specific baud rate protocol, but standard OBD-II tools often default to 0x10 for fault codes.

If you are debugging why the "NO DATA" response persists despite trying all combinations of the request frame (12 04..., 18 02...), consider that the ECU might require a specific sub-function or a different Data Identifier than assumed. In UDS, the first byte after the service ID often dictates the sub-address (e.g., 0x01 for normal response). If your tool is stripping this or misaligning the payload, the ECU might ignore the request entirely, returning no data rather than an error code.

The solution involves ensuring the parsing logic accounts for the UDS response structure: Positive Response Code (0xFx) followed by the Service Data Length and then the actual DTCs. For BMW ECUs specifically, some models require a specific session initialization (Service 0x10 with sub-address 0x01 to start a default session) before reading dynamic data like fault codes becomes valid. Without this handshake, the ECU may lock the request into a state that returns "NO DATA" because the data requested is currently inaccessible.

Understanding these protocol nuances prevents hours of futile debugging on terminal emulators. The hardware isn't broken; the abstraction layer between the raw CAN frames and the application logic is where the mismatch occurs. By aligning the client's expectations with the ISO 14229 standard, you can reliably extract the fault codes hidden within those hex dumps.