CANhack.de CAN-Interface RKS+CAN
CAN Hardware, CAN Software, CAN Protocols - CAN Bus Forum for Your CAN Bus Project.

CAN Gateway for Racing: Universal & Versatile

 
New Topic Reply 🔗 ⭐ 🖨 CANhack.de - Index » CAN Bus General
Author Message
danielh



Joined: 12/11/2016
Posts: 4
Karma: +0 / -0   Thank you, like it!


Premium Support

Post17-12-2016, 19:59    Subject: CAN Gateway for Racing: Universal & Versatile Quote

Hello.

I'm currently modifying an Audi TT (8N) for motorsports use.

Production vehicle:
1.8T APX
ABS/ESP
All-wheel drive.

The engine has been modified in many ways (bored out, custom cylinder head, removal of the NW adjustment, different turbocharger, etc.). Therefore, it will also be fitted with a KMS MD35 engine control unit.

Now, regarding the "problem". The series speedometer and the Haldex control unit will continue to be operated via the KMS control system. The ESP system will be deactivated, while the ABS system will remain active.

"On Monday, I will create a CAN-Bus log using a sniffer I recently purchased from Kaufmann, using a vehicle that is structurally identical. Now, I need to transfer some data (engine speed, engine load, etc.) from the KMS-CAN to the original drivetrain-CAN. I haven't measured it yet, but I suspect the CAN speed is not the same, and definitely not the IDs. Therefore, a universal gateway is needed, which will convert the messages if necessary and transmit them to the other CAN bus."

Now, to my actual question:
Has anyone successfully completed a similar project before? Can anyone recommend a suitable gateway? If you search on Google, you'll find various providers for these types of gateways.

I would appreciate any insights or tips you might have.

Best regards,
Daniel.


Translated on 26-09-2026, 18:36.
Back to top Profile PM
CAN-Diagnose
Administrator
Administrator
Avatar-CAN-Diagnose

Joined: 06/07/2011
Posts: 575
Karma: +29 / -0   Thank you, like it!
Location: Ländle



Post18-12-2016, 15:21    Subject: CAN Gateway for Racing: Universal & Versatile Quote

Hallo Daniel,

das der Aufwand so einen Umbau auf die Strasse zu bekommen sehr hoch ist, wird das kaum jemand gemacht haben und wenn, dann wie Du nur für Motorsportzecke. Daher wird es eher schwierig werden, für den konkreten Fall Leute zu finden, die dies schon getan haben, erfolgreich waren und dies veröffentlichen wollen.

Entsprechend einfach zu nutzende und konfigurierende Gateways sind relativ teuer, dürften allerdings bei einer Stückzahl von 1 die günstigere Alternative zu einer Eigenentwicklung darstellen.

Sofern die fraglichen CAN-IDs bei Dir auf dem gleichen Bus (CAN-Antrieb) gesendet werden und unterschiedlich sind (d.h. die zu sendenden CAN-IDs sind nicht bereits anderweitig verwendet), kannst Du auch eine Software-Lösung mit dem Interface machen.

Mit dem RKS+CAN parallel auf dem entsprechendem CAN anklemmen, fragliche IDs mitlesen. Dann daraus die nicht vorhandene CAN-Nachricht basteln und senden.

Demo-Projekte findest Du hier:
http://www.canhack.de/en/viewtopic.php?t=137

Von der Programmlogik her:
Code:

if(RKSInitialize())
{
  if(RKSCANOpen(500000)) // CAN-Antrieb, 500000 kBit/s
  {
    can_msg_t sRx;
    can_msg_t sTx;

    memset(&sTx, 0, sizeof(sTx)); // Zu sendende Nachricht mit Nullen vorbelegen.
    sTx.byType = FRAME_TYPE_NORMAL;

    for( ;; )
    {
      if(RKSCANRx(&sRx)) // Hole eine Nachricht vom CAN.
      {
        // CAN-ID mit Geschwindigkeit?
        if(sRx.uFrm.sData.dwID == 0x3d8) // 0x3d8 ist geraten, hier muss dann die ID hin, welche das ABS/ESP mit der Geschwindigkeit sendet. Einfach mal hier suchen. Es gibt zu KCANMonitor ein Video hier, wo die Message Changes View gezeigt wird, hier sollte man die Geschwindigkeit schnell finden.
        {
          // Neue Nachricht basteln, wo die Geschwindigkeitsinfo rein soll.
          sTx.uFrm.sData.dwID = 0x351; // Neue herauszufindende CAN-ID
          sTx.uFrm.sData.byDLC = 8; // Nachrichtenlänge, kommt drauf an wie was gesendet werden soll. Bei der Nachrichtenlänge einfach am erwarteten "Original" orientieren, auch wenn nicht alle Bytes genutzt werden.
          sTx.uFrm.sData.abyData[2] = sRx.uFrm.sData.abyData[5]; // Beispiel, Byte 5 von empfangener Nachricht auf Byte 2 der neuen Nachricht kopieren.
          RKSCANTx(&sTx);
        }
      }
    }
  }
}


