BMW E39-RPi Homebrew Navigation System
Motivation
I wanted to:
- have the steering wheel buttons change the track on a bluetooth paired phone
- have modern map data on the screen (the latest MK4 DVDs go up to 2015)
- learn Jetpack Compose
- simplify the original phase of the project, reduce the dependency on the European TV Tuner module for the backup camera.
Timeline
I worked on this project from September 2020 until late 2024. In 2025, I documented the project.
The initial Kotlin/Jetpack Compose work was done in early 2021 and wrapped up by mid-2022. At the end of 2022 I expanded the scope of the project to add a Pi Pico to the design to learn some C++ and to provide a reliable way to turn the device on/off in the car. By the end of 2023, I had the Pico firmware mostly done. In 2023-2024 I designed a bunch of test boards and the main-board. By mid-2024 I had finished up a working prototype of the mainboard. In Spring-Fall 2025, I documented the project.
Architecture
The e39-rpi project is made of several components.
It is a Rasberry Pi embedded Linux device running a Jetpack Compose for Desktop GUI on an X-server. The RPi is attached via GPIO, Power, and USB to a HAT that I designed.
It is designed to be wired into the e39 and make use of the existing displays and buttons.
Car Hardware
The diagram below shows how the e39-rpi board and some of its components work together.
Software Architecture
High level
The Raspberry Pi runs an embedded linux distro that runs my HMI.
The Pi Pico runs a bare-metal firmware that I wrote called “Linster OS for Automotive”
Jetpack Compose HMI
Linster OS For Automotive (Pi Pico firmware)
The Raspberry Pi Pico firmware acts as a hardware controller for the Raspberry Pi in the car.
Functions:
- Relay IBUS messages from the car to the RPi and vise-versa
- listen to IBUS Ignition Key events and turn on the power supply for the RPi.
- send graceful shutdown request messages to the RPi when the ignition key is turned off, before cutting the power to the RPi so that the 12v battery isn’t drained.
- listen to telephone button long-press events so that the user can reboot the RPi when the HMI gets stuck
- listen to telephone button press events to change the screen’s video input source between the RPi and the factory nav system.
- not relay knob turn/press events to the RPi when the RPi isn’t the selected video source, so that navigating in the factory menu isn’t manipulating the menus in the RPi.
Pico-Pi Private Message Protocol
The Pi and Pico send each other special messages over the same IBUS link, allowing the Pi to control the PICO hardware directly and set configured behaviour. The Pico can send messages to the Pi as well, to respond to configuration queries, warn the Pi of impending shutdowns, and send log messages.
Raspbian Firmware (RPi)
This is a prototype setup that needs some initial setup work to setup the HMI environment.
Hardware Design
I designed a custom-board (e39-rpi-mainboard) that incorporates a series of building blocks that I all tested separately.
My hardware prototyping setup consists of:
- Development Laptop
- Development Laptop attached to car
- Test bench
- Development Laptop attached to test bench
- Test “sled”
- Test “sled” attached to my car
- e39-rpi-mainboard boards attached to the test bench
- e39-rpi-mainboard board attached to my car (production environment)
The software protoyping setup works by writing code on a PopOS laptop, which has a similar BlueZ/DBUS environment, allowing rapid local development. The
Overview
Development Laptop (& attached to car)
This is where I started the project in September 2020.
Test bench
The test bench is where I started building the hardware for the project. It consists of an IKE instrument cluster, steering wheel buttons, BMBT screen, and wiring via terminal blocks for easy prototyping. I built this so that I didn’t have to sit in the car for extended periods of time writing code.
I spent most of 2021-2022 fiddling with the test bench while the pandemic was going on. I made it L-shaped so that I could watch TV with it on my coffee table.
Test sled
I started building the sled after I realized I needed to miniaturize the design.
I needed a way for the RPi power to be turned off and on with the car, and I wanted to reduce the dependency on the European TV Tuner Module.
I build the sled as a precursor to the main-board. The sled contains all the test-boards that make up the main-board. I was able to test the sled in the car
Mainboard
I installed the main-board pictured at the top in a modified MK4 navigation case. The in-car installation is rather tidy.
ToC
Sitemap (Table of Contents)
- BMW E39-RPi Homebrew Navigation System
- Sitemap
- Pico
- Application Framework
- Inter-device Communications Framework
- Inter-device Logging
- Pico
- Pico Run-time Configuration
- Pico Graphics Library
- IBus
- Observers
- IBus Writers
- Development Environment Setup
- Peripherals
- Hardware
- Test Boards
- Video Output
- Test Bench
- Sled
- Mainboard
- E39-Rpi HMI
- E39-Rpi HMI
- Platform
- Service List
- Platform Service Channels
- Now Playing Screen
- Bluetooth Integration
- Map
- Widget Framework
- Settings
- Debug Screens
- Matrix Chat
- Development Environment
- Pico Interop