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

Need Help #2

Closed
JitenGoswami opened this issue Sep 5, 2016 · 5 comments
Closed

Need Help #2

JitenGoswami opened this issue Sep 5, 2016 · 5 comments

Comments

@JitenGoswami
Copy link

Hello Jeff,

I hope you are going great.

I went through different OBD2 devices. And i found plenty of OBD-2 devices. And also searched for there SDK, but many of them don't have any such kind of SDK.

And then i found your code, but i don't know how your code is working can you explain a bit. I compiled your code started streaming from settings screen and also getting some data on dashboard. But yet is not clearing from where we are getting data can you help me with it?

Secondly you have mentioned that you have tested your project with below device:
https://www.amazon.com/ieGeek%C2%AE-Wireless-Scanner-Adapter-iPhone/dp/B00B3K2X4M/ref=as_li_ss_tl?s=automotive&ie=UTF8&qid=1435444136&sr=1-3&keywords=obdii&linkCode=sl1&tag=jeffmcfaddenc-20&linkId=3I7JFPHZU3733MFP
So does that work completely fine with your code? Does you got PID or a code like: http://www.obd-codes.com/ as i am not getting this kind of code.

Please help me with my issues.

Waiting for your positive feedback.

Regards,
Jiten

@jeffmcfadden
Copy link
Owner

CarDash interfaces via the ELM327 AT interface. You can find the commands here: https://www.sparkfun.com/datasheets/Widgets/ELM327_AT_Commands.pdf

The product that I got works perfectly with CarDash. I can't vouch for anything else, though technically anything with an ELM327 should be workable.

All the communication with the device happens here: https://github.com/jeffmcfadden/CarDash/blob/master/CarDash/FAOBD2Communicator.m

Cheers,

-- Jeff

@JitenGoswami
Copy link
Author

Hello Jeff,

Thanks for your response.

PDF in first URL is yet not clear as of now what is the use of it in your source code. So can you elaborate more on it?

I have debugged your code and in FAOBD2Communicator.m i have found below code in which we get 14 digit data bytes. So we need to convert that NSData bytes to fetch PID?

NSString *message = [NSString stringWithFormat:@"01%@1\r", sensorPID];
NSData *data = [[NSData alloc] initWithData:[message dataUsingEncoding:NSASCIIStringEncoding]];
[self.outputStream write:[data bytes] maxLength:[data length]];

As i need to have a actual Diagnostic Code at last and for that i am also referring one pdf: https://www.elmelectronics.com/wp-content/uploads/2016/07//ELM323DS.pdf
Does the pdf make as sense to get Diagnostic Code from car?

So now i am stuck over here can you help me out for my above issue?

Regards,
Jiten

@jeffmcfadden
Copy link
Owner

If you want to change which PIDs the code is requesting, then go to line 67: https://github.com/jeffmcfadden/CarDash/blob/master/CarDash/FAOBD2Communicator.m#L67

Change that line to be just the PIDs you want. You'll have to know what the data format is of the PIDs you're asking for so that you can parse the raw data that comes back from the unit. Parsing is done here: https://github.com/jeffmcfadden/CarDash/blob/master/CarDash/FAOBD2Communicator.m#L247

Common PIDs can be found here: https://en.wikipedia.org/wiki/OBD-II_PIDs

If all you want to do is read trouble codes, then CarDash is massive overkill. Just use Terminal.app and telnet to the IP/Port of your adapter and send the raw AT codes, then decode them by hand.

Or get one of the many OBD2 apps on the app store and get the codes that way.

-- Jeff

@JitenGoswami
Copy link
Author

Hello Jeff,

Thanks for your feedback.

Today I have tested Car Doctor App which i have downloaded from app store and connect it with ELM-327 Obd-II device. I worked properly by providing real time data.

Then i tried same thing with your code and i got some data but they were not correct and also without connecting your app with Obd device it still provides some sort of data. So can you let me know how is it possible that i can get data without connecting your app with Obd-II device.

Let me know your feedback.

Regards,
Jiten

@jeffmcfadden
Copy link
Owner

jeffmcfadden commented Sep 22, 2016

Maybe you were getting cached data, or you had it in demo mode, or you were connected when you didn't think you were?

CarDash is really a hobby-level project at best, so I can't say it's reliable, sorry.

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