Android and Other

Audi A4/A6 B6/B7/C5 – RNS-E controlling Raspberry Pi 3 with Kodi

This guide will cover steps needed to configure Raspberry Pi 3 (2 works just fine too) to accept messages from RNS-E (via canbus). This will allow to use RNS-E buttons to control Kodi player on the Raspberry Pi. You will need:

  1. RNS-E – it can be from any Audi car, both first and second generation (media button and LED screen indicates second generation) RNS-E are OK for this. I will be using A4B6, first model RNS-E.
  2. Multimedia Adapter IMA Interface RNS-E Symphony 3 Video TV Cable Plug Audi or any other interface which can give you RCA input to RNS-E. Original TV tuner which comes with Audi should do the trick too, as I did not have it, I had to purchase this.
    IMA Interface
  3. RCA cables
  4. HDMI2AV converter. It will be used to convert HDMI signal, to RCA/Composite. Note: You could go directly from Raspberry Pi to RCA via it’s built in composite output, but if you would look up forums you would notice that they are full of complains about poor audio quality and static noise. Been there, tried suggestions, they did not help a lot.
  5. HDMI cable, try to get short one.
  6. Raspberry Pi 3
    Raspberry Pi 3
  7. PiCAN2 CAN-Bus Board
    PiCAN2 CAN-Bus Board
  8. microSD card – make sure you get fastest microSD card you can get, I am using Class 10 which works quite nice.

For the base of this project I have selected Raspbian Lite, you should be able to use any Raspbian based operating system, but I selected this to keep packages to the minimal amount. You can download it from here. At the moment of writing this tutorial, latest version is 2016-05-27.

Once you have file downloaded, extract it, you will get .img. Use Win32 Disk Imager to write it to your microSD card.
Win32 Disk Imager

Then insert it to the Raspberry Pi, plug in the Ethernet cable and power it on. Use SSH client (Putty for example) to connect to it, for that you will need IP address of the device, check your router in order to locate it. Enter IP address and port 22.

During the first connection, you will receive a security alert, that is normal, click Yes.  putty_pi3
Once you are connected login, the default username is:
The default password is:

Before we continue, it is a good idea to update all packages to the latest version and enable some features. Type this to the putty:
sudo apt-get update
sudo apt-get upgrade
sudo reboot

Then re-connect to the device via putty again and re-login, now type this:
sudo raspi-config
It will launch the tool which we need to use to configure the device.

  • 1. Expand Filesystem – Select it and wait few moments, then just click Ok.
  • 3. Boot Options – Select it and then in the next windows “Console Autologin”, then click OK.
  • 4 Wait for Network at Boot – Select it and then it will ask if you would like to wait during boot until you get the connection, select No.
  • 9 Advanced Options – Select it and then “A5 SPI”, select “Yes” to enable SPI Interface.
  • Now select “Finish” and reboot.

Then re-connect again. We need to install some packages which we will be using later:
sudo apt-get install git python-setuptools autoconf libtool
Now type:
sudo nano /boot/config.txt
The command above will open a text file which we need to modify. Note please that # means that parameter is commented out and does not work. Leaving old parameter in there as a reference, as that was the parameter which you had to use in previous Rasbian versions and now it has been changed. Scroll down to the bottom of the file and add the lines which are bellow. Your config already should have dtparam=spi=on in there.

#terminal zoom
# Adapt overscan values to your needs
# disable_overscan=1
# overscan_left=57
# overscan_top=20
# overscan_bottom=20

Now some explanation:

dtoverlay – parameters to enable can-bus board
disable splash – disables that color rainbow which is shown during each boot
framebugger – to have readable console during the boot

Now we need to reboot to apply all changes and new boot commands:
sudo reboot

Then re-connect again and use this command, if all is ok you should not receive any response:
sudo /sbin/ip link set can0 up type can bitrate 100000
Then type
You should see this can0-00:

If you can see it, then we can continue. Now we need to use these commands, there must be no error reports at all:
git clone
cd can-utils
sudo make install

Now whole PiCan side is done, yet we still need to start it automatically with the system. In order to do that:
sudo nano /etc/rc.local
Then scroll down and just above “exit 0” type this:
sudo python /home/pi/

Some notes regarding nano editor, CTRL+X will close it and ask if you want to save, click Y and then Enter.

