Please make sure you read Rules! and DO NOT upload/post any illegal softwares or Pirated Material , Thank you for understanding :)
  1. CarLabImmo

  2. AUTO-CHIPS

  3. Ecu-Service



Odometer Algorithms Explained For Studies
23-05-2016, 09:36 AM, (This post was last modified: 03-09-2018, 01:09 AM by volavka.)
Post: #1
0Dash  Odometer Algorithms Explained For Studies
This thread is for posting algorithms ONLY! Do NOT post in this thread with requests or for help, those posts will be removed.



I will add a new one from time to time, stay tuned. Feel free to add your own.

I'll start with one of the easiest ones, which can be done on paper in minutes. You can also use a hex calculator.

Denso algorithm:

The location of the main mileage varies, as this algo can have 4, 9, or 49 places for single digits but they are always in the top lines. The main mileage will always end with an F bit regardless (except for files with only 4 singles), and easier to do any new calculations to end in 00.

Each 80FF is a single Km (or Mi), when the singles string, 4,9, or 49 is full it is re-writen to all ff ff and the main mileage will increment 5, 10 or 50 respectively. If the singles are showing as FF80, the file is byte swapped.

Main mileage remember this table (F5 to F0 are never used):

Hex: FF FE FD FC FB FA F9 F8 F7 F6
Dec: 00 01 02 03 04 05 06 07 08 09

To decipher the mileage find the mileage string and read it inverted (backwards), use the above table to convert it to decimal or use a hex calculator and xor with FFFFFFFF. Then add the single digits.

Original file with 156799 Km:

0000: 80 FF 80 FF 80 FF 80 FF 80 FF 80 FF 80 FF 80 FF
0010: 80 FF 6F 98 EA FF 6F 98 EA FF 6F 98 EA FF FF FF

Hex inverted: FF EA 98 6F
Dec or xored: 00 15 67 90
Add single digits............09
Total mileage: 156799

To go the other way, enter mileage into hex calculator and xor with FFFFFFFF, or use the table above. Example:

New mileage: 125000 hex = FF ED AF FF inverted FF AF ED FF repeated 3 times so your mileage string is FF AF ED FF FF AF ED FF FF AF ED FF

0000: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
0010: FF FF FF AF ED FF FF AF ED FF FF AF ED FF FF FF

Hope this was understandable and helps a few. wink2

If someone took the time to help you, the least you can do is take a few seconds and press two buttons! 

Thanks [Image: tyl_add.png] + [Image: postbit_reputation.gif] reputation.


Reputation: +24 - 23Andi23 [+1] , Marcos [+1] , ROD-BENDERS [+1] , bram380 [+1] , daxxer [+1] , ruben_17non [+1] , titoun [+1] , Diagnostix [+1] , zmann [+1] , dragon100 [+1] , takis [+1] , CHIKODIAG [+1] , obdstart [+1] , atis [+1] , barto39 [+1] , BMWS1000RR [+1] , salliemohamed [+1] , autohaus [+1] , fab [+1] , PhilipArt [+1] , McMihai [+1] , Tech206 [+1] , tyrystor [+1] , amps [+1]
Quote this message in a reply
[+] 57 users say Thank You to Clusters for this post
23-05-2016, 19:38 PM,
Post: #2
RE: Dash Algorithms Explained
Noted for Denso cluster.
Thank you master.
bow

I try use windows calculator (Hex & Dword)
mileage 64800 km:
   

Select option "NOT":
   

Then:
FF F9 B7 FF inverted FF B7 F9 FF

Is it correct?
Reputation: +1 - ROD-BENDERS [+1]
Quote this message in a reply
[+] 12 users say Thank You to bram380 for this post
23-05-2016, 19:46 PM,
Post: #3
RE: Dash Algorithms Explained
Not works in Dword as well, that is correct. thumbsup

Didn't want to throw too much in there to confuse things. wink

If someone took the time to help you, the least you can do is take a few seconds and press two buttons! 

Thanks [Image: tyl_add.png] + [Image: postbit_reputation.gif] reputation.


Reputation: +2 - daxxer [+1] , zmann [+1]
Quote this message in a reply
[+] 13 users say Thank You to Clusters for this post
23-05-2016, 21:49 PM,
Post: #4
RE: Dash Algorithms Explained
Todays contribution, a couple of Fiat algorithms. hi
------------------------------------------------------------------------
2015 Fiat 500X 24c32

KM is on the first line 0x08-0x09 inverted, xor with FFFF on 0x0C-0x0D

10000 Km > hex 2710 inverted 10 27 xor EF D8

0x00: xx xx xx xx xx xx xx xx 10 27 00 00 EF D8 FF FF

If dash in miles, convert to KM to calculate.
Haven't seen one over that yet, but over 65535 and 0x0a will increment and the crc will change.
--------------------------------------------------------------------------
1998 Fiat Coupe 24C02

Mileage is times ten convert to hex.

124,000.0 > hex = 12 EB C0

0010: 8F 70 8F 12 ED 12 EB 14 EB C0 3F C0 00 FF 00 FF

Notice the bytes are posted twice, with the xor in between.
12 xor = ED
EB xor = 14
C0 xor = 3F

If someone took the time to help you, the least you can do is take a few seconds and press two buttons! 

Thanks [Image: tyl_add.png] + [Image: postbit_reputation.gif] reputation.


Reputation: +8 - 23Andi23 [+1] , bram380 [+1] , Marcos [+1] , ROD-BENDERS [+1] , volavka [+2] , Griff [+1] , Bernie [+1]
Quote this message in a reply
[+] 21 users say Thank You to Clusters for this post
23-05-2016, 22:58 PM,
Post: #5
RE: Dash Algorithms Explained
More Toyota algorithms. Yes I'm bored. rolling
---------------------------------------------------------------
Early Toyota Example 2008 LandCruiser S93A86, Prado 93C66 and many more.

99993 Km:

0000: fa 16 fa 16 fa 16 fa 16 fa 16 fa 16 fa 16 fa 16
0010: fa 16 fa 16 fa 16 fa 16 fa 16 fa 16 fa 16 fa 16
0020: f9 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0040: 00 00 ff ff xx xx xx xx xx xx xx xx xx xx xx xx

If the lsb is even (fa 16), the compliment bytes will be 00, if it is odd (f9 16) the compliment bytes will be ff ff. The number of each has to match or it will freeze. In this example there are 16 even bytes and one odd, thus the 16 instances of 00 00 and one of ff ff.

Inverted to decimal times 17 gives rough calculation
16 FA > 5882 X 17 = 99994
Exact calculation is:

16 fa > 5882 X 16 = 94112
16 f9 > 5881 X 01 = 05881
Add both together = 99993

You can make the mileage bytes all the same, as long as the compliment bytes match, 99994 would be 17 instances of fa 16 from 0000-0021 and 17 of 00 00 from 0022-0043.

-------------------------------------------------------

Late Toyota Example 2016 LandCruiser TSSOP 93C86

999 Km:

0000: 28 00 28 00 28 00 28 00 28 00 28 00 28 00 28 00
0010: 28 00 28 00 28 00 28 00 28 00 28 00 28 00 28 00
0020: 28 00 28 00 28 00 28 00 28 00 28 00 28 00 28 00
0030: 27 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0060: 00 00 ff ff xx xx xx xx xx xx xx xx xx xx xx xx

If the lsb is even (28 00), the compliment bytes will be 00, if it is odd (27 00) the compliment bytes will be ff ff. The number of each has to match or it will freeze. In this example there are 24 even bytes and one odd, thus the 24 instances of 00 00 and one of ff ff.

Inverted to decimal times 25 gives rough calculation
00 28 > 40 X 25 = 1000

Exact calculation is:

00 28 > 40 X 24 = 960
00 27 > 39 X 01 = 039
Added together = 999

You can make the mileage bytes all the same, as long as the compliment bytes match, 1000 would be 25 instances of 28 00 from 0000-0031 and 25 of 00 00 from 0032-0063.

If someone took the time to help you, the least you can do is take a few seconds and press two buttons! 

Thanks [Image: tyl_add.png] + [Image: postbit_reputation.gif] reputation.


Reputation: +7 - Marcos [+1] , 23Andi23 [+1] , ROD-BENDERS [+1] , Autokent [+1] , eliaselias [+1] , volavka [+2]
Quote this message in a reply
[+] 18 users say Thank You to Clusters for this post
24-05-2016, 10:53 AM, (This post was last modified: 25-04-2017, 08:49 AM by Clusters.)
Post: #6
RE: Dash Algorithms Explained
OK, here's a real bugger to do manually, but can be done. thinking

Seimens algorithm used in many dashes in different locations but usually at the top. Some files with this algorithm use X16 multiplier, so it's important to calculate the old mileage to verify. Also some use just the four strings, others are written twice like the example.

This example is for a 2010 Renault Latitude 24c16.

87104Km

0000: xx xx xx xx xx xx 5d f5 bb ea 77 d5 ef aa df 55
0010: be ab 7d 57 fa ae f5 5d ea bb d5 77 aa ef 55 df
0020: ab be 57 7d ae fa 5d f5 bb ea 77 d5 ef aa df 55
0030: be ab 7d 57 fa ae f5 5d ea bb d5 77 aa ef 55 df
0040: ab be 57 7d ae fa

The mileage is in the first two bytes 5d f5, inverted, xored, to dec, X32.

5df5 > f55d xor = aa2 = 2722 dec X 32 = 87104

Next two bytes = x 2 of first two in hex + overflow.
Next two bytes = x 2 of second two + overflow.
Next two bytes = x 2 of third two + overflow.

Overflow is when there is a 5 bit answer, add the first digit to the last four bits. Ex: 177d4 becomes 77d5.

5df5 x 2 = bbea x 2 = 177d4 = 77d5 x 2 = efaa
String 1. 5df5 bbea 77d5 efaa

Then shift first bit to last on byte pairs.
String 2. df55 beab 7d57 faae

Next string shift string 2 the same.
String 3. f55d eabb d577 aaef

Last string shift string 3 the same.
String 4. 55df abbe 577d aefa

Strings are repeated twice in this file.

Enjoy. biggrin

EDIT: To simplify the calculation once you have the first WORD.

Set calculator to WORD, enter the first WORD then click ROL to get the second WORD, click ROL again for the third, and so on till you fill two lines. (16 WORDS)

If someone took the time to help you, the least you can do is take a few seconds and press two buttons! 

Thanks [Image: tyl_add.png] + [Image: postbit_reputation.gif] reputation.


Reputation: +4 - ROD-BENDERS [+1] , 23Andi23 [+1] , volavka [+2]
Quote this message in a reply
[+] 18 users say Thank You to Clusters for this post
25-05-2016, 08:03 AM,
Post: #7
RE: Dash Algorithms Explained
Today's addition, Opel Corsa D 35080. Calculate in Km, if file is in Miles convert to Km first.

104500 Km:

b1 = byte 1, b2= byte 2, b3 = byte 3, b4 = byte 4, x1 = xor 1, x2 = xor 2

......... b1 b2
0000: 01 8e 01 8e 01 8e 01 8e 01 8e 01 8e 01 8e 01 8e
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0020: 5b a9 a2 c8 5b a9 a2 c8 5b a9 a2 c8 5b a9 a2 c8
0030: 5b a9 a2 c8 5b a9 a2 c8 5b a9 a2 c8 5b a9 a2 c8
......... x1 x2 b3 b4

Mileage is b1,b2,b3,b4 to decimal / 250

018e a2c8 > dec = 26125000 / 250 = 104500

x1x2 = b1b2 + b3b4 xored with ffff

018e + a2c8 = a456 xor = 5ba9

To calculate a new mileage, enter Km in decimal, multiply by 250, convert to hex gives you the mileage bytes b1,b2,b3,b4 then calculate the xor value as above.

Hope this clear enough. There may be a better way but this how I calculate them. idea

If someone took the time to help you, the least you can do is take a few seconds and press two buttons! 

Thanks [Image: tyl_add.png] + [Image: postbit_reputation.gif] reputation.


Reputation: +3 - Marcos [+1] , 23Andi23 [+1] , ROD-BENDERS [+1]
Quote this message in a reply
[+] 18 users say Thank You to Clusters for this post
26-05-2016, 01:48 AM,
Post: #8
RE: Dash Algorithms Explained
Pugeot 307 Dash and BSI
-----------------------------------------------------
Dash 95020:

00b0: 40 42 0f 6e 40 42 0f 6e 40 42 0f 6e 40 42 0f 6e

Mileage X 10 to hex inverted = first three bytes. Last byte is xor of the first three added together. Repeated four times.

40 42 0f inverted 0f 42 40 to dec = 100,000.0
40 + 42 + 0f = 91 xor 6e
-------------------------------------------------------
BSI 95128:

01d0: xx xx xx xx xx xx xx xx b0 bd 40 42 0f 00 xx xx
01e0: b0 bd 40 42 0f 00 xx xx b0 bd 40 42 0f 00 xx xx

Mileage X 10 to hex inverted = last four bytes. First two bytes xor of the mileage string. Repeated three times.

40 42 0f 00 inverted 00 0f 42 40 to dec = 100,000.0
4042 + 0f00 = 4f42 xor b0bd
---------------------------------------------------------
Too easy to rely on software and scripts for these, but learning them manually helps you when you find a file that's not in your software. A lot of times the offset changes, then scripts are useless. thinking

If someone took the time to help you, the least you can do is take a few seconds and press two buttons! 

Thanks [Image: tyl_add.png] + [Image: postbit_reputation.gif] reputation.


Reputation: +5 - 23Andi23 [+1] , Marcos [+1] , ROD-BENDERS [+1] , ruben_17non [+1] , daxxer [+1]
Quote this message in a reply
[+] 16 users say Thank You to Clusters for this post
12-06-2016, 16:06 PM,
Post: #9
RE: Dash Algorithms Explained
Interesting thread biggrin
i look now into my W639 EZS/EIS because i need to itwasntme repair itwasntme my km value idea
normal steps by other Mbenz erase Istrument Cluster to 0 km and change EZS/EIS to valid number
after put both units back to the car and the IC learn automaticaly from EZS/EIS or needed only learn manualy using Star diagnostic...
but i see on Threads and posts, when by W639 is the steps turned... put 0 km to EZS/EIS and the right km value to IC and after puts both units back to the car, the learning proces do it automaticaly...
i look now in EIS/EZS dump from the first MCU HC908 with R1 mark what there for content...itwasntme

EZS/EIS part number: A639.545.05.08

...very very easy biggrin

on adress 0030h: 00 00 00 00 04 82 76 70 FF D0 70 FF D0 70 FF D0

048276 is serial number of my C3 mux multiplexer tauri one footmark who was there as latest under
and 70FFD0h = in DEC 7405520, my real km status is 740.552 km biggrin
then need only convert HEX to DEC / 10 = real km value biggrin
i think more easy it can't to be fail there is nothing hard to calculate shake

»» Always use ---> [Image: postbit_reputation.gif] and  [Image: tyl_add.png]--->  if my post was helpful... ««
 
 
Reputation: +3 - Clusters [+1] , ROD-BENDERS [+1] , atis [+1]
Quote this message in a reply
[+] 14 users say Thank You to daxxer for this post
13-06-2016, 08:42 AM,
Post: #10
RE: Dash Algorithms Explained
Have yet other W639 dump from EZS/EIS but different part number

A639.545.01.08

there are the km value but at different adress...

00000020h: 69 D8 53 90 FF EA 07 32 5F 05 A5 00 88 34 00 1B
00000030h: CE 78 1B CE 78 1B CE 78 FF FF FF FF FF FF A4 AA

but the coding is the same HEX value 1BCE78 = DEC value 1822328 /10 = 182.232,8 km idea

»» Always use ---> [Image: postbit_reputation.gif] and  [Image: tyl_add.png]--->  if my post was helpful... ««
 
 
Reputation: +3 - Clusters [+1] , 23Andi23 [+1] , ROD-BENDERS [+1]
Quote this message in a reply
[+] 11 users say Thank You to daxxer for this post


Possibly Related Threads...
Thread Author Replies Views Last Post
  edc17c69 odometer officina.bonamico 2 186 09-05-2019, 10:24 AM
Last Post: michelespl
LFord Ford C-Max "ODOMETER DATA ERROR" after dash correction sagostinho 7 3,332 07-05-2019, 17:31 PM
Last Post: marko99
YTMercedes 2014 mercede sprinter odometer dump needed Atc1201 3 196 04-04-2019, 04:03 AM
Last Post: Atc1201
  Need universal OBD2 odometer correction Tool, what to buy ? bmwadriatic 14 1,198 05-03-2019, 06:33 AM
Last Post: Yuki Shi
YTMercedes 2017 mercede sprinter odometer Atc1201 12 473 01-03-2019, 02:36 AM
Last Post: nymike
JFiat Fiat doblo 2011 odometer change help raull00 1 149 26-02-2019, 11:51 AM
Last Post: darek_naprawa
  PEUGEOT 3008 II ODOMETER GOGO 1 519 12-02-2019, 20:50 PM
Last Post: Clusters
KOpel Corsa D odometer Marines74 1 241 01-02-2019, 13:33 PM
Last Post: nek13
  Need a dump file for 2002 chevy 1500 odometer Stockshock 17 1,461 20-01-2019, 15:56 PM
Last Post: RogerRoger
KOpel odometer correction Opel vivaro Skampy 2 378 20-12-2018, 12:46 PM
Last Post: magdex

Forum Jump:


Users browsing this thread:
1 Guest(s)

Return to TopReturn to Content