12

I'm not generally a 'car person', so hopefully I can explain this well enough to get some help here:

When sending messages to an OBD-II device, I receive one response in most cars I've tested. However, with cars that apparently have more than one ECU chip, I get a response from each of them. For example, if I send a 01 0C PID command to a vehicle with 3 ECU chips, I receive 3 responses which are generally very similar but still different.

A 01 00 command is supposed to return 4 bytes that states the supported PIDs of the vehicle, but this also returns 4 bytes for each ECU -- one being a fully fleshed out 4 bytes with several flags on and off, while the others seem to only have a handful of flags turned on (these flags so far seem to always be flags that are included in the 'main' response, but I'm unsure if this is always the case).

Example:

SENT: 01 00

RECEIVED:

00 BF BF AC D3 - This response has the most binary flags turned on
00 98 18 80 11 - 8 flags on here
00 98 18 80 13 - 9 flags on here

The last two lines consist of flags that are also flagged within the first line, but the line 3 has one additional flag that line 2 does not.

It seems to me that perhaps there is a single ECU that qualifies as the 'primary' chip that I should be listening to when I'm sending commands, and (I think) I understand that I can use a CAN ID mask/filter to only pay attention to the ones I need.

The question is: Is there really a 'primary ECU' that I should pay attention to, or are all of these responses equally important? If there's a primary one I need to be targeting, is there a command I can send to determine which is the 'most significant'?

Vehicles tested on:

2011 Chevy Cruze               [2 ECUs]
2015 BMW M5                    [3 ECUs]
2015 Range Rover Autobiography [3 ECUs]
6
  • 1
    It may be useful to tell us which make and model you tried this on. What I know is that the cars with 3 ECU's tend to be set up with two regular ECU's (one for each engine bank) and one "master" ECU that manages signals to/from (and possibly between?) the two regular ECU's. The "master" ECU doesn't really do much more than that, so if a diagnostic trouble code is set, the source of that will be the regular ECU, not the "master". However, you may have to poll the master through the OBD-II interface to get the DTC's. I wish I could help you more than this, but that's all I have for now.
    – Zaid
    Dec 4, 2015 at 20:45
  • 1
    I'm a software engineer, but haven't used OBD or CAN, but does this page help at all? It looks like there should be a way to filter messages.
    – JPhi1618
    Dec 4, 2015 at 21:01
  • @Zaid Thanks for the extra information. I updated my question with the cars I've tested it on, but this is something that I'll need to decide across any number of given vehicles; it may not end up mattering, depending on the exact response I should expect when sending unsupported PIDs, but I just wanted to cover all of my bases
    – Rein
    Dec 4, 2015 at 21:01
  • @JPhi1618 This is actually pretty much the same context I needed this in. This may very well be the path I need to follow! Thanks a bunch for the link, I'll dive into it a bit deeper.
    – Rein
    Dec 4, 2015 at 21:04
  • 1
    If you find anything of interest that you think you can flesh out into an "answer", come back and answer your own question. That's totally allowed.
    – JPhi1618
    Dec 4, 2015 at 21:05

2 Answers 2

6

If your vehicle is 2008 or newer it is using the can protocol, you can use the AT CR command to select which ECU you want to hear from.
Here's how:
send

AT H1

this will turn on headers to see the addresses of the ECU's.
send

0100

this is an OBD command to show which of the pids from 1-20 are supported.
your response should be like:

7E8064100BE3EA813
7E906410098188013
>

this shows that you have 2 ECUs 7E8 (engine) 7E9 (transmission),
I have seen 5 ECUs returned: 7E8,7E9,7EA,7EB,7EC.
In order to hear from just one ECU you issue AT CRA xxx where xxx is ECU address.
send the following

AT CRA 7E8

then

0100

will return:

7E8064100BE3EA813

send

AT H0

to turn off headers then send:

0100

and you will get back just

4100BE3EA813

If your vehicle is a 29 bit can then the 0100 resonse will look something like:

18DAF11806410088180013
18DAF110064100BE5FA813
>

this shows 2 ECUs 18DAF118 (transmission) and 18DAF110 (engine).
send

AT CRA 18DAF110

to hear just from the engine.

2
  • hi !! i am working on a prototype for vehicle diagnostic system. I have go through your answer but i have few queries... 1)is there any AT command to check how many ECUs are available. 2) when header is off than why only one string "4100BE3EA813" is displayed not both "410098188013"
    – Dev
    Nov 30, 2016 at 12:16
  • how do you know the ECU component name from the address, for example: 7E8 is the engine, and 7E9 is for transmission, any commands?
    – LIU YUE
    Apr 5 at 5:48
4

CAN does not work like you think.

CAN is not module based, it is message based. No module speaks directly to any other module. In CAN a module generates a message with an address, that address identifies the data that will be contained in the message. Also the address gives the importance of the message. The lower the address the higher the priority.

For example the ABS will transmit the vehicle speed. Every other module that needs the data will read it in.

There is no module that is more important than any other, it's the message priority that is important.

2
  • Just to follow up on this: If there's no module that's any more important than the other, is there any reason to filter out responses from multiple ECUs? For example, if I request RPM for the BMW M5, I get 3 responses (they're generally similar, but never exactly the same). Should I just 'trust' the first response as an accurate reading? Any reason not to just go with the first response for each request?
    – Rein
    Dec 17, 2015 at 15:51
  • If all the responses have the same address then trust the first. If they don't have the same address then trust the one with the highest priority. The highest priority has the lowest address.
    – vini_i
    Dec 17, 2015 at 22:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .