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

Add diagnostic request/command to get vehicle VIN #359

Open
zacnelson opened this issue Jun 1, 2016 · 1 comment
Open

Add diagnostic request/command to get vehicle VIN #359

zacnelson opened this issue Jun 1, 2016 · 1 comment
Labels

Comments

@zacnelson
Copy link

I've been investigating add VIN support to the vi-firmware stack. My end goal would be to implement a command similar to the vi-firmware Version and Device ID. So in the Android Enabler, you would see:

VI Version ____
VI Device ID ____
VIN ____

In order to support this on the firmware side, we need to be able to support multi-frame diagnostic messages in the iso-tp library. VIN requests come in 3 CAN messages.

Before I dive into the work of adding that to the iso-tp library, I wanted to first see if other folks had thoughts for adding this support. Based on the standard OBDII-PIDs, the VIN number can be read as follows: https://en.wikipedia.org/wiki/OBD-II_PIDs

Mode = 0x09 - Request vehicle information
ID = 0x02 - VIN

  1. Send request.
  2. Response would be first message of a multi-frame response. (VIN is 17 bytes)
  3. VI would then send a flow-control message for the remaining data to be sent
  4. Next 2 messages would contain the remainder of the VIN info.
@emarsman
Copy link
Member

emarsman commented Jun 2, 2016

Probably optional, but you could also do a mode=0x09, id=0x00 to make sure id=0x02 is supported and pid=01 to make sure 5 bytes get returned. Maybe we only support 5 bytes for now, but can spit out more useful error messages if we do the other commands first.

Here is a good example I had of VIN data returns: http://www.obdscan.net/APEX.pdf

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

No branches or pull requests

2 participants