hauteknits      street racer

Blog 4, Working on the 9E60B BMW ECU 11/17/23

don't do this

It's been a while. Obviously, I'm a car guy. I ended up getting an N55 e chassis instead of an N54. Couldn't find one in my desired trim that hadn't been ran through. I've wished I've gone with the N54 for a while now, its way more tunable and there's a lot more knowledge about the software out there. I installed a WOTBox and the main issue is that the DME does NOT like misfires, which is pretty much what a 2step revlimiter does. I said "fuck it" and ignored it for a while, but then I remembered I'm in Computer Science.

I started out pretty blind. The N54 xdf (definitions file) is super well supported. So I looked at the tables for that and then tried to figure out how to translate that into the N55 xdf. The core of the issue is that the N54 uses a Siemens ECU, where as most if not all BMWs after it use a Bosch ECU; completely different. Some people on the forums told me I need to find 1) Funktionsrahmen, basically the entire technical documentation for the ECU specifically for your revision, and 2) an A2L, the definitions file used by BMW or at least damn near it. Long story short, no one has these for my ECU, a couple of sellers claim to have it, but there's nothing preventing someone from rehosting those files, so I'm on my own.

Through lots of searching, I found a (complete?) A2L for the BMW X5 xDrive35i, same motor and year as my car. The software is not identical though, that would make it too easy. The X5 is a 2EH0B where as mine/others are 9E60B/98G0B, not identical. However, its close enough, just like someone translating between the 2 revisions of the N55e, I should be able to do it as well.

Problem the first: BMW, not suprisingly, is a German company

Yeah, so BMW is German, and (presumably) so are their engineers; Bosch is also a German company; so not suprisingly everything is in German, which sucks as I don't speak German and that would make work considerably harder. First course of action was translating the definitons file. Thanks to node.js, and a $300 API credit from Google, piping the entire file through Google Translate was mostly a piece of cake. Had a couple of issues with some of the definitions were formatted differently but they weren't important definitions so I could safley ignore them. The definitions file was written 1-to-1 until a function/definition title was read in, it would then go through Google Translate and then be put back into the file.

Problem the second: Actually finding what I need

So yeah, I got the definitions so I just find the part that makes the engine turn off right? Well, no. There's over 28000 individual definitions in the file, and the raw binary is 4MB in size. And when the toggle is likely an 1 byte unsigned integer? Good luck. I did find a table though, not helping my cause but just proof that I can find a table, and then move it over.

So yeah, that's where I'm at, pour over the definitions until I find something promising, then look at my file in HxD until I find something I'm looking at.

Hopefully I have an update soon. -Hc 11/17/23