This project was inspired by the 2020 S Class UI (MBUX)Originally, I wanted a replacement infotainment system for my car (An old W203 Mercedes Benz). So I bought an Android head unit (XTRONS Quad core Rockchip unit)Initially I was happy with the fact it had bluetooth (Stock radio required an MP3 cable for AUX), however I was unhappy with the interface on it. Inspired by the 2020 S class MBUX UI, I decided to write a custom Android app for it, which reads and writes CAN BUS frames to both networks of the vehicle (CAN C and CAN B)
This has allowed me to effectively control various features about my car, and read tons of sensor data that is normally not available via the ODB2 port.
Compatibility
This project (code base), will work with the following Mercedes models (due to CAN ECU architecture being the same:
- W203 (C class)
- W211 ( E class)
- W209 (CLK class)
- W215 (CL class)
- W221 (S class)
To obtain what data is within my cars CAN Frames, I managed to reverse engineer the DAT file format Mercedes uses in DAS/Xentry for CAN BUS simulation. You can find the decompiled data here for my CANB network:
https://github.com/rnd-ash/MBUX-Port/blob/master/203_b.txtI then wrote another script (db_converter.py) to take this processed data and convert it to Kotlin class files for the Android app, meaning writing to CAN BUS and reading values is super easy since I don't have to do the manual bit shifting operations to extract values from the can frames, its all auto generated!
I have made a youtube series documenting the entire process and decisions I have mode during the creation of this long summer project:
As a future teaser, I am currently porting DOOM1 to the unit, using driving controls for player movement and using the lights show I created in Part 2 of the series to flash the lights based on weapon firing in game.
Comments