Tuesday 16 January 2018

All about Dominance, and being Hidden in Plain Sight

All about Dominance
When VIDA - or any other diagnostic tool - talks to the car, VIDA has it's own CAN bus address 0x000FFFFE. This address is reserved for diagnostic devices, and due to the 0x000 at the start of the address, has the highest priority of all addresses on the bus. It's like being in the Gold Member club, you always get seat 1A with the best service and the best views. And the diagnostic message will always get through.
Tip: Get used to the address 0x000FFFFE - you'll be seeing it a lot.

So why does this address have a higher priority? It's because bit 0 is dominant.
Read the Wiki article on the CAN bus and you will see that 0s have priority.
So ids starting with 0x0000 have priority over 0x000, and 0x000 has priority over 0x00, and 0x00 beats 0x0, etc etc etc.
So you see there is no equality on the bus. 0s win, 1s lose. That's the way it is. Martin Luther King would turn over in his grave if he knew.

Hidden in Plain Sight
So given the nature of CAN bus addressing, where the sender address is known but the recipient address is not specified, meaning that basically every message is broadcast to the entire vehicle universe (the galaxy being inside the car), how does any device know that a diagnostic message to clear DTCs, read settings, load software etc is for that particular device? After all, many devices hang around on the bus, all in their different seats, and all are listening to the messages.
The diagnostic messages are special. I guess they had to be.
Within the 8 data bytes of every diagnostic message you have one byte that specifies the recipient of the message.
One byte. That's 256 possible devices, from 0x00 to 0xFF. That's enough for the P2 vehicles.
So what's the best way to find out these device addresses?
There are two ways:

  1. The Time Consuming Way
    Use VIDA, query each device and then try and determine the device address from a (potentially very large) log file of CAN bus messages. That takes time.

  2. The Easy and Fast Way
    Instead of the above, you can open VIDA, enter in the vehicle profile for any P2 based vehicle you want, and then view the addresses for every possible device directly in VIDA. Now that's what I call being hidden in plain sight.

So Where is This Magical Address Book? It's in VIDA, visible to everyone:
  1. Enter your desired P2 VEHICLE PROFILE
  2. Go to the SOFTWARE tab
  3. On the top, on the right hand side of the screen, click on ADVANCED
  4. The Advanced screen opens. The top section is called ECU information
  5. Drop down the first drop-down list in the ECU information section.
  6. Observe the entries in the list
  7. The first entry is AEM (52), the second BCM (01), the third CCM (29), etc.
    They are sorted alphabetically.
  8. The numbers in the brackets are the device addresses, in hex.
  9. So AEM (52) has diagnostic address 0x52, and the BCM can be found at 0x01, and the CCM is stting in seat 0x29 on the bus, etc. etc.

Using VIDA, I have verified that the address information is the same on a MY2009 XC90, a MY2005 S80, a MY2002 S60, and a C40. So it very strongly suggests that the device diagnostic addresses are constant across the entire P2 range of Volvo vehicles.

Now you know. Enjoy!

No comments:

Post a Comment