getVin not getting answer
Opened this issue · 1 comments
geetee24 commented
used your example code but it gets NO vin.
raw data is:
VIN: 014 0: 49 02 01 32 54 32 1: 5A 4B 31 42 41 39 41 2: 43 30 32
014 0: 49 02 01 32 54 32 1: 5A 4B 31 42 41 39 41 2: 43 30 32
014 0: 49 02 01 32 54 32 1: 5A 4B 31 42 41 39 41 2: 43 30 32
014 0: 49 02 01 32 54 32 1: 5A 4B 31 42 41 39 41 2: 43 30 32
014 0: 49 02 01 32 54 32 1: 5A 4B 31 42 41 39 41 2: 43 30 32
why not working? My handheld ODB2 gets the vin.
geetee24 commented
i found the issue.
your lib asssume USA 17 digit VINs.
for foreign cars its 14 digit VINs.
so your code needs to be changed to
if (
( q - buffer == len - 3 ) ||
( q - buffer == len - 7 ) ) {
return true;
}