• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    C++
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Open source project for W211/W219 W203/W209 Mercs - bluetooth audio control and more!

Mercedes canbus project for older W203/W209/W211 cars

A proof of concept application using an Arduino and Android phone to add extra features to these older Mercedes cars by tapping into their systems via canbus.

This project is now no longer my primary project for the car

If you want to fix things, feel free to submit pull requests to this repository

If you have an android head unit in your car, feel free to checkout a much more feature rich version of this that runs on the headunit here

DEMO VIDEOS

Can be accessed via this link

Project status

So far, the project has grown well out of proportion and has ended up being a way to modernise the W203 slightly. The arduino now requires a HC-06 bluetooth module, which then connects to the android application running on an android device. This now serves to give 'hands free music control' to the car, the steering wheel button presses in the AUX Page are now relayed to the phone in order to change tracks. The phone also then tells the Arduino via bluetooth what track is playing. The arduino will then send can frames to the IC Cluster to display the current track playing.

Controls enabled via the android application

  • Turn on / off indicators and hazard lights
  • Set custom interval for indicator clicks (faster / slower)
  • Unlock doors
  • Lock doors
  • Toggle ESP
  • Retract rear headrests
  • Display custom text on the IC display
  • Set scroll speed of text across the IC display (only if text > 8 characters)

Repo contents:

  • IC_CUSTOM_TEXT - Contains Arduino code for project
  • androidApp - Contains Android app code for project
  • can_read - Simple tool to read can frames from car
  • Replayer - Replays data captured by can_read in realtime. (Used to analyze can frames and work out functions of frames)

Reverse engineering documentation

See here

Hardware setup

Arduino setup

Currently, I have 2 MCP2515 modules. 1 with a 8Mhz Clock thats connected to CAN C, and 1 with a 16Mhz clock that is connected to Can B. (I found out that Can B is NOT compatible with the 8Mhz clock due to its odd bitrate of 83.3Kbps). If you end up using 2 modules with 16Mhz clocks, please change the following line in IC_CUSTOM_TEXT/canbuscomm.cpp:

this->canC->setBitrate(CAN_500KBPS, MCP_8MHZ);

to

this->canC->setBitrate(CAN_500KBPS);

Failing to do so may result in some absolutely wild behaviour with the rest of the car!

Connection to Can B

I am using the X30/7 connector to connect to Canbus B. This is a hub (with multiple wires coming out of it) located on the panel below the drivers steering wheel. you will notice it has a few free slots. This is where I have ran the cables to.

Connection to Can C

Canbus C is a little more difficult. I could not find a connector like for Bus B. Instead, I ran wires to the back of the Instrument cluster. Connected to the instrument are 2 green wires. The Solid green wire is CanH+, and the green wire with a white stripe is CanL-.

Project Limitations

Currently, I have only worked out how to display 1 line of maximum 8 characters on the IC Display. This means that if the track name is more than 8 characters, the Arduino will shift the string by 1 every 150MS, resulting in the text scrolling across the screen to display a longer message. However, the IC Displays response time is appaling, resulting in somtimes a slushy text animation. idealy, I would like to find out how to lower the size of the text on the display in order to display more than 8 characters at a time

More Repositories

1

OpenVehicleDiag

A rust based cross-platform ECU diagnostics and car hacking application, utilizing the passthru protocol
Rust
783
star
2

razer-laptop-control

Project to create driver/software to control performance of razer laptops
Rust
345
star
3

mercedes-hacking-docs

Documents on hacking and reverse engineering Mercedes vehicles
193
star
4

ecu_diagnostics

A Rust crate for ECU diagnostic protocols (UDS / KWP)
Rust
161
star
5

MBUX-Port

Custom Infotainment UI for older Mercedes vehicles (2000-2007), inspired loosely by the 2021 S Class MBUX UI
Kotlin
136
star
6

ultimate_nag52

An open source TCM for Daimlers 722.6 gearbox. Resource repository
100
star
7

Macchina-J2534

J2534 drivers for various Macchina hardware
C++
76
star
8

openStar

Opensource diagnostic software for Daimler vehicles, inspired by Xentry and DAS, written in Rust
Rust
49
star
9

ultimate-nag52-fw

Ultimate NAG52 firmware repository
C++
47
star
10

canviewer-rs

A Realtime CAN network viewer with DBC support
Rust
39
star
11

mb-w211-pc

A fully custom infotainment system for my W211 E55 AMG based on a PC with a custom daughter board!
Rust
24
star
12

j2534-arduino-win

Windows code for J2534 Arduino
C++
21
star
13

MacchinaM2-J2534-Rust

Cross platform J2534 API for Macchinas M2 UTD module
C++
20
star
14

rx8-reverse-engineering

Mazda RX8 hacking / reverse engineering notes and example code
20
star
15

m2-utd-passthru

Passthru API (j2534) Driver for Macchina M2 Under the dash
C++
18
star
16

J2534-Rust

Cross platform J2534 definition for Rust
Rust
12
star
17

ultimate-nag52-config-app

Ultimate-NAG52 configuration app
Rust
10
star
18

arduino-xentry-passthru

Xentry passthru with Arduino (Arduino code)
C++
7
star
19

722_6_arduino_mod

Modification to the 722.6xx automatic transmission via CanBus that allows for a more sportier appeal
C++
7
star
20

m2-utd-dpdu

D-PDU API driver for Macchina m2 under the dash
C
6
star
21

arduino-xentry-passthru-driver

Xentry passthru with Arduino (Windows code)
C++
6
star
22

EGS52_emu

Mercedes EGS52 ECU emulator
Rust
4
star
23

msts-rs

Rust based port of Microsoft Train Simulator 2001 (MSTS)
Rust
4
star
24

razerbiosunlock

Unlocks options in Razer AMI BIOS's
Python
4
star
25

ecu_debug_query_spec

An experimental specification for querying an ECU for debugging purposes over KWP or UDS
4
star
26

serial-rs

A cross-platform serial library for Rust based on pyserial
Rust
4
star
27

razer-control-center

Cross platform control center for Razer hardware - Written in Rust
Rust
4
star
28

rnd-ash

3
star
29

dpdu-rust

An implementation of the core D-PDU (ISO 22900-2) library in Rust
Rust
3
star
30

rusty_hex_edit

Hex editor written in Rust, geared torwards ECU tuning
Rust
2
star
31

serialport-rs

Rust
1
star