Mercedes W212 - engine swap OM648 and additional electronic unit project for this job - CanBus Bridge
At the outset, I would like to explain the purpose of the project "Mercedes CAN-Bus Bridge." Engine ECUs, for example OM611, 612, 613, 646, 647, 648, M112, M113 generate data for the car's CAN-Bus network. This data is sent and received in a specific format, at a certain speed, with its own sequence number (ID), and a data string for each ID. Each data string contains information such as engine RPM, coolant temperature, diagnostic data, torque and many, many other things. From my observations, in 2008, Mercedes changed the approach to sending data on the CAN-Bus network (though I could be wrong). They created a sort of "Tower of Babel," mixing data between device IDs and completely changing the IDs. What was previously sent on ID308 moved to three other IDs, with different data. There is no way for an "older" device to work with "new CAN-Bus" devices.
This applies to every car component. Nothing, absolutely nothing can be made to work together through coding or typical procedures. On top of that, the 500 kbps line was split into 2 separate 500 kbps lines, one for the drive and one for communication with the instrument cluster or EZS.
Wanting to install an older engine like the OM648 into a newer car (here a 2012 model W212), there arose a need to create an electronic device and software that would translate data between modules to correctly display information on the instrument cluster, allow starting the engine from the original ignition switch, activate the fuel pump, and enable proper operation of the automatic transmission. In technical terms, this will allow connecting the FBS2/FBS3/FBS4 modules with each other.
Project details:
- electronic unit with two strong STM32F407
- 3 canbus lines nececery for this job
- filtering and protection canbus inputs/outputs
- translate all nececery canbus data both ways for this swap

Few videos from installation in cars
Car installation - what should you remember when making a wiring harness? Is it difficult?
Few wideos after my jobs and some explanations (sorry, but only Polish language, but you turn on translation/subtitles in Youtube).