At the moment file does not exist and we need to create. In order to do so:
nano /home/pi/
And paste this text in to it. This is needed to auto start can0:
import os
#os.system("sudo ip link set can0 up type can bitrate 100000 restart-ms 100 loopback on")
os.system("ip link set can0 up type can bitrate 100000 restart-ms 100")



EDIT 2017: for some reason, dropbox no longer allows direct links, as result wget will no longer allow downloading the files. Please download them manually via browser and simply put them to pi, then use same steps as usual:
Google Drive Backup for files

cd ..
Now, while you are in /home/pi type:
tar -xvf hardbyte-python.tar
cd /home/pi/hardbyte-python
sudo python install
sudo nano /usr/local/lib/python2.7/dist-packages/python_can-1.4.3-py2.7.egg/can/interfaces/

Last command will open editor, which you need to use to add two lines in the correct location:
can.rc['interface'] = 'socketcan_ctypes'
can.rc['channel'] = 'can0'


PiCan part is now fully done, now we need to install Kodi and the EmulationStation. Personally, I would recommend using RetroPie script for this, it might not be as clean as doing it by your self, but it for sure will work.
Script and steps how to do that are in here they might change as time passes, but at the moment I am writing them down as they are now. Again make sure you are in /home/pi folder then type:
git clone --depth=1
cd RetroPie-Setup
sudo ./

The last command will take some time to complete, as it needs to load and install some extra packages before it even can start installing EmulationStation. Once it completes you will be greeted with the tool which looks similar as raspi-config, yet due to the putty, it did look kinda weird on my side.

You need to select the first option (Manage Packages) and then the first option again (Quick Install), then select Yes that you want to use that option. Now leave it working, as it will take long time to complete.

Once it is done you will need to go to the “opt manage optional packages” option, it just bellows in the second window 5th option after “Quick Install”. In there scroll down and locate Kodi. Install it.

Once that is done select “Back” few times until you are in the very first menu. In there select “Setup / Tools”, then select “autostart”, in there select “Start Kodi at boot (exit for EmulationStation). To my surprise, it was NOT there few days ago. Way to go RetroPie developer!!

EDIT 2017: for some reason, dropbox no longer allows direct links, as result wget will no longer allow downloading the files. Please download them manually via browser and simply put them to pi, then use same steps as usual:
Google Drive Backup for files

I have selected that I wanted to reboot, but it did not work, so I had to exit from that tool and type:
sudo reboot
Now we need to install skin and service. Download these files and install them to the kodi from: System – Add-ons – Install from zip file

PS: Source of the skin is in here. I have made some modifications to suite my needs and preferences:
Removed car image from the center of skin.
Arcade button added to bottom right side (quits kodi)
Song progress bar moved to bottom instead of just cover
Removed song genre
Enabled Song Artist and name wrapping to other line and centralizing instead of cutting text behind the image
Adjusted cover size and song name in full-screen visualization
Removed OSD from full-screen video playback, controls are done via up/down button for rewind, next video via next button which works for songs too
Removed clock, as it was showing wrong time all the time in my car (no sync with car time)
Added global background and back button to music tab
Removed search and other fancy stuff from music tab
Made some text alignments for EN language, which mostly backfired for other languages
Extended size of right size images, as before it was not covering whole screen and whole right side had black line, plus extra separator added, this done in many windows
Added GlobalBackground to the full screen video playback, which should prevent from seeing terminal when video does not fill whole screen due to video screen ratio

Once that is done do not switch to the skin yet, we still need to configure kodi, and new skin is not quite good for that. Firstly add your Music and Video sources, personally I have created new folder for each of them in the home directory, they can be accessed already via FTP client. You also can upload your game ROMs to the /home/pi/RetroPie/roms


Go to the Settings – Services. Scroll the way down and select “Settings level” set it to the “Expert”.
Now go to the “Web server” option and select “Allow remote control via HTTP”, change the user name to pi, do not enter the password.
That is practically it, yet personally I still do some extra tweaking here and there in the Settings menu:
Appearance – File lists. I disable “Show “Add source buttons” and enable “Show hidden files and directories”.
Appearance – Screensaver –   Screensaver mode – Set it to None. If it is enabled it will go to sleep and console will be visible.
Video – Playback – Enable “Play next video automatically”
Video – Playback – Adjust “Display 4:3 video as” I personally set it as “Stretch 16:9”
System – Input devices – Peripherals – CEC Adapter. Un-check “Enable” option to disable it, this always pop-ups when Kodi starts.

