Register
Results 1 to 7 of 7
  1. #1
    Newbie
    Join Date
    Dec 2024
    Posts
    5
    Thanks Thanks Given 
    5
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default km - hex conversion on Land Rover Discovery 2 dashboard

    Good morning to all.


    I'm practicing with a dashboard from a junkyard Discovery 2 (The original one from my car I still don't touch it for fear).


    I would like to learn how I can do the conversion from hex to kilometers and kilometers to hex.


    I have been reading the forum and I have seen some information notes, but they always end up solving the doubts by sending a modified binary.


    I'm using a binary that I got from this forum but I can't figure out how to get from point A to point B.

    (attached is an image of the binary opened with the GQ-4x4 software).

    bin.jpeg

    As I read in the same thread, the equivalence between km/hex is as follows:

    "250.175 to hex is 03 D1 3F"

    I do not understand how this data can be obtained, nor how to find it in the binary.

    This is the thread where this topic is discussed:

    https://www.digital-kaos.co.uk/forum...inking-mileage

    I would appreciate any kind of information or training in this regard.


    Thank you very much for your time and sorry for the translation, as I use DeepL.


    Best regards.

  2. #2
    V.I.P. Member
    jomberykaso's Avatar
    Join Date
    Sep 2013
    Location
    En algun lugar de Chile
    Posts
    13,268
    Thanks Thanks Given 
    2,983
    Thanks Thanks Received 
    10,012
    Thanked in
    6,873 Posts

    Default

    Hi, to understand this "250.175 to hex is 03 D1 3F" first you will need a calculator in "programmer mode" (you can use a phone app or windows calculator)

    put in Decimal 250175 then convert to hexadecimal and you will see 03 D1 3F
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ONLINE CAR FILE EDITION SERVICE

    SERVICIOS DE EDICION DE ARCHIVOS AUTOMOTRICES

  3. The Following User Says Thank You to jomberykaso For This Useful Post:

    AdrianSuki (10th December, 2024)

  4. #3
    Newbie
    Join Date
    Dec 2024
    Posts
    5
    Thanks Thanks Given 
    5
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by jomberykaso View Post
    Hi, to understand this "250.175 to hex is 03 D1 3F" first you will need a calculator in "programmer mode" (you can use a phone app or windows calculator)

    put in Decimal 250175 then convert to hexadecimal and you will see 03 D1 3F
    Hi jomberykaso!


    Thanks for your reply!


    Ok, I've learned this part. I don't understand why I haven't seen it before. The conversion from km to hex is at least clear to me now.


    How do I now search for 03 D1 3F in the binary?

  5. #4
    V.I.P. Member
    jomberykaso's Avatar
    Join Date
    Sep 2013
    Location
    En algun lugar de Chile
    Posts
    13,268
    Thanks Thanks Given 
    2,983
    Thanks Thanks Received 
    10,012
    Thanked in
    6,873 Posts

    Default

    with this software, open file, press F3 , put the code you are searching for...press ENTER, then press F3 to search for the next position of the codes
    Attached Files Attached Files
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ONLINE CAR FILE EDITION SERVICE

    SERVICIOS DE EDICION DE ARCHIVOS AUTOMOTRICES

  6. The Following 2 Users Say Thank You to jomberykaso For This Useful Post:

    AdrianSuki (10th December, 2024), r1yamaha (11th December, 2024)

  7. #5
    Newbie
    Join Date
    Dec 2024
    Posts
    5
    Thanks Thanks Given 
    5
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by jomberykaso View Post
    with this software, open file, press F3 , put the code you are searching for...press ENTER, then press F3 to search for the next position of the codes
    Thanks again for such a quick reply!


    Thanks for the SW, it will be very useful!


    But I can't find 03 D1 3F in the binary. Theoretically (or at least that's how I understood it in the other post) in the .bin that I attached, it should show 250175 km which in hex is = "03 D1 3F". I search for it with HexCmp and it doesn't find the hex string. What am I doing wrong?


    Thank you very much for your time and dedication.
    Attached Files Attached Files

  8. #6
    V.I.P. Member
    jomberykaso's Avatar
    Join Date
    Sep 2013
    Location
    En algun lugar de Chile
    Posts
    13,268
    Thanks Thanks Given 
    2,983
    Thanks Thanks Received 
    10,012
    Thanked in
    6,873 Posts

    Default

    your file uses different algorithm, that file is not decimal to hex , this code "84 1E 7B E1" is repeated 16 times in your file.

    841E : is the result of kms in decimal divided *32 with bytes swapped

    7BE1: is the result of 841E xor FFFF
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    ONLINE CAR FILE EDITION SERVICE

    SERVICIOS DE EDICION DE ARCHIVOS AUTOMOTRICES

  9. The Following User Says Thank You to jomberykaso For This Useful Post:

    AdrianSuki (11th December, 2024)

  10. #7
    Newbie
    Join Date
    Dec 2024
    Posts
    5
    Thanks Thanks Given 
    5
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Quote Originally Posted by jomberykaso View Post
    your file uses different algorithm, that file is not decimal to hex , this code "84 1E 7B E1" is repeated 16 times in your file.

    841E : is the result of kms in decimal divided *32 with bytes swapped

    7BE1: is the result of 841E xor FFFF
    OMG! The light came!!


    I finally understood how to do it!


    The problem came from the root, I was comparing information from a binary with a binary that did not correspond to that information!


    So simple and at the same time so stupid!


    There is one last question, why 32?


    I'm making a small guide to collaborate with the forum and when writing the steps, the 32 squeaks in my mind. Where do you get that the number 32 is for division or multiplication?


    Thank you very much for your patience!!!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.