Bringing Android Auto to Audi Navigation Plus (RNS-E) using a Raspberry Pi

Ben Davey
7 min readJan 8, 2018

Starting in 2006, Audi started rolling out a deluxe navigation option across their vehicle fleet. For a now 12-year-old system that pre-dates the iPhone, Audi managed to do a pretty fantastic job of keeping the system extensible — The system has maintained a healthy community of enthusiasts and tinkerers who continue to linger on places like Audi-sport.net

Since buying my Audi in 2014, I’ve gone through multiple iterations of stereo enhancements to provide functionality like Kodi support, screen mirroring, and remote control capability via the system’s MMI buttons. Most recently, I managed to get a makeshift Android Auto implementation into operation. This guide will walk you through how to build a system like mine, as well as the scripts and patches I built to get everything glued together.

Video of the project in action

Features

Full Android Auto support

Use all of the features of a modern high end head unit including nav, audio, and google assistant. Trigger google assistant from your steering wheel, or from the Audi onscreen buttons

Kodi support

Watch video off USB drives (…or online using your phone as a hotspot…)

“Oh, Hi Mark”. Watching “The Room” from a connected USB drive

Screen mirroring

Mirror your device over ADB using key controls (up, down, left, right, google, ffwd) from adb

A2DP sink

Play tunes from your phone or other device through your car. Look for the ‘BeatsByBen’ device.

Supported systems

This project has been tested on RNS-E systems from 2006–2010 (1st generation). For 2010+ models, you’ll also need to purchase a VIM filter module from somewhere like Kufatec.

This project could probably also be easily adapted to work with systems like the Volkswagon RNS-510, Seat, Skoda, and Mercedes command systems.

Required hardware

  • RNS-E removal keys — enable you to get the device out of the car and into your house :-)
  • Kufatec “basic plus” video input module — used to enable composite video input on the RNS-E. If you’re the DIY hardware type (…i’m not..) you could probably save the $200 and build one of these yourself. It’s essentially a device that sends CAN signals to advertise the presence of a ‘TV’ input on your hardware, and provides composite input.
  • Raspberry Pi 3b — For running everything.
  • MicroSD card — I used a Samsung 32GB model. The image i’ve provided expands out to 32gb, and I haven’t bothered reducing this size.
  • SKPang PiCan2 — A daughter-board for the Raspberry Pito enable CAN input via an MCP2515
  • 3.5mm -> Composite video cable — Enables analog video output from the Pi to the stereo. Note: buy one from Adafruit and don’t try using one from an old Roku; it doesn’t work…
  • (optional, highly recommended) USB sound adapter — The PWM audio output that comes with the Raspberry Pi is complete garbage, especially if the Pi is being powered by a noisy power supply. Buying this will elimate noise. The microphone input is also needed if you want to drive the Android Auto assistant using your voice
  • (optional) A microphone assembly — used for google voice control & handsfree
  • (optional) Quadlock extender — This project involves splicing a number of wires to get systems working correctly. The Quadlock cable you’ll have in your car is pretty short, and so I personally recommend having one of these so that you’re not butchering your wires or making them shorter than they need to be
  • (optional) DC-DC power supply — You’re going to need something to power your raspberry pi inside your car. This’ll hook straight into your RNS-e power supply on one end, and into the Pi on the other.
  • (highly optional) Benchtop power supply — You’re going to want to test your configuration outside your car before you install it. I highly recommend the “Blizzard” from mystic engineering. It’ll let you take a $5 ATX power supply and gives you high quality output for +-12V, 5V, 3.3V and USB. It’s a solid investment for any tinkerer.
  • (optional) USB type-A extender — This’ll let you run a wire out from the Raspberry pi (which you’ll likely place inside your dashboard) to the outside world, so that you can plug in things like USB flash drives, and your phone.

Download the image

A pre-configured image of the complete system is available here

Setting-up the system

Step 1— Get video input working

  • Use the RNS-E removal keys to remove the stereo from its holder. In my case, a key needed to be inserted beneath the screen (hit the eject button on the DVD player).
  • The system should come out effortlessly. If it doesn’t, check the orientation of your keys