Now you can use custom skin or use the one you desire. A custom skin has “Arcade” button but it just performs c the mmand to Exit the Kodi which any skin can do.

You also can tweak a bit the EmulationStation. Exit Kodi and wait a bit, it will load EmulationStation, once it is loaded it will ask to configure your controller (USB joystick or Keybaord), do it, then go to the “RetroPie” entry and go to the “RetroPie-Setup”. In there go to the “Setup / Tools” – “esthemes”, use it to install new skins for the EmulationStation. I personally use “pixel” and “material”.

Then go to the “splashscreen” which is in the same level as “esthemes”. You can use custom images and even vidoes in here, yet video might end sooner or even take longer than the boot takes, avoid using images/videos which have bright colors in the edges as during boot you might not have use of whole screen, so try to stick with dark background images.

Now connecting all of this to the car, that is quite simple.
If you use Multimedia Adapter IMA Interface  then it needs to be plugged in to the back of RNS-E, once it is plugged you will have to connect ground and Can-H/Can-L from it to the RNS-E, check top of RNS-E to know what is what, you also might need to code your RNS-E to enable TV mode.


Now you need to get another wires from Can-H/Can-L to the PiCAN2 CAN-Bus Board, check the board, it is written what is what. I personally connected just these two wires to the module.

Now simply plug RCA cables to the Multimedia Adapter IMA Interface, then RCA to the HDMI2AV, and it via HDMI to Raspberry Pi.

This article is combination of various forums and pages. Main source is in here, he is the one who created script for controlling Kodi . Yet due some outdated and syntax errors it was quite hard to follow, as result I made this one to be able to restore my build quickly from one page.
EmulationStation was added with the help of RetroPie forum.



