I was tired connecting my cellphone with an old cassette adapter to my VW Golf with an Beta 5 in it. I needed something new, something cool. And here it is, a fully functional interface between the Beta 5 and any device you want to play the music with.
This project raised out of an ebay search: I just wanted to know if there is a solution to get an AUX input on the car radio. Yes there is, even complete mp3 players are available. But that's not what I wanted - at first!
Then I started digging the web for more info about the protocol the radio talks to cd changers.
The idea was to build a tiny thingy that fakes a cd changer and simply enables the AUX input (as it is available in several online stores). But during the development my ambition became greater and I wanted to read the keys pressed on the radio to remote control my RPi.
1. Understanding the Protocol
First of all this is the pinout of the radio: rkieslinger.de/steckerbelegungen/vag-stecker.htm
The interesting cell is no. 3, the blue one.
DATA IN simply is MOSI of an 8bit SPI interface with special timings between the bytes
CLOCK is SCK of the SPI
DATA OUT is the key code of the pressed key on the radio itself
The radio needs a sequence of bytes to enable the AUX input and display CD# and TR#. It looks likes this:
frame cd# tr# time time mode frame frame 0x34, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x3C
cd# and tr# are sent inverted. So this sequence will display: CD1 TR00
mode sets the playmode (PLAY|SHFFL|SCAN)