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]
Rein
  • 221
  • 2
  • 5

2 Answers2

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.

godzilla
  • 251
  • 2
  • 3
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.

vini_i
  • 16,115
  • 1
  • 42
  • 64