1. New Emulator

  2. Immo Bypass

  3. Julie Emulator

  4. AUTO-CHIPS

  5. Ecu-Service



Odometer Algorithms Manual Calculations Explained For Studies
23-05-2016, 09:36 AM, (This post was last modified: 15-09-2019, 23:07 PM by Clusters.)
Post: #1
0Dash  Odometer Algorithms Manual Calculations Explained For Studies
This thread is for posting manual calculation of algorithms ONLY! This does not include scripts.

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: +31 - 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] , IMKO [+1] , Killer76 [+1] , esva [+1] , dule14786 [+1] , tomushas [+1] , pesona [+1] , cyclone [+1]
Quote this message in a reply
[-] The following 69 users say Thank You to Clusters for this post:
  • 23Andi23, amps, antonypaul, atis, autohaus, Autokent, barto39, bawareca, benzprod, Black Alien, BMWS1000RR, bram380, CHIKODIAG, Crysis05, daxxer, Diagnostix, domelec, dragon100, dule14786, dvdpgn, electrolab, eliaselias, elioc9, esva, fab, Frontera_i, Hayssam, helmi reguig, Igorotak, IMKO, jahacmm73, jokir, kikis, Killer76, mandjeadolphe, Marcos, max72, McMihai, miguelsilv6, nckryder, obdstart, Peaker72, pesona, PhilipArt, philipcoin, prinz, rickynguyen, ROD-BENDERS, Romanas001, ruben_17non, salliemohamed, Saul, scanzed, severus, sixcode, skens, snyper, takis, Tech206, titoun, tomushas, tyrystor, vag electro, vyckaz, W123, wcysj08, WiKiH, yellowstilo, zmann
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
[-] The following 17 users say Thank You to bram380 for this post:
  • antonypaul, Autokent, CHIKODIAG, Clusters, Crysis05, daxxer, domelec, eliaselias, kikis, Killer76, ROD-BENDERS, scanzed, sixcode, snyper, tomushas, WiKiH, zoliamator
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
[-] The following 16 users say Thank You to Clusters for this post:
  • antonypaul, Autokent, bram380, CHIKODIAG, Crysis05, daxxer, domelec, eliaselias, Floryn_P, jahacmm73, kikis, realwan44, snyper, tomushas, WiKiH, zmann
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: +11 - 23Andi23 [+1] , bram380 [+1] , Marcos [+1] , ROD-BENDERS [+1] , volavka [+2] , Griff [+1] , Bernie [+1] , esva [+1] , dule14786 [+1] , cyclone [+1]
Quote this message in a reply
[-] The following 23 users say Thank You to Clusters for this post:
  • 23Andi23, antonypaul, Autokent, BMWS1000RR, bram380, CHIKODIAG, Crysis05, daxxer, domelec, eliaselias, esva, Griff, jahacmm73, kikis, Marcos, McMihai, ROD-BENDERS, ruben_17non, skens, tokatli64, tomushas, volavka, WiKiH
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: +9 - Marcos [+1] , 23Andi23 [+1] , ROD-BENDERS [+1] , Autokent [+1] , eliaselias [+1] , volavka [+2] , esva [+1] , cyclone [+1]
Quote this message in a reply
[-] The following 22 users say Thank You to Clusters for this post:
  • 23Andi23, antonypaul, Autokent, bram380, CHIKODIAG, Crysis05, daxxer, domelec, eliaselias, esva, Floryn_P, Frontera_i, kikis, Killer76, Marcos, McMihai, Peaker72, ROD-BENDERS, ruben_17non, tomushas, volavka, WiKiH
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: +6 - ROD-BENDERS [+1] , 23Andi23 [+1] , volavka [+2] , esva [+1] , cyclone [+1]
Quote this message in a reply
[-] The following 20 users say Thank You to Clusters for this post:
  • 23Andi23, antonypaul, Autokent, bram380, CHIKODIAG, Crysis05, daxxer, domelec, eliaselias, esva, Frontera_i, kikis, Marcos, McMihai, ROD-BENDERS, Romanas001, ruben_17non, SergeyIg, volavka, WiKiH
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: +5 - Marcos [+1] , 23Andi23 [+1] , ROD-BENDERS [+1] , esva [+1] , cyclone [+1]
Quote this message in a reply
[-] The following 22 users say Thank You to Clusters for this post:
  • 23Andi23, antonypaul, bigmaluco, bram380, CHIKODIAG, Crysis05, daxxer, domelec, eliaselias, esva, Frontera_i, kikis, makadam, Marcos, McMihai, necraxx, prinz, ROD-BENDERS, Romanas001, ruben_17non, tomushas, WiKiH
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: +6 - 23Andi23 [+1] , Marcos [+1] , ROD-BENDERS [+1] , ruben_17non [+1] , daxxer [+1] , lucaslacerda [+1]
Quote this message in a reply
[-] The following 21 users say Thank You to Clusters for this post:
  • 23Andi23, antonypaul, autohaus, Autokent, bram380, CHIKODIAG, Crysis05, daxxer, domelec, eliaselias, esva, Frontera_i, kikis, lucaslacerda, Marcos, McMihai, necraxx, ROD-BENDERS, ruben_17non, tomushas, WiKiH
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
[-] The following 16 users say Thank You to daxxer for this post:
  • 23Andi23, antonypaul, atis, Autokent, bram380, CHIKODIAG, Clusters, Crysis05, domelec, eliaselias, Frontera_i, kikis, Marcos, necraxx, ROD-BENDERS, tomushas
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
[-] The following 14 users say Thank You to daxxer for this post:
  • 23Andi23, antonypaul, Autokent, CHIKODIAG, Clusters, Crysis05, domelec, eliaselias, Frontera_i, kikis, Marcos, necraxx, ROD-BENDERS, tomushas


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dacia dokker 2015 odometer help unlocker 1 101 13-11-2019, 14:25 PM
Last Post: flavio69
  honda civic 2013 odometer reduction wphonetei 3 167 10-11-2019, 10:20 AM
Last Post: mikroel
  bmw edc17cp45 odometer change help raull00 3 235 30-10-2019, 21:13 PM
Last Post: tomo776
LFord Ford Mondeo MK3 - odometer correction haxigi 10 362 29-10-2019, 18:45 PM
Last Post: haxigi
ODacia Dacia Logan - odometer correction Orange_99 2 177 29-10-2019, 12:23 PM
Last Post: Orange_99
ORenult renault scenic 1 1998 odometer correction ParamoOBD 1 109 22-10-2019, 11:23 AM
Last Post: MiMi
VToyota orange 5 dashboard/odometer scripts/configurations Skuxxx12342 1 225 17-10-2019, 06:52 AM
Last Post: Skuxxx12342
  BMW E39 (93S66) odometer change after instruments replacement Kamcio 10 3,416 16-10-2019, 09:55 AM
Last Post: vasya
  OBDSTAR Odo Master- New Odometer Reset Tool Yuki Shi 14 857 14-10-2019, 16:43 PM
Last Post: raffy haddad
HVolvo odometer nissan versa monotacataca 1 163 13-10-2019, 18:22 PM
Last Post: makis

Forum Jump:


Users browsing this thread:
1 Guest(s)

Return to TopReturn to Content