Das Beispiel ist natürlich bei weitem nicht komplett, es soll nur zeigen wie es prinzipiell gehen könnte.

Eine entsprechende Firmware könnte man auch fest ins Interface einprogrammieren, das wäre kein Problem. Damit könnte man einfach die RKS+CAN Platine (ohne Gehäuse und USB-Kabel) fest im Fahrzeug belassen.

Komplizierter wird es, wenn Du ein "echtes" Gateway brauchst, welches zwischen verschiedenen Bussen umsetzt oder bestimmte CAN-IDs komplett durch manipulierte ersetzt.
Weil so wie oben dagestellt, kannst Du natürlich nur auf dem gleichen Bus nicht genutzte CAN-IDs einfügen.

Ich würde erstmal schauen, ob es auf die einfache Art und Weise klappen kann.

Viele Grüsse, Rainer
Dipl.-Ing. (FH) Rainer Kaufmann - Embedded Software Freelancer
System RKS+CAN: CANHack.de CAN-Bus Interface


Last edited on 18-12-2016, 18:30, edited 12 times in total.
Back to top Profile PM WWW
postmann
CAN-Profi
CAN-Profi


Joined: 05/23/2013
Posts: 145
Karma: +64 / -0   Thank you, like it!


CAN Support

CAN-Diagnose likes this.
Post18-12-2016, 23:16    Subject: CAN Gateway for Racing: Universal & Versatile Quote

It's actually quite unusual to continue using the standard speedometer in motorsports applications. It would be simpler to use the corresponding CAN display from KMS.

Back to the question:

There are gateways available from various manufacturers (e.g., ETAS, Vector, Elektrobit), but it's important to know the communication structure beforehand.

Unfortunately, simply writing the signals into a different CAN frame and sending it is not sufficient.

Every manufacturer employs security mechanisms to ensure the plausibility and validity of the signals. These mechanisms can range from a simple message counter (sequence counter) to a CRC calculation or even encryption. The gateway should be capable of handling these mechanisms, meaning it should know the algorithms and have sufficient performance.

"A network management system (OSEK, AUTOSAR, etc.) will definitely be used, and it will need to be replicated accordingly. I would guess that in an 8N vehicle, it will be OSEK, which means you will need to create a corresponding communication ring, send "alive" frames, and handle the "ReadySleepBit," etc."

So, it is feasible, but it requires a good understanding of the different communication protocols used in the automotive industry, and specifically, knowledge related to the Audi 8N.


Translated on 26-09-2026, 18:43.
Back to top Profile PM
CAN-Diagnose
Administrator
Administrator
Avatar-CAN-Diagnose

Joined: 06/07/2011
Posts: 575
Karma: +29 / -0   Thank you, like it!
Location: Ländle



Post19-12-2016, 13:46    Subject: CAN Gateway for Racing: Universal & Versatile Quote

Hi,

ich denke nicht, dass der Fragesteller das komplette Netzwerkmanagement nachbauen möchte, wozu auch, bis auf das Motorsteuergerät scheint ja alles original zu sein.

Hier
http://www.canhack.de/en/viewtopic.php?t=2168

reicht es ja auch, dem Tacho die richtigen CAN-IDs zu bieten um die Drehzahl anzuzeigen.

