Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reading Odometer values #272

Open
YoAzzi opened this issue Mar 23, 2024 · 5 comments
Open

reading Odometer values #272

YoAzzi opened this issue Mar 23, 2024 · 5 comments

Comments

@YoAzzi
Copy link

YoAzzi commented Mar 23, 2024

Hello
is it possible to read the odometer value ?
i have checked all the commande listed on the wiki but it does not contain it.
maybe the odometer is part of the Non-sensor data ?

@ralam23
Copy link

ralam23 commented Mar 23, 2024

hello! i'm a complete novice at this and new to coding. however it seems most ecus do support being able to pull mileage off the ecu. reading the documentation https://python-obd.readthedocs.io/en/latest/Custom%20Commands/ it seems you can make a custom command perhaps to pull mileage from the ecu! i'm not sure how to go about it but hopefully it's somewhat helpful :)

@ralam23
Copy link

ralam23 commented Mar 23, 2024

i stand mistaken. i asked chatgpt for the hex code for mileage info however it seems that doesnt exist.

"Mileage data is often stored in the vehicle's EEPROM chip, not directly accessible via the diagnostic bus for security reasons. Some OBD readers might provide mileage information indirectly by calculating distance traveled since certain events, but this varies by reader and vehicle "

^ from chat gpt.

@TastyHackTheBox
Copy link

TastyHackTheBox commented Apr 2, 2024

I am concerned how much you trust a chat bot.

2019+ vehicles were mandated in California to provide odometer the codes are: A6 166 - expect 4 bytes

Before 2019 its not so easy - relying on either avg speed * engine hours, or distance traveled before + after a CEL
Distance Since Reflash or Module Replacement - C7 199 - two bytes (yes this means only 65k KM)
Distance traveled since codes cleared - 31 49 - two bytes
Distance traveled with malfunction indicator lamp (MIL) on - 21 33 - two bytes
Engine run time - 7F 127 - 13 bytes

Took me 4 minutes to google it: https://en.wikipedia.org/wiki/OBD-II_PIDs

@ralam23
Copy link

ralam23 commented Apr 2, 2024

thank you for the knowledge :) still learning as i go!

@YoAzzi
Copy link
Author

YoAzzi commented Apr 2, 2024

the commands you have listed are car-dependent.
Thanks for the 4 minutes of research.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants