Friday, April 19, 2024

DIY In-Car Infotainment with Raspberry Pi and Kodi

Build your own in-car entertainment system — individual touch displays for each passenger, streaming multimedia over a local network with no internet required. Using off-the-shelf hardware and open-source software, each screen costs around $180–$200.

Last updated: February 7, 2026

What's New (Feb 2026)

  • Pre-built SD card image — Download, flash, and boot. No manual installation needed. Download here (~1.2GB)
  • Rock-solid sync — Integrated kodisync for frame-accurate synchronization. Now achieves sub-10ms sync spread (vs. multiple attempts needed before)
  • Auto-negotiation — No more manual master/slave configuration. Each Pi generates a unique hostname from its MAC address and devices auto-discover each other
  • One image for all — Flash the same image to all SD cards. No per-device configuration required
Detailed wiring diagram for DIY in-car infotainment system with PoE switch, pocket router, and Raspberry Pi screens

Complete wiring diagram: PoE switch powers each Raspberry Pi + touch screen over a single Ethernet cable.

How it works

The system uses a distributed architecture — no central multi-head controller needed. Each passenger screen is an independent Raspberry Pi 4 running Kodi, powered and networked through a single Ethernet cable via Power over Ethernet (PoE). A pocket router acts as the DLNA/DHCP server, serving media files from a USB drive to all screens on the local network.

What you need

Component Role
PoE switch Powers and networks all Raspberry Pi screens over single Ethernet cables
GL-MT300N-V2 pocket router DLNA media server + DHCP server (see pocket router DLNA guide)
Raspberry Pi 4 + PoE HAT Media player endpoint (one per passenger screen)
Full HD touch display Passenger-facing screen (one per seat)
USB media drive Stores multimedia files, plugged into the pocket router

Why this architecture

  • Single-cable per screen — PoE eliminates separate power cables, simplifying in-car wiring
  • Distributed decoding — each Raspberry Pi handles its own multimedia decoding and rendering, so there is no central bottleneck
  • Easily scalable — add more screens by swapping in a PoE switch with more ports
  • Fully offline — works in areas with no mobile coverage; all content is served locally
  • Individual or shared playback — each passenger can browse and play their own content, or all screens can be synchronized

Cost per screen

Each passenger display costs approximately $180–$200, including the Raspberry Pi 4, PoE HAT, and a full HD touch screen. The PoE switch and pocket router are shared across all screens.

Software stack

  • Kodi — open-source media player running on each Raspberry Pi, with DLNA client support built in
  • OpenWrt + minidlna — runs on the pocket router, serving media files over DLNA
  • Raspberry Pi OS — base operating system for the Pi endpoints
  • media-mux — synchronization software that coordinates playback across all screens

For the DLNA server setup on the pocket router, see the companion post: Transforming Your GL-MT300N-V2 Pocket Router into a DLNA Multimedia Server.

Installation

Option 1: Pre-built Image (Recommended)

The easiest way to get started — download and flash the same image to all SD cards:

  1. Download the pre-built image (~1.2GB)
  2. Flash to each SD card using balenaEtcher or Rufus
  3. Insert SD cards into your Raspberry Pi 4's and boot

That's it! Each Pi automatically generates a unique hostname and discovers other devices on the network.

Option 2: Manual Installation

For custom setups, you can install on an existing Raspberry Pi OS. See the manual installation guide for step-by-step instructions.

How sync works

Connect a 3-key USB keyboard to any Raspberry Pi — this becomes the sync trigger device. Press KEY_1 to synchronize all screens:

  1. The sync script reads the currently playing media and position from the trigger device
  2. Discovers all media-mux devices on the network via Avahi/mDNS
  3. Opens the same media file on all devices
  4. Uses kodisync to pause all players at the exact same frame
  5. Seeks all players to the same position and resumes playback simultaneously

Sync accuracy: The system achieves sub-200ms synchronization, typically with less than 10ms spread between devices. This is a significant improvement over the earlier version shown in the video, which required multiple sync attempts.

SOURCE CODE

github.com/hackboxguy/media-mux — sync software + pre-built SD card image

github.com/hackboxguy/multiscreen-media — hardware build guide and bill of materials

Version 2 now available: A self-hosting version that eliminates the pocket router. One Pi becomes the master automatically, providing DHCP, DNS, NTP, and DLNA. See Self-Hosting PoE Raspberry Pi 4 Infotainment System.

Tuesday, April 16, 2024

Getting Started with AWS IoT on OpenWrt Routers

While the internet is flooded with hello-world examples and simulations demonstrating the connection and message exchange between AWS-IoT Devices and AWS-IoT-Core using various programming languages like Python, C, C++, and Java, some of us beginners, students, or enthusiasts find true satisfaction in delving into the world of connected devices through hands-on interactions with physical components. The real excitement lies in experiencing the tangible effects firsthand, rather than merely observing basic hello-world messages on a computer screen.

Demo Video

How It Works

In this video, I introduce an engaging approach for exploring AWS-IoT connectivity and its real-world implications using affordable and readily available hardware components sourced from online stores. For this demonstration, I use an affordable (~$30) GL.iNet pocket router as an IoT End-Node.

This router runs on a custom-built OpenWRT Linux image and hosts an AWS IoT device agent service based on the aws-iot-device-sdk-cpp-v2. The WebUI of this custom Linux image allows you to easily configure and provision AWS IoT-specific settings such as:

  • Device certificates and private keys
  • AWS IoT Endpoints
  • Publish/subscribe topic trigger events
  • Custom scripts to control hardware accessories (switches, relays, LEDs, sensors)