Datalog Measuring Oil Level through MHD

Anon1

Lurker
Apr 13, 2019
10
18
0
Ride
2013 135i DCT
Looks like the N54 folks have found a way to get the engine OIL level displayed in MHD and we should do the same for N55.

See here for more details, https://www.spoolstreet.com/threads/measuring-oil-level-through-mhd.9329/

I think the approach for this is:
- Find the routine for oil measurement
- Find the name of the of the oil level value
- Find that address in the 98G0B/9E60B/etc by using the closest damos
- Define the custom UserChannels.xml

I think I may have found the routine/value
Oil_niveau
" lniveau Level vom NS"
UBYTE
h_q1_mm
1
100
0.00
255.0

FORMAT "%5.1"


1709917641247.png
 

houtan

Lieutenant
Nov 2, 2017
629
312
0
Ride
135i N55 DCT; PS2
Thanks for starting the thread. This is the xml language for the n54:

<ActualValue ReqBlock="D9,5E" Size="1" DataA="0.29296875" DataB="0.0" Prefix="C0" Units="mm" RoundingDigits="2">
<Text xml:lang="en">$ Oil Level</Text>

So we need to find the ReqBlock info?
 

houtan

Lieutenant
Nov 2, 2017
629
312
0
Ride
135i N55 DCT; PS2
File name should be: 98G0B_UserChannels.xml

This goes in the MHD folder where you save customs maps or where your data logging folder is.

This is the format that I have for the xml file:

<?xml version="1.0" standalone="yes"?>
<ActualValues>
<ActualValue ReqBlock="D9,5E" Size="1" DataA="0.29296875" DataB="0.0" Prefix="C0" Units="mm" RoundingDigits="2">
<Text xml:lang="en">$ Oil Level</Text>
</ActualValue>
</ActualValues>
 

wheela

Captain
Jun 4, 2021
1,172
661
0
Twin Cities, MN
Ride
2015 e84 X1 35i Msport
File name should be: 98G0B_UserChannels.xml

This goes in the MHD folder where you save customs maps or where your data logging folder is.

This is the format that I have for the xml file:

<?xml version="1.0" standalone="yes"?>
<ActualValues>
<ActualValue ReqBlock="D9,5E" Size="1" DataA="0.29296875" DataB="0.0" Prefix="C0" Units="mm" RoundingDigits="2">
<Text xml:lang="en">$ Oil Level</Text>
</ActualValue>
</ActualValues>
Wow, does this mean you found it already? I'm 9e60b, so guessing addresses will be different for me?
 

fstbtstr

Lurker
Apr 14, 2024
24
19
0
Don't have an "Oil_niveau" RAM address, but how would you convert a RAM address you want to log to "ReqBlock" which doesn't look like an address?
 

houtan

Lieutenant
Nov 2, 2017
629
312
0
Ride
135i N55 DCT; PS2
Anyhow, this is my current guess where Oil_niveau lives in 98G0B RAM: 0xC0002089. Now if somebody could tell how to get that into ReqBlock, than it can be tested either by me or somebody else.
Thanks! Maybe @carabuser can help us out?
 

carabuser

Lieutenant
Oct 2, 2019
894
1
801
0
UK
Ride
Z4 35i & 335i
<?xml version="1.0" standalone="yes"?>
<ActualValues>
<ActualValue ReqBlock="20,89" Size="1" DataA="0.29296875" DataB="0.0" Prefix="C0" Units="mm" RoundingDigits="2">
<Text xml:lang="en">$ Oil Level</Text>
</ActualValue>
</ActualValues>

Just as simple as putting the last 4 digits of the RAM address in the req block.
 

houtan

Lieutenant
Nov 2, 2017
629
312
0
Ride
135i N55 DCT; PS2
<?xml version="1.0" standalone="yes"?>
<ActualValues>
<ActualValue ReqBlock="20,89" Size="1" DataA="0.29296875" DataB="0.0" Prefix="C0" Units="mm" RoundingDigits="2">
<Text xml:lang="en">$ Oil Level</Text>
</ActualValue>
</ActualValues>

Just as simple as putting the last 4 digits of the RAM address in the req block.
Thank you and @fstbtstr. I will try this out later today.
 
  • Like
Reactions: fstbtstr and wheela

fstbtstr