73 thoughts on “Audi A4/A6 B6/B7/C5 – RNS-E controlling Raspberry Pi 3 with Kodi”

  1. Labas, taip jau nutiko, kad turiu buvusę tavo A4 (GTS) 🙂 nebesugebu iš game mode pereiti į grotuvą, kuris rasberyje yra.. gal papasakosi kokia kombinacija? Nes dabar by default visada game užkrauna.. uždėjus į kodi nebegryžta vis tiek..

      1. O kažko įdomaus dar yra be klipų, muzikos ir žaidimų? Bet šiaip tai žiauriai kietai tu čia sudėjai. BTW, kodėl visko neišsiimei kai pardavei?

      2. Cool, butu kada smagu pamatyti senaja GTS.
        Dabar nelabai suprantu pačios problemos.
        a) Paleidus PI ji startuoja į Kodi ir duoda perjunti į EmulatioStation, bet neleidžia grįžti į Kodi.
        b) Paleidus PI ji startuoja į EmulatioStation ir neduoda perjungti į Kodi

  2. Hey. My RNS-D sends commands when you press the UP buttons

    464 10 20 02 02 00
    464 12 20 02 02 00
    464 14 20 02 02 00
    464 16 20 02 02 00
    464 18 20 02 02 00
    464 1A 20 02 02 00
    464 1C 20 02 02 00
    464 1E 20 02 02 00
    464 10 20 02 02 00
    464 12 20 02 02 00
    464 14 20 02 02 00
    – // – // – // – // –
    How to change your addon?

    1. ShutDown, at least in my build, when I had it, was done by the ignition key, not the radio itself. Codes on RNS-D might be different, but shutdown process should stay the same

      1. Sorry my english (google translite).
        It’s in your addon
        if canid == (“461”): # Canid 461 wordt gebruikt voor het gebruik van RNS-E knoppen.
        if msg == (“37 30 01 40 00 00”): #Up
        it means UP = 37 30 01 40 00 00

        My can codes change first 2 characters
        UP = 10 20 02 02 00
        UP = 12 20 02 02 00
        How to change, so pev characters were not considered
        if msg == (“10 20 02 02 00”): #Up
        do this way
        if msg == (“** 20 02 02 00”): #Up

        Tried to do so
        if msg == (“10 20 02 02 00”) [3:]: #Up
        So as not to read the “10”. But so rns-d was not controlled at all.
        Can now understand me?

  3. i followed your tuto to the letter but the buttons are not working and the ifconfig is showing packet loss on every package, pican2 rpi3 kodi17 jessie. can you assist?

    1. Sadly I have sold the car few years ago.
      Make sure that the interface is up and visible in ifconfig, double check wiring, make sure that wires, especially at canbus box side are not touching each other.

  4. Hi thanks a lot for your tutorial!!

    Could you please tell me how to this in a skin?, so that i can change in the skin tal i have “Add GlobalBackground to the full screen video playback, which should prevent from seeing terminal when video does not fill whole screen due to video screen ratio”


  5. Hello,

    After I’ve seen your guide i bought newest raspberry pi 3+ with pi2can module. GREAT and inspiring idea to build such interface! Thanks!

    Could you give me any advice what tool you used to edit / create Kodi skin? Is it possible to get interface graphics in higher resolution?
    I’m trying to update skin for newest Kodi and higher resolution screen in RNS-E 193G

    It’s pain in ass to edit some values in xml and install skin on Kodi again and again just to debug…

    Thanks in advance

    1. Hello,

      Skin modification was a pain in the ass truly…
      I did not have any special tools, I have used Notepad++ on Windows computer.
      Majority of testing was also done in Windows Kodi, then moving to car back and forth, not very interesting experience.
      I have files only for first gen RNS-E, sorry.

      1. Same here, working in Notepad++. Kodi is nice platform, but as it’s open source there are no good tools to do development :/

        I felt it would take too much time to write what i want in light version, so i bought full one from Dutch man. It’s not perfect, without translation and with bad images (it’s a shame that there are low resolutions -.-), will see if i can modify it a bit to make more perfect.

        Actually i can update somewhere updated light version, what I’ve done till now. It can be ran on new Kodi and new Pi, but there will be still many interface bugs. Anyway it operates on basic level as it is supposed to do, so if someone would like to operate light version from this guide could easli start without much coding in XML’s

      2. Have fun. All in all I had dis in my A4 B6 which has mk1 RNS-E, sold it, now have S4B6, again with mk1 RNS-E.
        Not sure if I want to go the same way again or to purchase Android based which looks the similar as OEM.

  6. Hey man, If i just want to connect my iPhone via HDMI cable I only need to plug the “Multimedia Adapter IMA Interface RNS-E Symphony 3 Video TV Cable Plug” to the RNS-e then connect the RCA cables to the AV 2 HDMI and connect it to my iPhone? or I have to code and do all of the steps

    1. Have not done that, but coding is needed to have controls working from RNS-E to the source of your player.
      Theoretically if your connection allows to transfer the signal, then you will be able to control everything via iPhone.

      1. OK, I don’t mind controlling everything from my phone. I just want to mirror my iPhone on the RNS-E screen as an auxiliary to watch videos or use the Navigation from my phone. I don’t intend to control the iPhone with the RNS-e buttons nor the wheels controls. From what I’m seeing i just need to go until step 5, buy the parts, technically just connect it and the rns-e will recognize the iPhone and project it on the screen no code needed for the rnse to recognize the phone?

      2. Hard to comment as I have not done what you are trying.
        You for sure need Multimedia Adapter IMA Interface RNS-E , this will give you RCA input.
        Then you need something that can convert your iPhone signal to RCA.

      1. Yes and no.
        Yes there is a plugin for that, but when I tried to use it froze all that was can-bus related in my car…
        Steering wheel controls no longer worked, rns-e buttons froze, as a result, I have used only plugin which allowed to read can-bus signal so PI could be controlled and not sending can-bus signals.

  7. thank you very much.
    I have solved it, it was a problem with the addon that sends the information to the fis, when i disabled the music plays ok.
    thanks for the help and for the post.

  8. Sorry for my english and thanks for the quick response.
    When I play a song or video the audio is “Choked” . The music stop and then continues, i dont know how to fix it.


    1. I did not have such issue. You should check if same is not happening while your Raspberry is connected to for example to your home TV via HDMI.
      If it does, then something is wrong with your installation.
      If it does not, then mostly issues is with Multimedia Interface or can signal.

  9. Hi
    First thanks for the work realized in the post.I followed all the steps and i have my raspberry pi working in my rnse, but i have a problem the audio is cut, and i dont know how to fix it.
    Could you help me??


    1. Yes, mostly you can and can bus message should be similar of not the same.
      Yet I would check the screen resolution of RNS-D as it is already quite low on RNS-E, so it might be even worse on RNS-D.

  10. sveikas, gal zinai ar veiktu viskas su kitais magais, tarkim rns-d ar vw mfd? Ar skirsis can komandos ir neis valdyt ?

    1. Su rns-e manyčiau turėtu veikti, dėl mfd nežinau.
      Negaliu garantuoti, bet teoriškai kai turi multifunkcini vairą, tai komandos veikia tiek and rns-e tiek and rns-d, tai spėčiau kad canbus komanda tokia pat.

  11. Hey,

    cool stuff. Just ordered the PiCAN2 and try this myself. The only thing I was wondering, do I have to use 120Ω Terminator (JP3) on the PiCAN2 port or is this not nescessary?


    1. Hello,
      You need only to put it on PI (that will power the pican2 board) and then connect can hi and can low from board to rns-e. That is it.

      1. Thank you, so I don’t need to solder a jumper bridge to JP3 on the board, great news. Do you have any experience in also connecting PWR and GRND directly to the PiCAN board because I was wondering if this means, that the board automatically turns on/off the PI when there is either an electronic ignition respectively when the key gets removed. Normally PWR (which goes to the RNS-E) is a steady positive pole but I wasn’t sure if the PiCAN recognises ignition and stuff like that because it is also connected to CAN-High and CAN-Low.

      2. Nope, you do not need that.
        I was powering it from PI, have not used GRND either.
        When I start a car, it powers my USB charger, when charger gets power it powers Pi and turn it on automatically.
        When I turn my key in the ignition to off position, it sends signal via can which is read by PI and it shutdowns.
        Only draw back that I cannot just quickly turn the key off and get out, I have to wait a bit until Pi powers off cleanly.

  12. Hi,
    would it be possible to reupload skin + hardbyte code pls?
    it would be awesome ❤
    thanks in advance

    1. Hello,

      Dropbox changed their policy and it no longer allows direct links, as results wget will no longer work 😦
      You still can open these links in your browser, on your computer, and download them, then upload them via FTP client to the pi.

  13. From my audi video interface i have Can-H/Can-L, but what are the wire black/white and the wire blue/yellow?

    1. If I remember correctly:
      can-high is yellow
      can-low is blue
      black is ground
      white is sigan/power

      Sorry, sold the car recently, so not quite sure.

      1. from audi interface i have 4 wires:
        red – power
        brown – GND
        wire black/white (this is can-high or can-low??)
        wire blue/yellow (this is can-high or can-low??)

  14. Hey man, great write up! I’m installing a Pi3 in my Audi as I write this. I’m using the same multimedia interface you are using and have a question about wiring. Where do the four wires go that come from the multimedia interface adapter? There is a red and brown wire, and a black & white and blue & yellow wire that are both twisted together. I’m not sure where to connect these ends. Any help is appreciated!

  15. my idea was to put the image of the mobile phone android for my RNS-E.
    With the screen off, and the image only in RNS-E.

    1. Yea tried that with OnePlus One and some “miracast” device from china. Sounds working, video kinda…
      Quality from FullHD to RNS-E screen was just terrible, you would not be able to see without putting your face up to the screen, everything was pixalated.
      It might have been my china device too, as quality did not improve once I connected it to the TV too.
      Also that chine device did not have switch to change from PAL to NTSC and vica versa, so another headache.

  16. there is not a direct adapter :
    32 pin – audi multimedia interface hdmi
    or other easier way without so many cables and adapters ?

      1. it is even necessary to feed the converter with 5v ? I ‘ve seen in some videos that are not necessary but they were testing monitors and televisions.

      2. HDMI2AVI did said low power, and it indeed does work without power, weirdly enough, but as my Pi had only few ports used I fed it from Pi.

    1. I am not familiar with that device, if it has RCA output, then you can plug basically anything. Yet CanBus might and mostly does sent other signals, as result controls might need to be adjusted.

      1. Thanks – The RNS-E and RNS510 from VW is very similar. I have ordered the Kufatec IMA input and a PiCAN2 to use for canbus.

        The CAN signals for VW and Audi should be very similar yes?

      2. Thanks, will let you know how it goes. Appreciate the great write-up.

        Sorry for last question – in theory I could use openelec instead of rasbian?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.