E39A Vin write by DID

E38 E92 and many others. Approximately 2007 and newer
Archimedes
Posts: 16
Joined: Thu Oct 30, 2025 1:02 am
cars: vw,mercedes,gm,ford

Re: E39A Vin write by DID

Post by Archimedes »

Ok so I just made a change to my code and now it works this is the line that was causing me problem..
You sent me this line and i noticed a difference...
My initial packet = 7E0 13 3B 90 47 4B 4B 52 32
Yours = 7E0 10 13 3B 90 47 4B 4B 52

why do you send the 0x10 first?

Anyways now it works!
Archimedes
Posts: 16
Joined: Thu Oct 30, 2025 1:02 am
cars: vw,mercedes,gm,ford

Re: E39A Vin write by DID

Post by Archimedes »

So even tho i get a positive response once the ecu is power cycled the Vin goes back to the old vin. After I write the vin then read it back its changed but then after power cycle it goes back to the original?
MPC001
Posts: 174
Joined: Sat May 05, 2018 11:41 am

Re: E39A Vin write by DID

Post by MPC001 »

Archimedes wrote: Fri Oct 31, 2025 2:03 pm So even tho i get a positive response once the ecu is power cycled the Vin goes back to the old vin. After I write the vin then read it back its changed but then after power cycle it goes back to the original?
Are you power cycling all power or only run/start power?

To get the ECM to write the VIN from RAM to NV memory/flash for long term retention, it is the run/start power that must be turned off for a minimum of 10 sec (15 safer), while the full-time power stays on.
ironduke
Posts: 820
Joined: Thu Feb 13, 2020 1:32 pm
cars: Mainly GM trucks, a Cruze and an Equinox for dailys..

Re: E39A Vin write by DID

Post by ironduke »

Archimedes wrote: Fri Oct 31, 2025 2:03 pm So even tho i get a positive response once the ecu is power cycled the Vin goes back to the old vin. After I write the vin then read it back its changed but then after power cycle it goes back to the original?
As MPC001 stated you need to turn the ignition off to the ecm and keep battery power connected to give the ecm time to write the change to the eeprom section of the flash..

As far as the 10 being there that's the start of a multiline message.
there's documentation probably more accurate than I but..
After the ecu header is the length byte. That is how many bytes your sending or receiving that need to be paid attention to. There are 8 bytes total that can be sent but the 1st one is the length byte.
if it's 02 then your sending 2 bytes to the ecm that the ecm will look at.. anything after 2 bytes will be ignored. as in 7E8 02 27 01
If you need to read or send more than 7 bytes than you need to do it with a multiline message.
Multilines ALWAYS start with a 10 command. then the next line starts with 21, then 22, then 23, all the way to 2f, then it starts at 20, then 21, so on..
the number AFTER the 10 is the number of bytes your sending that the ecm needs to pay attention to.
7E8 10 13 means it's going to be a multiline message and 13 is the number of bytes in total.. 0x13 is 19 bytes.. 17 bytes for the vin and the 3B 90 write command preceding the vin..

That written understandably? Sometimes my grammar is not so easy to read/understand.
Archimedes
Posts: 16
Joined: Thu Oct 30, 2025 1:02 am
cars: vw,mercedes,gm,ford

Re: E39A Vin write by DID

Post by Archimedes »

Ironduke thats a perfect explanation and I totally understand it. After I reworked my bench harness with a switch for ignition. I power cycled the ECU for 45 seconds and turned it back on and all is well. Thanks so much for your help with this. As to what I am trying to achieve is I have an equinox with a 2.4 that had secondary air injection installed and a replacement engine was put in without it so my plan is to rewrite the vin on the ecu and install it into the car as gm flashing with sps would be the wrong flash file for the vin. I read your earlier post about the pincode and all that part and im not really sure what i have to do yet for that.
ironduke
Posts: 820
Joined: Thu Feb 13, 2020 1:32 pm
cars: Mainly GM trucks, a Cruze and an Equinox for dailys..

Re: E39A Vin write by DID

Post by ironduke »

If you have access to sps you can just write to the ecm using a vin that doesn't have the air system. It will likely fail right at the end trying to write security but that's kinda a good thing since it won't overwrite the immo that's programmed to the car. You might have to write the correct vin in afterwards if that does get changed..
Archimedes
Posts: 16
Joined: Thu Oct 30, 2025 1:02 am
cars: vw,mercedes,gm,ford