Lurker
Apr 14, 2024
24
19
0
Thank you and @fstbtstr. I will try this out later today.
no problem, let's see how it works.
As for the custom logging channel definitions, what does Prefix do? There're multiple RAM sections in both N54 and N55 DMEs such as 0xCXXXXXXX and 0xDXXXXXXX, and the last 4 address digits are not enough to define the actual address unambiguously. Do I understand it correctly that Prefix "C0" actually indicates if the address is in, say, 0xC0XXXXXX region?
 

houtan

Lieutenant
Nov 2, 2017
629
312
0
Ride
135i N55 DCT; PS2
@carabuser, @fstbtstr,

There is some progress. The parameter oil level shows up now and doesn’t freeze up the ability to log.

However, the oil height output seems to be wrong. It stays at 5.27 mm. It should read in the 70s on my car right now.

Any ideas on what would cause this?

Screenshot attached.
IMG_0097.png
 
  • Like
Reactions: wheela

fstbtstr

Lurker
Apr 14, 2024
24
19
0
First off, do you have 98G0B ROM? Second, I am not entirely sure that oil level height conversion is the same between the N54 and N55. Although conversion probably should be the same since it's a byte-sized value as well with the same(?) range.
Does the oil level reading change at all? Is this the reading before or after CIC/cluster oil level became available?
I should be able to log my 98G0B next week and maybe try to look into 96*** DME, but don't really have time to do it this weekend
P.S. eyeballing 9E60*, seems like the address is 0xD00024E0, but this is very tentative. I wonder if Prefix will have to change to D0 instead of C0.
 
Last edited:
  • Love
  • Like
Reactions: wheela and Anon1

houtan

Lieutenant
Nov 2, 2017
629
312
0
Ride
135i N55 DCT; PS2
Yeah I am 98g0b.

You know what, I do not wait for oil level measurement to show up on the CIC. I will try again and wait for the CIC to get a read out
 
  • Like
Reactions: fstbtstr

fstbtstr

Lurker
Apr 14, 2024
24
19
0
Yeah I am 98g0b.

You know what, I do not wait for oil level measurement to show up on the CIC. I will try again and wait for the CIC to get a read out
We'll need to understand what ram address MHD is actually requesting, as I said, there're a few. It is possible it's reading something from DXXX XXXX range. Or I'm just wrong. I do see that it doesn't get set until some conditions are met, don't quite understand what they are.
Anyhow, my guess for 9e6 is 0xc000230e now
 
  • Like
Reactions: houtan

carabuser

Lieutenant
Oct 2, 2019
894
1
801
0
UK
Ride
Z4 35i & 335i
no problem, let's see how it works.
As for the custom logging channel definitions, what does Prefix do? There're multiple RAM sections in both N54 and N55 DMEs such as 0xCXXXXXXX and 0xDXXXXXXX, and the last 4 address digits are not enough to define the actual address unambiguously. Do I understand it correctly that Prefix "C0" actually indicates if the address is in, say, 0xC0XXXXXX region?
You are correct but the RAM only goes up to ffff.
 
  • Like
Reactions: houtan

houtan

Lieutenant
Nov 2, 2017
629
312
0
Ride
135i N55 DCT; PS2
Just verified. After the cic got its oil level readout, MHD still said 5.27
 

fstbtstr

Lurker
Apr 14, 2024
24
19
0
Just verified. After the cic got its oil level readout, MHD still said 5.27
thanks! I'll log it next week, let's see if i get the same value or perhaps there's a scaling issue, too.
P.S. on another thought, it's not clear what "height" Oil_niveau is actually tracking. It could be the height from the top of the sensor down to the oil level. In that case, your Oil_niveau (without applying conversion) would be 18mm indicating full oil level. Is that the case - your oil level is at 100%? We might actually be interested in another var like ozniv ("Ölniveau ungefiltert in [mm]") at d00031a3, and that would not need any conversion. (Prefix D0, ReqBlock 31,A3)?
 
Last edited:
  • Like
Reactions: wheela

houtan

Lieutenant
Nov 2, 2017
629
312
0
Ride
135i N55 DCT; PS2
Sounds good.

I know when I measure my oil level with my foxtool OBD scanner, my oil level readout is 73.xx mm, which is about one quart over fill. So I was expecting to see a similar value in MHD.