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

getVin not getting answer #74

Open
geetee24 opened this issue Oct 9, 2022 · 1 comment
Open

getVin not getting answer #74

geetee24 opened this issue Oct 9, 2022 · 1 comment

Comments

@geetee24
Copy link

geetee24 commented Oct 9, 2022

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
Copy link
Author

geetee24 commented Oct 9, 2022

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;
			}

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

1 participant