python-OBD
python-OBD copied to clipboard
Odometer
Is odometer data available? I need it for a self driving car.
I would also like to know if this is already available in the code. Or would this be a custom command?
Just answered my own question. Odometer information is blocked by manufacturers for security reasons. It is not available through the ELM327 OBD interface.
I do not think it is blocked, it is just not a part of the OBD standard, you might get the value, but you need to reverse engineer the communication with vehicle.
Bumping this up; added the odometer to mode1 of the commands.py file, but got null data when used.
PID reference (A6 found on both sites) https://en.wikipedia.org/wiki/OBD-II_PIDs https://www.csselectronics.com/pages/obd2-pid-table-on-board-diagnostics-j1979
Is this how others queried data?
OBDCommand("ODOMETER" , "Odometer" , b"01A6", 6, uas(0x25), ECU.ALL, True),
*I've also tried ECU.ENGINE but still get null data
Excellent Find @tkyanaga, I might have to resurrect this project and try it out.
according to the small wiki note I missed yesterday, the Odometer readout was only required for Manufacturing Year 2019 and beyond.
I believe that is why I'm getting null data - the above commands.py edit may work for 2019+ vehicles
Ah, yes I do remember that now that you mention it. I am also testing on a vehicle pre 2019 so I think that's why I wasn't able to get it to work for me as well. I'll post here if I figure anything out in the future. Thanks for reviving this project for me! :P