Skip to content

EWS delete / immobilizer ​

EXPERIMENTAL — not verified on hardware

The code analysis below is solid, but the byte patch has not been tested on a running BMS46. A wrong flash can leave the ECU unable to start or brick it. The patch below has 7 sites and replaces the earlier 3-site version (see the warning in The patch). Only attempt this on a bench / swap ECU you can afford to lose, keep an untouched backup, and validate before putting it in a car. This patch modifies the program region, so it needs a full-flash write path — it is not a calibration-only change. See Flashing.

The BMS46 is immobilized by EWS3 (Elektronische Wegfahrsperre): at key-on the EWS control module and the DME exchange a rolling-code ISN (Individual Serial Number) over a dedicated K-line. If it doesn't match, the DME refuses to arm injection and ignition.

"EWS delete" makes the DME run regardless of that exchange — needed when an M43 is run on a bench or swapped into something without the matching EWS box.

How EWS works in the firmware ​

All addresses are ROM (full-dump) offsets in 01119700F000Q28G; ff8xxx are RAM. [verified] from the decompiled program unless noted.

The arming gate ​

Injection and ignition are armed by three channel-setup routines (FUN_0001A6E8, FUN_0001A76C — ignition banks; FUN_0001B6C8 — injection channel 1), plus the periodic injection dispatcher FUN_0001B7D6 (see The patch). Each setup routine arms its TPU output only when:

c
if ((ff8a40 & 1) != 0      /* engine-run permission */
 && (ff8682 & 0x80) != 0)  /* EWS released          */
    arm_channel();         /* FUN_0001863A(ch, 3)   */
  • ff8a40 & 1 — normal run/crank permission.
  • ff8682 & 0x80 — the EWS "released" bit. This is the single flag that the immobilizer comes down to. When it's clear, no fuel and no spark.

How the release bit is set ​

FUN_00028E08 decodes the EWS telegram captured on the K-line (ff8b20), reconstructs the received ISN into ff868a, and compares it to the reference ISN ff86a4. When they match (and a telegram was decoded, ff8682 & 0x40):

c
ff8682 |= 0x80;      /* released */
ff86ba  = ff86a4;    /* remember the synced ISN */

The reference ISN is a rolling code: each key cycle FUN_00029C6A advances it with ref = (0x3F64^0x0D0B)·0x100 + ff86ba·0xBBABCFEF + …, seeded from a boot constant at 0x3F64. A virgin DME (stored ISN = {0,1,2}) seeds the reference directly from that constant (FUN_0002DA24). The stored ISN lives in the protected block around ff95f0 / ff86a4 and is persisted via FUN_0002F9D0.

Faults ​

DTC indexDS2 codeTextSet when
0x280x8CSchnittstelle DME–EWStelegram missing / undecodable (FUN_00028E08, FUN_000298A8)
0x2C0x90Manipulationsschutz EWSISN mismatch / tamper (FUN_00028E08, FUN_000298A8)

See Fault codes for the index→DS2 mapping.

Why "just don't plug in the EWS" doesn't work ​

With no EWS module present, no telegram arrives, so FUN_00028E08 never sets ff8682 & 0x40 and never sets the release bit. The gate stays closed → the engine cranks but won't fire. That's the immobilizer doing its job, and it's why a delete has to change the firmware.

The patch ​

The delete makes every consumer of the release bit behave as if EWS had released, leaving the engine-run permission (ff8a40 & 1) intact. There are two kinds of gate.

1. Simple gates (ignition A/B, injection channel 1) ​

btst #0,(ff8a40).l     ; run permission
beq  skip
btst #7,(ff8682).l     ; EWS released  ← the immobilizer test
beq  skip              ← NOP this out
<arm channel>
skip:

2. The injection dispatcher FUN_0001B7D6 ​

FUN_0001B7D6 runs periodically and schedules both injection channels. It loads A4 = ff8682 and tests bit 7 through (A4) at four places. That is why a scan for the absolute address ff8682 didn't find them. It has two regimes:

  • Released (bit 7 set): it arms the channel when the phase probe FUN_00018674 returns 0, and a bne skips the "locked" block.
  • Locked (bit 7 clear): it runs a block that arms on the opposite phase result, and it can divert to FUN_0001BC48 (injection off) when ff980d & 0x80.