Re: E39A Vin write by DID

Post by Archimedes »

Thats kind of what i was thinking since i have the ecm from the car the donor engine came from i was just going to change the vin. Is there any other immobilizer data that i need to write to the ecu or read from the ecu thats synchronized with the car already?
ironduke
Posts: 820
Joined: Thu Feb 13, 2020 1:32 pm
cars: Mainly GM trucks, a Cruze and an Equinox for dailys..

Re: E39A Vin write by DID

Post by ironduke »

My experience is that an e39 or e39a is going to fail writing the vin and fail writing the immo code so this should be super easy if you have access to sps2..

start tlc and do NOT connect to a J2534 device.. instead close out the J2534 connect popup and type/paste the vin you want the files from into the vehicle selection box and let it build the vehicle. If it doesn't build the vehicle don't sweat it too bad, some vins don't.
Click next or continue on the lower right.. Now click the connect icon and connect or start sps2 and it'll prompt to connect..
When it does connect it should come up with a popup screen telling you about a vin mismatch.. You want to select override to keep the vin you typed/pasted in.

Now program the ECM and it will program it with the OS and calibration files from the donor vin. At the end of programming it will try to write the vin but likely fail and it will definitely fail at writing the immo code since it's derived from the vin and it has to be unlocked first.. Even if it manages to write the vin into the ecm you know how to put that back.. clear codes in the car and you should be good..
User avatar
pman92
Posts: 667
Joined: Thu May 03, 2012 12:50 pm
Location: Castlemaine, Vic

Re: E39A Vin write by DID

Post by pman92 »

ironduke wrote: Sat Nov 01, 2025 4:09 pmAt the end of programming it will try to write the vin but likely fail and it will definitely fail at writing the immo code since it's derived from the vin and it has to be unlocked first..
Side question:
How do you unlock and write the correct VIN and immo code to a second hand E39A that's already linked to the wrecked vehicle it came from?

I started looking at it right before I finished work Friday. Hadn't connected to vehicle yet, but I was manually typing in the correct VIN for the vehicle into vehicle selection and TLC/SPS didn't recognise it. I changed region to Australia and was still getting the same thing. Then I packed up and went home.
ironduke
Posts: 820
Joined: Thu Feb 13, 2020 1:32 pm
cars: Mainly GM trucks, a Cruze and an Equinox for dailys..

Re: E39A Vin write by DID

Post by ironduke »

pman92 wrote: Sat Nov 01, 2025 9:19 pm
ironduke wrote: Sat Nov 01, 2025 4:09 pmAt the end of programming it will try to write the vin but likely fail and it will definitely fail at writing the immo code since it's derived from the vin and it has to be unlocked first..
Side question:
How do you unlock and write the correct VIN and immo code to a second hand E39A that's already linked to the wrecked vehicle it came from?

I started looking at it right before I finished work Friday. Hadn't connected to vehicle yet, but I was manually typing in the correct VIN for the vehicle into vehicle selection and TLC/SPS didn't recognise it. I changed region to Australia and was still getting the same thing. Then I packed up and went home.
Haven't had to do it in a long time the way your wanting to, I use IO prog or other programs to write the eeprom section of the flash to just write the vin and immo as needed.. The vin writing you can already do, the immo changing is a lot more work.
for pincode you unlock with seed and key, then sent the current immo code and unlock it.. Then wait 12 minutes and reset it, or reset it and then wait 12 minutes, You can poll the timer countdown with a mode 22 request I think, then after the timer you can write a new pincode.. You need the pincode it currently has, then you need to know the pincode you want programmed into it..
I will read the flash of the ecm or bcm of the vehicle I am setting it up to, or I'll usually just clear it out and virginize the ecm and use sps2 to do a theft learn as it's easier in the long run..

What do you mean it wasn't recognizing the vin? in the first screen where your selecting the vehicle? If it's not recognized there try clicking next on the lower right.. It doesn't always pull the vehicle there but usually on the main tlc or sps2 screen it'll get the vehicle..

btw.. I think t he cheapest solution for complete read and write capability for the e39a is the ulink-nt.. Under $100, I don't think anything can beat that.. No fighting with unlocks, trying to find out immo codes, etc.. Easy cloning..
https://www.usbjtag.com/