BMW EWS/DME ISN Synchronization Tool
Drop-in tool to read the ISN (Individual Serial Number) from a BMW DME and write it to the EWS immobilizer — no dealer software required.
Built for E39 and compatible E-series BMWs using the EWS3 immobilizer system.
When swapping a DME or EWS module, the ISN stored in both units must match or the car won't start. EWSync handles this in two clicks:
- Read ISN from DME — queries the DME via DS2 diagnostic protocol
- Write ISN to EWS — programs the extracted ISN into the EWS module
That's it. Turn off the ignition for 15 seconds and the car starts.
- Python 3.10+
- A K-Line serial interface (USB-to-OBD K-Line adapter)
- OBD-II access to the vehicle's diagnostic connector
git clone https://github.com/0xDevDav/EWSync.git
cd EWSync
pip install -r requirements.txtpython ewssync.pySelect your COM port, read, write, done.
| Parameter | Value |
|---|---|
| Transport | K-Line serial |
| Baud rate | 9600 |
| Frame format | 8E1 (8 data, even parity, 1 stop) |
| Protocol | BMW DS2 |
| DME address | 0x12 |
| EWS address | 0x44 |
[address] [length] [payload...] [checksum XOR]
The checksum is the XOR of all preceding bytes in the frame.
The DME stores the ISN as 4 BCD-encoded nibbles representing a decimal value. EWSync converts this to the 3-digit hex format expected by the EWS:
DME bytes [0x03, 0x05, 0x02, 0x01]
→ BCD nibbles "3521"
→ decimal 3521
→ hex "dc1"
→ written to EWS
Tested on:
- E39 (5-Series) with M52B28 / EWS3
Should work with any BMW using EWS3 and DS2 diagnostics over K-Line, including:
- E38 (7-Series)
- E39 (5-Series)
- E46 (3-Series)
- E53 (X5)
MIT