XCP over CAN using A2L file

It's all about the code!
Post Reply
User avatar
AndreyB
Site Admin
Posts: 14380
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

XCP over CAN using A2L file

Post by AndreyB »

Just realized that https://www.asam.net/ exists and A2L is a nicely documented ASAM MCD-2 MC Language file. Also looks like XCP over CAN is the industry standard for live calibration.

https://jnachbaur.de/ASAP2Demo/ASAP2Demo.html has UI and https://github.com/christoph2/pyxcp is alive.

https://github.com/rusefi/rusefi/issues/4501
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14380
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: XCP over CAN using A2L file

Post by AndreyB »

Question: what is the simplest to build on a bench combination of power supply + OEM ECU + dongle + software to see "live tuning" via CAN XCP on the bench?

Does https://docs.vehical.net/logger_protocols mean "XCP" when they say "LIVE tuning"? Do they mean "patching: optional" when OEM ECU has XCP in original form, and by "patching" do they mean "custom or firmware adjustments" to enable XCP?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
bri3d
Posts: 3
Joined: Fri Nov 26, 2021 11:45 pm
Github Username: bri3d
Slack: bri3d

Re: XCP over CAN using A2L file

Post by bri3d »

I will stand by what I said in the other thread with this being a very complex route towards this goal. A2L may have a very exhaustively, painfully documented formal specification, but it also is a humungous pain in the rear to parse and very overcomplicated for what we probably need.

In terms of what is common in the industry: dSpace GSI (serial) and ETAS ETK (Ethernet) are usually preferred due to speed. CCP and XCP are seen as slower options for use only when the special application development hardware is not available.

One big challenge with getting a bench setup will be that normally only Sample / Application (development) ECUs have CCP enabled, not Series ECUs. And usually for live tuning, an Application / Development ECU is needed to have additional overlay RAM - live tuning by OEM tools is usually not supported on Sample ECUs (which are Series ECUs with a bit flipped), only logging.

Someone else will have to chime in if they know of an ECU that is actually easy to set up with CCP/XCP. I am not aware of one where this is "easy." I think flipping an older Bosch MED17 ECU into Sample mode might be the easiest way? Some documentation here: http://nefariousmotorsports.com/forum/index.php?topic=15681.0title= .

I made some progress against this with Simos ECUs but it is far from what I would describe as "easy."

Which takes us to VehiCAL. Probably for this reason, VehiCAL uses a patch and a proprietary protocol invented by the author `prj`, nothing CCP/XCP about it. ECUs with Optional patching in VehiCAL have defined $22 UDS readLocalIdentifier variables which can be used in lieu of the proprietary, patched VehiCAL RAM-logging protocol. As you can see on the site, "LIVE tuning always requires patching."
User avatar
AndreyB
Site Admin
Posts: 14380
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: XCP over CAN using A2L file

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14380
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: XCP over CAN using A2L file

Post by AndreyB »

AndreyB wrote:
Tue Aug 30, 2022 11:07 pm
Question: what is the simplest to build on a bench combination of power supply + OEM ECU + dongle + software to see "live tuning" via CAN XCP on the bench?
A dude from Moscow says that Monaco or Vediamo is the way to set this using a Mercedes ECU, as long as matching seed .dll is available on mhhauto
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
prj
Posts: 3
Joined: Fri Mar 24, 2023 9:10 pm

Re: XCP over CAN using A2L file

Post by prj »

Figured I'd chime in here.
The nefmoto links talk about seed/key for the ASW stuff, so the KWP/UDS stack.
CCP/XCP runs on different CAN ID's, it does not go through GW, you need a CAN or on newer units Flexray tap on the PTCAN/PT Flexray.
The CCP/XCP seed/key has nothing to do with the normal KWP/UDS stack seedkey that everyone posts about, it's a completely different topic.

It is also only enabled on a few older controllers from some tool makers (on a few it is always on, e.g. McLaren).
Most is hard disabled on production ECU through flag in OTP. So you need a patch.

I don't see any point in implementing this in standalone ECU if you are not using OEM calibration tools.
User avatar
AndreyB
Site Admin
Posts: 14380
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: XCP over CAN using A2L file

Post by AndreyB »

prj wrote:
Fri Mar 24, 2023 9:16 pm
It is also only enabled on a few older controllers from some tool makers (on a few it is always on, e.g. McLaren).
Wow it sounds like know stuff and we should be friends.

I would not even want to go check McLaren prices, what are some cheaper examples?
prj wrote:
Fri Mar 24, 2023 9:16 pm
I don't see any point in implementing this in standalone ECU if you are not using OEM calibration tools.
you are 93% right. The big picture is at the moment it's just TS for us so going fancy or just going something properly standardized sounds cool. After all you are looking at a "solution looking for a problem" hobby project.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
prj
Posts: 3
Joined: Fri Mar 24, 2023 9:10 pm

Re: XCP over CAN using A2L file

Post by prj »

I think about anything else you do has a better return on time investment, than this stuff.

If you really want, you can just get the CCP and XCP PDF specifications, and implement them.

Let me tell you this way. I work exclusively with OEM applications and I do not have a CCP/XCP implementation in my tool.
The reason is very simple - it does not go through the gateway in the car. The gateways in nearly all modern vehicles do strong CAN ID filtering. So the customer would have to solder wires or tap the wiring loom to use this functionality.

For an aftermarket ECU - I don't think people who have access to ETAS tools will use it anyway. To get ETAS tools in the first place you have to be employed by an OEM usually.
You're talking about a super tiny niche market.
Last edited by prj on Sat Mar 25, 2023 1:27 am, edited 1 time in total.
User avatar
AndreyB
Site Admin
Posts: 14380
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: XCP over CAN using A2L file

Post by AndreyB »

You are probably very much right.

On the one hand still curious to build a bench setup using cheap used parts, on the other hand there is no market here and I should spend time on cooler stuff simply because frontend is not available.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mck1117
running engine in first post
running engine in first post
Posts: 1495
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: XCP over CAN using A2L file

Post by mck1117 »

AndreyB wrote:
Sat Mar 25, 2023 1:19 am
On the one hand still curious to build a bench setup using cheap used parts, on the other hand there is no market here and I should spend time on cooler stuff simply because frontend is not available.
a bench setup using what devices that support ZCP, and using what software to speak XCP to them? AFAIK you have neither of those things.
User avatar
AndreyB
Site Admin
Posts: 14380
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: XCP over CAN using A2L file

Post by AndreyB »

mck1117 wrote:
Sat Mar 25, 2023 1:26 am
a bench setup using what devices that support ZCP, and using what software to speak XCP to them?
https://jnachbaur.de/ASAP2Demo/ASAP2Demo.html is my only hope for software. Does ASAP2Demo function within any scope?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply