Author Topic: Problem understanding the data sent by OBDLink LX and ELM 327 [Closed]  (Read 1543 times)

JorgeArtifex

  • Newbie
  • *
  • Posts: 8
Hello everyone.

I am currently developing an Android application which reads data from OBD devices. The application is almost finished and we have tested it in a few cars and it works well. But then I tested the application in a Merceces-BENZ Class C w204 I have encountered several problems while reading the data from the OBDII protocol. I have read several sources and look around but sadly I didn't see anything which would help me to understand what is happening so I can fix the problem.

Here are a few examples and I would really appreciate any kind of help. Also I would like to say that I am not really an expert on this protocol since I just started working with it like a month ago, so I apologize for any newbie mistake I could have done.

Asking for the speed of the vehicle sometimes it returns NO DATA and within the next 2 seconds it returns a correct value, 41 0D 00 (for example) and next 2 seconds it retuns NO DATA again. Meaning, it's totally random when the NO DATA error ocurrs. The problem is the car actually has the PID supported because time to time it can return correct data.

Other problem which I have found is with the PID 00, which returns the supported PIDs from 01 to 20.

Sometimes I receive this:

01 00
41 00 98 18 00 01
1: 06 41 00 BF FF E8 93

And sometimes:

01 00
41 00 95 00 20 13

By the way, I set the protocol to ISO 15765-4 CAN (11 bit ID, 500 kbaud) (AT SP 6). I have also tried the AT SP 0 with the same results.

What really bothers me it is the fact that the answer is different. Sometimes it answers 41 00 95 00 20 13 and others 41 00 98 18 00 01, how is that even posible? That PID answer should be the same always for the same car, I don't think the car can change dynamicaly which PIDs supports.

Another is why sometimes the PID 00 is answered with 1 or 2 lines. In the first example, you can see that the first line is the normal answer to the pid 00 but then, it has a second answer which is 1: 06 41 00 BF FF E8 93 and I have really no clue what does that mean.

I have another example with the pid 01

01 01
41 01 00 07 E9 00
1: 06 41 01 00 04 00 00

01 01
41 01 00 04 00 00

As you can see, sometimes I receive 1 line resopnse, and sometimes two with different values. Is it because it is answering in different protocols at the same time? Is that what the 06 means?

Here are the commands that I use to initialize the OBD everytime my application connects to it:

AT Z
AT L0
AT SP 6


I am pretty sure it's about something in the initialization of the OBD, maybe I need to put a higher timeout or include some more commands, but since I am not an expert in the OBD protocol, I don't really know how should I procced. I would really appreciate if you could point out or redirect me to someone or any source which helps me to understand what is happening and be able to fix it.


Thanks a lot!
« Last Edit: February 25, 2015, 02:01:03 pm by STN-Brian »

STN-Brian

  • ScanTool.net Staff
  • Veteran
  • *
  • Posts: 5140
    • OBDLink.com
Re: Problem understanding the data sent by OBDLink LX and ELM 327
« Reply #1 on: December 17, 2014, 04:48:01 am »
Can I get a little bit more info about your car first? What year is it?  Where was it bought new?

It appears that you are getting responses from multiple ECUs.  If you can turn headers(ATH1) on and post your results from 0100 again, that it might help us.
OBD-II PIDs explained
Need more help? Check out our Support Portal

JorgeArtifex

  • Newbie
  • *
  • Posts: 8
Re: Problem understanding the data sent by OBDLink LX and ELM 327
« Reply #2 on: December 17, 2014, 08:21:42 am »
Hello Brian!

As I said in my post, the car is Merceces-Benz Class C w204. And I know it's not a new car but sadly I don't know from which year it is.

Tomorrow I will be able to have access to it again and I will come back to give you the information that you need (both the year of the car and the answer data with the headers on)

In the case that it's actually multiple ECUs answering my requests, how should I solve it?

Thanks!

JorgeArtifex

  • Newbie
  • *
  • Posts: 8
Re: Problem understanding the data sent by OBDLink LX and ELM 327
« Reply #3 on: December 17, 2014, 11:11:45 pm »
Hello again,

The car is Merceces-Benz Class C w204  from 2007 (so it is 7 years old). I have done more testing today showing headers with ATH1. And as you said, I receive information from two different ECUs

Here are a few examples:

[Req] 01 00
[Ans] 7E8 06 41 00 BF FF E8 93
[Ans] 7E9 06 41 00 98 18 00 01

Sometimes it returns only from one ECU

[Req] 01 00
[Ans] 7E9 06 41 00 98 18 00 01


[Req] 01 01
[Ans] 7E8 06 41 01 00 07 E9 00
[Ans] 7E9 06 41 01 00 04 00 00

[Req] 01 0C
[Ans] 7E8 04 41 0C 09 C4
[Ans] 00

And then sometimes it returns this:

[Req] 01 0C
[Ans] 7E9 04 41 0C 09 8C
[Ans] 00

Here is a call to the speed and one second after, I did another call  to the same PID and returned from different ECU, same as happened with the rpms. Note: The car didn't move so the data is correct.

[Req] 01 0D
[Ans] 7E9 03 41 0D 00
[Ans] 800

[Req] 01 0D
[Ans] 7E8 03 41 0D 00
[Ans] 800

Now that I have understand a little more which is the problem I have a few doubts more:

Which ECU should I listen to? 7E8 or 7E9? I have found this:

7E8 Physical response CAN identifier from ECU #1 to external test equipment
7E9 Physical response CAN identifier from ECU #2 to external test equipment

I don't understand why they would send different data when in theory are the same hardware?

Also I don't understand why in some calls like this one

[Req] 01 0D
[Ans] 7E8 03 41 0D 00
[Ans] 800

Why the second line is 800? 

Thanks a lot!


STN-Brian

  • ScanTool.net Staff
  • Veteran
  • *
  • Posts: 5140
    • OBDLink.com
Re: Problem understanding the data sent by OBDLink LX and ELM 327
« Reply #4 on: December 18, 2014, 07:32:25 am »
Yes, this confirms you are getting responses from 2 different ECUs.  7E8 is the engine ECU.  7E9 may be the transmission.  If you want to only get a response back from the engine you can set the header with the command
AT SH 7E0
where 7E0 is defined as the request to ECU#1(engine).

Try that and let me know what happens.
OBD-II PIDs explained
Need more help? Check out our Support Portal

JorgeArtifex

  • Newbie
  • *
  • Posts: 8
Re: Problem understanding the data sent by OBDLink LX and ELM 327
« Reply #5 on: December 18, 2014, 06:10:53 pm »
Ok! I will do that, it will take me a day or so to be able to do some testing in that car but I will post as soon as I have some results.

Thank you so much.

JorgeArtifex

  • Newbie
  • *
  • Posts: 8
Re: Problem understanding the data sent by OBDLink LX and ELM 327
« Reply #6 on: December 19, 2014, 06:43:26 am »
Hello,

I finally tested it with the command AT SH 7E0. But it seemed it didn't work.

AT SH 7E0 I got an OK but then I did a 01 00 and I got the same old return (returning two ECUs)

7E8 06 41 00 BF FF E8 93
7E9 06 41 00 98 18 00 01

And sometimes it returned

7E8 06 41 00 95 00 20 13

I dont understand why to the same pid the 7E8 is returning different values when it shouldn't.

Did I introcude the command wrongly? I remember that for AT H1, it didn't work because I had to send the command like ATH1 (without space). So maybe it is ATSH 7E0?

Thanks.

« Last Edit: December 19, 2014, 09:32:22 am by JorgeArtifex »

STN-Brian

  • ScanTool.net Staff
  • Veteran
  • *
  • Posts: 5140
    • OBDLink.com
Re: Problem understanding the data sent by OBDLink LX and ELM 327
« Reply #7 on: December 22, 2014, 05:53:52 am »
Replied to with PM
OBD-II PIDs explained
Need more help? Check out our Support Portal