Freshly removed system with keys still inserted
  • Disconnect all cables and take the system to somewhere you can test it
  • Take the Quadlock extender, and cut the following wires: CAN-H (pin 9), CAN-L (pin 10), KL-31 (pin 12, ground), KL-30 (pin 15, +12v power)
  • ‘splice-in’ the CAN-H, CAN-L, GND, and +12V wires from the Kufatec basic plus module
  • Make a CAN connection for your Raspberry PI by taking 2 insulated wires of approximately 30cm (11 inches), twisting them (important… avoids interference) and splicing those into the CAN-H, CAN-L wires on the extender
Spliced wires. I’m not the soldering type, so cable connectors will have to do!
  • Plug your system back in
  • If everything worked, you should have a TV input on your RNS-E!
A “TV” source means that the Kufatec CANBUS connections are working correctly
Kufatec test pattern

Step 2— Patch your firmware (or install VIM bypass hardware…)

I could ramble on this step, but there’s a tonne of information in forums about it. Essentially you need to create a patched navigation DVD image to install firmware, change a couple parameters using a VAGcom cable, pull a fuse and leave for 12 hours, and then you’ll have video-in working when you drive over 5MPH.

This is by far the most agonizing part of the installation procedure. Unfortunately I can’t remember doing it (…I did it over 3 years ago), but I recall having to make several attempts at it, and renting a VAGcom cable to set particular parameters.

Step 3— Flash your Raspberry Pi & connect everything up

  • Use a tool like Etcher or dd to flash the provided Raspbian image onto an SD card
  • Connect your USB sound adapter to your microphone and to the kufatec RCA inputs. Use a 3.5mm-> composite cable to wire the audio outputs from the USB audio adapter into the Kufatec
  • Connect your twisted pair CAN wires into the CAN_L, CAN_H wires of the PiCAN2
  • Plug in your 3.5mm -> composite adapter into the pi and connect the video cable into the kufatec (NOTE: don’t connect the audio wires directly from the pi. Cut them off, or simply ignore them)
Gettin’ wired!

Step 4— Run Android Auto!

  • Boot the system. After seeing kernel output (check it for errors!) you should be presented with a menu. If everything is connected and working, you should be able to select either Android Auto or Kodi from the onscreen menu using the MMI button on the RNS-e. If this doesn’t work check your CAN connection and refer to the can debugging section of this doc
Boot menu
  • Select “Android auto”, install Android auto on your phone and connect it to a USB port on the Pi. With a bit of luck things should just magically work out of the box!

Android Auto controls

Tinkering with the image yourself

You may wish to update settings on the device or play around with things

Getting out of the menu/to a terminal

  • Hook up a keyboard, hit ‘space’, fire up a new tab with ctrl-shift-t. You’ll be a root user…
  • ‘pi’ user default password is ‘audi1234’
root terminal

Where things live

  • home/pi/menu — a rudimentary menu system that listens for CAN messages and enables the selection of items like Kodi or Android Auto. Uses the Linux framebuffer to draw menu items
  • home/pi/headunit — Compiled and patched version of this Github project. I’ll be committing the patches back to this project soon
  • home/pi/canread — Node.js scripts to listen to CAN input and send to the headunit app
  • /usr/share/fastboot/*.sh — scripts used to perform screen mirroring over ADB. Includes google’s adb tooling
  • /home/pi/miraclecast (no longer used) — You *could* run this to mirror your phone over miracast, but since support is starting to fade away, I haven’t made this a menu item

Configuration changes & init scripts

  • /etc/systemd/system/x11.service, home/pi/.xinitrc — Initialization for menus, etc
  • /etc/systemd/system/cancontrols.service — Brings up the Can0 interface with appropriate baudrate (For reference, it’s 100kbps…)
  • /etc/systemd/system/screenmirror.service — starts/stops screen mirroring over USB/ADB

/boot/config.txt — There have been several updates to place the screen in 800*480 resolution and output in PAL. The setting of GPU memory allocation is also important for playback on XBMC. Reduce the GPU allocation if audio on Android Auto becomes choppy. On first reboot, the system will be slow, but should be fine on subsequent reboots.

Debugging CAN connectivity issues

If MMI controls aren’t working, it’s likely your CAN interface isn’t wired up correctly.

  1. Get into a terminal (outlined above)
  2. check that the can0 device is alive using:
    ifconfig can0
  3. Check for CAN messages. You should see a heap:
Healthy CAN output. Here you can see the Kufatec advertising its presence

--

--