With only the simple gates patched, bit 7 stays clear, so the dispatcher stays locked. Injection then fires on the wrong or half phases and can be cut. Those are the classic cranks but won't fire, starts then cuts and one bank dead symptoms. The patch forces the released path: it NOPs the inverted beq and turns the bne re-test into an unconditional bra (opcode byte 66 → 60, same displacement).

Patch table ​

#ROM offsetInstructionStockPatchedGate
10x1A74Ebeq after btst #7,(ff8682)67 0E4E 71Ignition bank A (FUN_0001A6E8)
20x1A7D0beq after btst #7,(ff8682)67 0E4E 71Ignition bank B (FUN_0001A76C)
30x1B774beq after btst #7,(ff8682)67 1C4E 71Injection ch. 1 setup (FUN_0001B6C8)
40x1B7FAbeq after btst #7,(A4)67 0C4E 71Dispatcher ch. 1: released path
50x1B80Cbne after btst #7,(A4)66 2460 24Dispatcher ch. 1: skip locked / cut block
60x1B840beq after btst #7,(A4)67 0A4E 71Dispatcher ch. 0: released path
70x1B850bne after btst #7,(A4)66 2260 22Dispatcher ch. 0: skip locked / cut block

All seven sites are byte-identical in every known 01119700F000 dump (O2AG, P2AG, P2FG, Q22I, Q28G, Q2AG, Q2CG), so the patch is not tied to one calibration. It does not apply to 01119700EF00, whose program differs.

Earlier version of this page

Until 2026-11-29 this page and the XDF listed only patches 1–3. Those fix ignition, but they leave injection in the locked regime described above. If you flashed the 3-patch version, re-apply with all seven.

Alternative: patch the source (only with an EWS box present) ​

The release bit is set in exactly one place, the telegram decoder:

29684 cmp.l (ff86a4),D0     ; decoded ISN vs reference
2968A bne   296A8           ; mismatch → no release   (66 1C)
2968C ori.b #0x80,(ff8682)  ; RELEASE

NOPing 0x2968A (66 1C → 4E 71) releases on any decoded telegram. That reproduces the factory "released" flow everywhere and also stops DTC 0x2C. It does nothing without an EWS module, though: no telegram means the decoder never reaches the compare, and nothing else ever writes ff8682. Use it only for an EWS box that is present but unsynced.

Bench-test plan ​

  1. Flash patches 1–4 + 6 and fix the CRC. Crank. If it starts and then cuts, or one bank is dead, that confirms the locked-dispatch interaction.
  2. Add 5 + 7 and re-flash. Crank, idle for 5 minutes and do several rev/decel cycles to exercise the ff980d path. Check that both banks fire.
  3. Sanity check: pulling run permission must still prevent starting (the ff8a40 gate is intact).

After patching the program, the program CRC must be recomputed (the patched bytes are inside the CRC range 0x10000–0x3755F):

bash
python3 bms46_checksum.py patched.bin --fix

Residual DTCs ​

This patch makes the engine run; it does not silence the EWS monitor. The DME will still log 0x28 / 0x2C because it never sees a valid telegram. That's cosmetic for a standalone engine, but if you want them gone you'd also have to neutralise the FUN_000254CE(0x28,…) / FUN_000254CE(0x2C,…) calls — not included here.

XDF ​

The generated full XDF carries this as an XDFPATCH named [PATCH] EWS delete (EXPERIMENTAL), so TunerPro shows it as applied / virgin and can revert it (it stores the stock basedata). It is not in the partial/calibration XDF — the bytes are in the program region.

Safer alternatives ​

  • Align / sync the EWS to the DME with a diagnostic tool so the stored ISN matches — no firmware change, keeps the immobilizer.
  • EWS emulator: a small box that replies with the expected telegram. Keeps the firmware stock and the DTCs clear.
  • Delete only on a dedicated bench/standalone ECU, as above.