Skip to content
sprytnykPublic

About

Edit VIN and ISN, apply the IMMO bypass and fix checksums in BMW MS41/MS42/MS43 DME files. Handy for swapping a used DME into your E46, E39 or E36.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

MSCoder

Українська версія

AI-assisted

Edit VIN and ISN in BMW MS41/MS42/MS43 DME files. Handy for swapping a used DME into your E46, E39 or E36.

MSCoder replacing a VIN, converting a VIN to hex, and copying an ISN with the IMMO bypass

⚠️ DISCLAIMER: Modifying firmware carries risks, including the potential to brick your DME. Always create a backup of your original firmware before making any modifications. Use this tool at your own risk. I am not responsible for any damage.

Supported languages: 🇬🇧 English, 🇺🇦 Українська
Supported platforms: Linux, macOS, Windows

It can convert a VIN to hex bytes and back, replace the VIN in a DME file, copy the ISN between files, apply an IMMO bypass patch, and correct checksums.

Features

  • VIN Replacer (Alt+1): Replace VIN in MS41, MS42, and MS43 binary DME files
  • VIN Converter (Alt+2): Convert between VIN string and hex bytes
  • ISN Copier (Alt+3) copies the ISN (Immobilizer Sequence Number) between files of the same DME type, MS42 or MS43. It can also apply the IMMO bypass.
  • Checksum Corrector (Alt+4): Check and correct checksums in supported files
  • About (Alt+5): Application information and credits

Installation

Download pre-built binaries for different distributions from the Releases page.

On Linux, unpack mscoder-linux-x64.tar.gz and run ./mscoder.

On Windows, unpack mscoder-windows-x64.exe.zip and run mscoder.exe. It isn't code-signed, so SmartScreen may ask you to confirm the first start. Click More info, then Run anyway.

On macOS, pick macos-arm64 for Apple Silicon or macos-x64 for Intel, and drag MSCoder.app into Applications. The app isn't notarized, so macOS blocks it the first time. Try to open it, then go to System Settings, open Privacy & Security and click Open Anyway. Or run xattr -dr com.apple.quarantine /Applications/MSCoder.app.

Or run from source with uv. It picks Python 3.14 from .python-version:

uv sync
uv run python -m mscoder

Run the tests with make test. To run ruff and the tests before each commit, install the hooks once with uvx pre-commit install.

Compatibility

Supported Operations

  • VIN Editing: MS41, MS42, MS43 DME binary files
  • ISN Copying with IMMO Bypass: MS42, MS43 DME binary files

Supported ECU versions

MSCoder can apply the IMMO bypass to MS42 versions 0110C6 and 0110C7, and to MS43 version 430069.

MSCoder uses the same bypass bytes as the MS4X community patchlists for MS42 v1.7.1 and MS43 v2.9.2. Both include the DTC fix. MSCoder can finish a partial bypass, such as one that still needs the DTC fix. If it finds unexpected bytes at a patch address, it skips the bypass.

MS43X firmware has no immobiliser, so the ISN Copier hides the bypass option. I tested VIN editing on MS43X001, and it works the same way as on 430069 (MS43X custom firmware).

Checksums

The Checksum Corrector checks a file when you select it and shows the original and corrected values. If any checksums differ, you can save a corrected timestamped copy. If they are already correct, it does not save another file.

MSCoder fixes the boot, program and calibration checksums when it saves MS42 0110C6, MS43 430069 or MS43X001 firmware. I checked all three versions against MS4X Flasher. Every checksum matched.

The IMMO bypass changes bytes that the checksums cover. The VIN and ISN sit outside those ranges. The VIN starts at 0x3C4A on MS42 and 0x3C40 on MS43.

For MS42 0110C7, fix the checksums in MS4X Flasher after applying the bypass.

If you have 0110C7 firmware, email me. I'd like to see if MSCoder can fix its checksums.

File requirements

Use a full 512 KiB image for MS42 or MS43 and a full 256 KiB image for MS41. In the ISN Copier, select the DME type that matches both files. MSCoder blocks the copy if it recognizes a file from the other DME type.

Flashing requirements

Updating the VIN on MS41

On a flashable MS41, the factory VIN is in a protected part of the firmware. Desolder the flash chip and use a programmer to write the full firmware file with the new VIN. Then solder the chip back onto the board.

I flashed the firmware to the chip myself and confirmed it worked. Changing the VIN on MS41 does not require correcting the checksums.

Diolum's guide shows the process in photos. It's in French, and your browser can translate it. MS41 flash guide

Diolum's tool can read and flash MS41 firmware, read fault codes, and log live engine dataMS41 ECU Tool (I haven't tested it myself).

Flashing VIN and ISN changes on MS42 and MS43

Use boot mode to flash VIN and ISN changes on MS42 and MS43. After flashing, use INPA to sync the VIN and ISN with EWS. MS4X connection guide

Updated VIN

Syncing the VIN and ISN on MS43

Connect OBD2 cable, turn ignition to the 2nd position, and open INPA: INPA

Press Shift + F7, then choose "Engine > MS 43.0 for M54" MS43

You'll see the main menu: Tab

Press Shift + F6: EWS

Press F2, then click Ok: Reset

Press F1, then click Ok: Sync

Flashing the IMMO bypass

The bypass changes the program and calibration. Use Full Write in MS4X Flasher. Boot mode is optional for the bypass alone. Use it if the file also has VIN or ISN changes. With the bypass, the car can start with a VIN or ISN that doesn't match the EWS. MS4X Flasher

Tested Configurations

This tool has been tested and proven to work on real hardware:

  • Platform: BMW E46 with MS43 430069 on M54B30 engine
  • Tested combinations:
    • VIN + ISN
    • VIN + ISN + bypass
    • ISN + bypass

References

This project wouldn't exist without:

And it was inspired by E46 Temperature Gauge Hex Generator v1.0

License

MIT License - see LICENSE file for details.

The app icon, assets/icon.svg, is "Bmw" by Garuda Technology from SVG Repo, under its own MIT License; see assets/ICON-LICENSE.txt. BMW and the BMW logo are trademarks of BMW AG. MSCoder isn't made or endorsed by BMW.

The dropdown arrows and the check mark in assets/icons are from Phosphor Icons, under the MIT License; see assets/icons/LICENSE.txt.

About

Edit VIN and ISN, apply the IMMO bypass and fix checksums in BMW MS41/MS42/MS43 DME files. Handy for swapping a used DME into your E46, E39 or E36.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages