Skip to content
0xDevDavPublic

About

BMW EWS/DME ISN synchronization tool — DS2 protocol over K-Line

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EWSync

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.


What it does

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:

  1. Read ISN from DME — queries the DME via DS2 diagnostic protocol
  2. 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.

Requirements

  • Python 3.10+
  • A K-Line serial interface (USB-to-OBD K-Line adapter)
  • OBD-II access to the vehicle's diagnostic connector

Installation

git clone https://github.com/0xDevDav/EWSync.git
cd EWSync
pip install -r requirements.txt

Usage

python ewssync.py

Select your COM port, read, write, done.

Protocol Details

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

DS2 Frame Structure

[address] [length] [payload...] [checksum XOR]

The checksum is the XOR of all preceding bytes in the frame.

ISN Encoding

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

Compatibility

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)

License

MIT

About

BMW EWS/DME ISN synchronization tool — DS2 protocol over K-Line

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages