Help understanding CAN dump

Discussions on CAN mapping for ECUs, sensors, PDMs, and more.
Post Reply
F1 Dennis
Posts: 22
Joined: Thu Oct 05, 2017 12:26 am

Help understanding CAN dump

Post by F1 Dennis »

Hi all,
I've just started to try and reverse engineer my CAN data to map it. I'm connecting to a Magneti Marelli Marvel 6R.
I have reached out to Magneti to get the CAN protocols, but I'm not too optimistic about getting the right help from them.

I managed to connect the RC pro mk3 and copy paste the Lua script to trace the CAN data.
This is where I need a little help. I was expecting to see a list of many IDs but instead I only have 3 unique IDs, one that seems to iterate about 8 times. Is this a bit format?

I've been experimenting to see if car inputs move certain data points, but the updating of Lua script window makes it real hard to follow. Figured I'd put the question out here while I keep playing with it.

If anyone can point me in the right direction I'd really appreciate it.


Here is a sample of the dump: ( ID 128 repeats a bunch of times for the batch of ID 1298 and 1299, then keeps repeating this way )

[128.0]: 1.0, 8.0,
[128.0]: 1.0, 8.0,
[128.0]: 1.0, 8.0,
[128.0]: 1.0, 8.0,
[1298.0]: 2.0, 1.0, 0.0, 0.0, 0.0, 0.0, 255.0, 255.0,
[1299.0]: 27.0, 1.0, 0.0, 0.0, 2.0, 177.0, 8.0, 0.0,
[1299.0]: 27.0, 2.0, 0.0, 0.0, 4.0, 0.0, 44.0, 45.0,
[1299.0]: 27.0, 3.0, 0.0, 36.0, 19.0, 117.0, 44.0, 3.0,
[1299.0]: 27.0, 4.0, 0.0, 59.0, 3.0, 236.0, 3.0, 96.0,
[1299.0]: 27.0, 5.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0,
[1299.0]: 27.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
[1299.0]: 27.0, 7.0, 65.0, 12.0, 0.0, 0.0, 5.0, 132.0,
[1299.0]: 27.0, 8.0, 15.0, 255.0, 1.0, 194.0, 0.0, 0.0,
[128.0]: 1.0, 8.0,
[128.0]: 1.0, 8.0,
[128.0]: 1.0, 8.0,

thanks,
Dennis

F1 Dennis
Posts: 22
Joined: Thu Oct 05, 2017 12:26 am

Post by F1 Dennis »

Does this CAN format make sense?

I've been able trace a handful of sensor inputs to bits of data on my can feed. But my main problem is still the same, my data format doesn't seem to match what everyone else seems to have.
Rather than having many unique IDs with 8 pieces of data on each, Mine seems to put most everything on the ID 1299 and then creates 8 different versions of this ID by numbering the second piece of data from 1-8.
For example: My throttle pedal position is on ID 1299, "line 1" data position 8. it goes from 00-64 in hex, which gives me the 0-100 decimal. I've also found my steering, brake pressure, and others.
So the big question is how do I work with this weird formatting? I can imagine a Lua script that can parse this, but maybe the mapping tools such as bit mode or masking cover this? I'm too new to CAN to make sense of it.

Dennis

brentp
Site Admin
Posts: 6282
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

Good job figuring out the data so far.

It looks like the ECU is using the 2nd ID as a type of "sub ID" for the 1299 message.

The only time I've seen this is where the sub ID is in the *first* data byte, so this one is new. Not sure what the 27 means.

What you will have to do is basically check the value of the 2nd byte (this sub-id) and then switch the mapping based off of that. It will be a bit of a complicated script, but it will be possible.

We have a general framework for a Lua based CAN based mapping in our guide here: https://wiki.autosportlabs.com/CAN_Bus_Integration

it's similar to how the other script based integrations work.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

F1 Dennis
Posts: 22
Joined: Thu Oct 05, 2017 12:26 am

Post by F1 Dennis »

Thanks for the reply Brent.
It's good to get the confirmation now that this is just an odd data format.

I already wrote a little script to parse this weird format and get that nested data. The nice thing was that most all of the data I was looking for was organized into this ID "block". Then I was able to create some gauges to test and identify the rest of my sensors. Fun stuff!

Dennis

brentp
Site Admin
Posts: 6282
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Awesome! If you feel this would be good, universal script for this ECU, it would be great if we could share it on the wiki.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

F1 Dennis
Posts: 22
Joined: Thu Oct 05, 2017 12:26 am

Post by F1 Dennis »

Sure,
The Magneti Marelli Marvel 6 ECU is not very common. But I'll post what I put together incase it can be helpful to related products.
I still need to map the RPM as I am waiting to get close to my next track test to fuel up the car and turn it on. Once I get it I'll post up the data map and my code to parse it.
Disclaimer, I'm not a developer so the code will be pretty ugly.

Dennis

Post Reply