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

Clear DTC function is currently broken #11

Open
jLynx opened this issue Dec 21, 2021 · 3 comments
Open

Clear DTC function is currently broken #11

jLynx opened this issue Dec 21, 2021 · 3 comments

Comments

@jLynx
Copy link

jLynx commented Dec 21, 2021

Right now the implementation of the clear DTC (#7) is broken and we are trying to work out how to get it to work. I am starting this issue thread so we can do a bit of a knowledge dump while we work out how to get it working.

Here are a few links to information that may be helpful.

http://www.totalcardiagnostics.com/support/Knowledgebase/Article/View/104/0/obd2-pids-for-programmers-technical
https://electronics.stackexchange.com/questions/561221/0x7e8-to-0x7fh-on-the-can-bus
https://en.wikipedia.org/wiki/OBD-II_PIDs
https://en.wikipedia.org/wiki/On-board_diagnostics

Here is the current implementation

ID: 0x7DF
Length: 8
Data: 0x00, 0x04x 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

Based of the information in the Wikipedia article, this should work but in practice it does not seem to work.

@jLynx jLynx changed the title Clear DTC function broken Clear DTC function is currently broken Dec 21, 2021
@jLynx
Copy link
Author

jLynx commented Dec 21, 2021

image
image

image

@jLynx
Copy link
Author

jLynx commented Dec 21, 2021

@areckicode
Copy link

Hi, seems you are missing the "data bytes" value in the message.
On byte 0 there is a number of data bytes and in your implementation you have "0", while you are sending 1 byte of data, which is the service number.
You can try to change the line 714 of the ODB2.cpp file to:
CAN.write(0x01); // number of additional bytes

So try sending the:
ID: 0x7DF
Length: 8
Data: 0x01, 0x04x 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

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

2 participants