Ich denke mit Geschwindigkeit und Drehzahl im Kombiinstrument wäre der Fragesteller schon glücklich. Die Geschwindigkeit kommt vom ABS/ESP hier ist also gar nix zu machen.
Für sein Motorsteuergerät kann es dagegen sein, daß diese für Launch-Control oder was auch immer gerne die Geschwindigkeit bzw. Raddrehzahlen hätte. Das hat aber nix mit OSEK-NM usw. zu tun, kurz in die Anleitung zur KMS konnte ich dazu gar nichts an Doku finden, steht vielleicht woanders oder der Anbieter möchte seine Zusatzhardware verkaufen.
Da das Motorsteuergerät nicht in die anderen vorhandenen Steuergeräte eingebunden werden soll, ist das Netzwerkmanagement hier ohne Belang. Das was so ein Motorsteuergerät auf dem CAN sendet, ist auch überschaubar, denn vieles sind Informationen die für den Fragesteller ohne Belang sind, z.B. Ladedruck, Ladelufttemperatur, Fahrgestellnummer, WFS-Kram etc.

Das Haldex-Steuergerät sollte die Lamellenkupplung schliessen, wenn zwischen Vorderachse und Hinterachse ein Schlupf besteht, am besten noch abhängig vom Lenkwinkel und anderem ABS/ESP Kram.
Das ist eigentlich eine Sache zwischen ABS/ESP und dem Haldexsteuergerät, ich wüsste nicht, was dazu das Motorsteuergerät bis auf ein Lastsignal o.ä. noch großartig mitquasseln sollte?

Viele Grüsse, Rainer
Dipl.-Ing. (FH) Rainer Kaufmann - Embedded Software Freelancer
System RKS+CAN: CANHack.de CAN-Bus Interface


Last edited on 19-12-2016, 15:13, edited 9 times in total.
Back to top Profile PM WWW
danielh



Joined: 12/11/2016
Posts: 4
Karma: +0 / -0   Thank you, like it!


Premium Support

Post19-12-2016, 14:44    Subject: CAN Gateway for Racing: Universal & Versatile Quote

Hello Rainer, hello postman.

Thank you very much for your comprehensive answers.

Rainers initial suggestion to use the hardware from the RKS+CAN and send messages on the bus will not work. The KMS's own CAN bus likely also has a bitrate of 500000 kBit/s, but the message IDs will not match. That would be quite a coincidence. I am concerned that there will be collisions between the two CAN buses. I definitely want to keep them separate. Connected to the KMS CAN bus are a wideband lambda controller, a CAN display, and an analog module for temperature measurement. I don't know how high the bus load will be. A real gateway would be nice. Of course, that costs money... But I don't think it will significantly impact the overall project cost. I just sent a request to http://www.mrs-electronic.de/. Let's see what they want for it.

I advocated for an AIM MXS display, but it was rejected. KMS will also be installing a CAN display, but I think it's too small.

Yesterday, I took a look at a Golf 4 and then accessed the speedometer. It wasn't that difficult. It's probably built to be compatible with the TT speedometer. They probably use almost the same technology.

I need to wait and see to what extent the Haldex system requires corresponding signals from the engine control unit. In principle, the original equipment (OE) drive CAN bus is the same as in the original state, except for the airbag, steering angle, and engine control unit.
As Rainer already wrote, it's enough to just replicate a few signals. I don't really care if there are communication errors in the memory.

"I already sketched out the wiring diagrams over the weekend. I noticed that the speed signal is transmitted separately via a direct connection. I might only need to tap into the speed signal from the KMS-CAN and output it as a PWM signal via a digital output. I've done something similar before with an atmega and an mcp2552 (or something like that). That was during my automotive training, about 7 years ago..."
But we'll see what's ultimately needed. For now, the wiring harness will be manufactured in the next few weeks. I'm already running the CAN bus wires to a central distribution point, so I can still quickly install a gateway later if needed.
Rainer correctly identified that the KMS engine control unit needs the wheel speed data for the launch control function. The additional hardware from KMS will not be installed. In my opinion, that's nonsense. If it's done at all, it should be handled via CAN. Whether the function will be implemented depends on how the rest of the project goes. But a proper gateway would be nice for that as well.


Thank you very much.
I will report as soon as there is any news.

Best regards,
Daniel.


Translated on 26-09-2026, 18:51.
Back to top Profile PM
CAN-Diagnose
Administrator
Administrator
Avatar-CAN-Diagnose

Joined: 06/07/2011
Posts: 575
Karma: +29 / -0   Thank you, like it!
Location: Ländle



Post19-12-2016, 15:09    Subject: CAN Gateway for Racing: Universal & Versatile Quote

Hi Daniel,

gibt es denn Doku, was das KMS überhaupt auf dem CAN sendet? Hast Du einen Trace bzw. eine CAN-ID-Liste? Ich habe dazu nichts gefunden, nur einen Hinweis, daß am CAN Zusatzhardware angeschlossen werden kann...

Viele Grüsse, Rainer
Dipl.-Ing. (FH) Rainer Kaufmann - Embedded Software Freelancer
System RKS+CAN: CANHack.de CAN-Bus Interface
Back to top Profile PM WWW
danielh



Joined: 12/11/2016
Posts: 4
Karma: +0 / -0   Thank you, like it!


Premium Support

Post19-12-2016, 15:49    Subject: CAN Gateway for Racing: Universal & Versatile Quote

Hello.

I requested the documentation for the KMS Can from TIJ Power. Let's see what they send.

I can only provide a trace once the wiring harness is connected. Right now, it's still just a bare chassis.

I will provide a corresponding trace later.

Best regards,
Daniel.


Translated on 26-09-2026, 18:55.
Back to top Profile PM
CAN-Diagnose
Administrator
Administrator
Avatar-CAN-Diagnose

Joined: 06/07/2011
Posts: 575
Karma: +29 / -0   Thank you, like it!
Location: Ländle



Post19-12-2016, 16:24    Subject: CAN Gateway for Racing: Universal & Versatile Quote

Klasse! icon_smile.gif
Dipl.-Ing. (FH) Rainer Kaufmann - Embedded Software Freelancer
System RKS+CAN: CANHack.de CAN-Bus Interface
Back to top Profile PM WWW
postmann
CAN-Profi
CAN-Profi


Joined: 05/23/2013
Posts: 145
Karma: +64 / -0   Thank you, like it!


CAN Support

Post19-12-2016, 18:45    Subject: CAN Gateway for Racing: Universal & Versatile Quote

To my knowledge, the CAN bus on the MD35 can be configured, meaning that parameters like speed, IDs, and data content can be adjusted to a certain extent.

I once contacted some acquaintances involved in Formula Student to inquire about their experience with engine control systems.

Regarding the problem, if the CAN messages can be freely defined, the signals can be sent accordingly on the original CAN bus. However, I still foresee a challenge with network management, because, unlike other projects, the combination device should not operate independently but should be integrated into the existing original vehicle network.

Now, the control units would see the application frames from the engine control unit, but they wouldn't receive any NM messages or ring formation signals, etc.

If a control unit operates independently, it will enter a fault mode according to the OSEK standard. However, if it is part of a network (i.e., receives other network management messages), it should ignore application messages from "non-participating" nodes.

The question is, what exactly should the speedometer display? Couldn't the speedometer be made to run "standalone" in the vehicle?


Translated on 26-09-2026, 18:57.
Back to top Profile PM
danielh



Joined: 12/11/2016
Posts: 4
Karma: +0 / -0   Thank you, like it!


Premium Support

Post19-12-2016, 19:20    Subject: CAN Gateway for Racing: Universal & Versatile Quote

Hello postman,

I've also read about the possibility of freely configurable CAN IDs. However, the manual that came with the purchase only mentions five different CAN profiles, each of which is optimized for different displays.

I haven't quite understood network management yet. Do you have any book recommendations that explain the system (OSEK, network management, etc.) in more detail?

Regarding the main topic:
First of all, thank you very much for your dedication! Please give me some time to wire the vehicle and see what tasks are *really* needed. I wasn't expecting to receive so much feedback here.

Thank you very much.
During the week between Christmas and New Year's Day, some things will be finalized. After that, I'll be able to say more.

Best regards,
Daniel.


Translated on 26-09-2026, 18:59.
Back to top Profile PM
New Topic Reply 🔗 ⭐ 🖨 CANhack.de - Index » CAN Bus General
Similar articles and topics
Topic Forum
No new posts Develop CAN Gateway: Guide & Tutorial CAN Bus General
No new posts VW CAN Gateway / OBD Socket Vehicle-specific Hardware and Pin Assignments
No new posts CAN Gateway with I/O Ports CAN Bus General
No new posts Opel CAN bus gateway Interior / Comfort CAN
Jump to:  
You cannot post new topics in this forum.