Adding / Updating your VIN & AIF with Tool32

So, you’ve just purchased a second hand DME / ECU and you want your own VIN coded to it right?

Well, luckily for you this is a very simple process using the rather awesome ‘Tool32’ program, which is provided as part of the BMW Standard Toolset.

First things first, you’ll need the following:

  1. A laptop with a working installation of INPA and Tool32
  2. An OBD2 cable that works with INPA and your E46 or E39
  3. Your VIN
  4. An E46 M3 or an E39 M5

Now you have the prerequisites in order plug your OBD2 cable into the car and fire up your laptop.

  1. Load up Tool32 (ToolSet 32)
  2. Click ‘File’ > ‘Load SGBD, Group File’ and browse to the ‘C:\Ediabas\ECU\12MSS54.PRG’ file and click ‘Open’


  1. In the ‘Jobs’ list double click ‘aif_lesen’. The results window should return a ‘Job_Status’ of ‘OKAY’ and the first VIN programmed into the DME will be displayed along with other AIF data


  1. In the ‘Arguments’ box type ‘2’ and double click ‘aif_lesen’ again. The results window should update, repeat the process of incrementing the number in the ‘Arguments’ box until you reach a number with a blank ‘AIF_FG_NR’ field.
  2. Make a note of the ‘AIF_ADRESSE_LOW’ number, you’ll need that shortly. In my case, slot ‘3’ was free and had an ‘AIF_ADRESSE_LOW’ of ‘7596’


  1. Using the Windows ‘Notepad’ construct the following string, replacing the values etc with your own:

The string is constructed in the following order:

AIF_ADRESS_LOW; VIN; Today Date; Software Number ; Authority Number; Assembly Number; Serial Number; Handler Number; AIF Programmed KM; AIF Program Number

So, you’ll have something like this:


The software number, authority number and assembly numbers should be labeled on the outside case of the DME, the fields after those are fairly unimportant so can be left as detailed in my string.


  1. Copy the constructed string into your clipboard by highlighting it and clicking the ‘Edit’ Menu and selecting ‘Copy’.
  2. Go back to Tool32 and scroll down the ‘Jobs’ list until you see ‘seed_key’, double click ‘seed_key’ and then paste your newly constructed string into the ‘Arguments’ box.


  1. Double click ‘aif_schreiben’ and ensure the ‘JOB_STATUS’ returns ‘OKAY’. If the status returns ‘Error’ or ‘Rejected’ double click ‘seed_key’ and retry ensuring you don’t click anything other than ‘aif_schreiben’.
  2. Once the report has responded ‘OKAY’ then close Tool32, you’re done!
  3. If you want to confirm the coding has worked, load up INPA, select ‘E46’ or ‘E39’ then ‘Engine’ then ‘MS S54 for S54 M3’ then select ‘Coding’. Your newly coded data should be displayed here!