Closed · Oct 2026
Project — 01 · hardware · hack

Car Thing Desk Hub

Spotify ended support for the Car Thing on 9 December 2024 and turned it into a paperweight. Inside is still a capable little Linux computer with a touchscreen, a knob, buttons and four microphones. This project reflashes it and makes it a desk dashboard: markets, news, weather, calendar, Spotify, server health, iPhone notifications and Mei, a voice-assistant cat, all fed from a home server over the USB cable.

The Car Thing screen showing a markets dashboard with Bitcoin, gold, indices and currency rows
markets page, captured from the device
try it · Swipe the screeninteractive

The hub screen with swipeable tiles. The interactive demo loads here when scripts run.

  • 512 MBRAM, 4× Cortex-A53, single-core Mali-G31, 800×480 touch, no Wi-Fi.
  • 54–59 fpson the device after profiling; p95 frame 16.8 ms.
  • 0 keyson the device. It is treated as untrusted; the hub holds every secret.
  • 0 depsin the Node 22 hub. Plain ESM, plain JavaScript UI.
The idea

A paperweight with Linux inside

The hardware is not dead, only its software. With community firmware (Nocturne, a Yocto build with a recent kernel and Chromium) it boots into a kiosk browser, which means the screen can show anything a web page can. The physical knob and preset buttons are what make it worth keeping on a desk next to a phone and a monitor.

Weather page with current temperature, hourly forecast and air quality
weather
A news article summarised on the device screen
news with a summary

The constraints shaped everything: a device with no Wi-Fi and a weak GPU, free APIs only, and a box that ships with a public root password. The answer was to keep the device thin and dumb, put all logic and keys on a home server, and connect the two with a point-to-point USB network.

Architecture

A thin screen, a thick server

Server health page showing the two home servers
server health, fed by the push-only agent
architecture · diagram
 Car Thing (untrusted)                    Server 2 (home)                 internet
 ┌─────────────────────────┐  USB NCM   ┌──────────────────────────┐   HTTPS out
 │ Chromium kiosk          │ ─────────▶ │ hub  Node 22, 0 deps     │ ───────────▶ APIs
 │   UI ◀── SSE state ─────┼─────────── │   all keys, all logic    │   (weather, news,
 │ voice-agent.sh  arecord │ ─ WAV ───▶ │   loudness gate          │    markets, Gemini)
 │ phonelink (Go) ◀─ BLE ──┼─ iPhone    │   ├─▶ whisper.cpp (no net)│
 │   ANCS · AMS · CTS · HID│            │   └─▶ Gemini             │
 │ car-mode static copy    │ ◀ pack 5m ─│ docker-proxy (2 GETs)    │
 │ watchdog, kiosk-watch   │            └────────────▲─────────────┘
 └─────────────────────────┘                         │ push-only stats every 5 s
                                          Server 1 ── hub-stats-agent (no ports)
  • TransportThe device and the server form a tiny point-to-point network over the USB cable (CDC-NCM). The kiosk loads the hub's page across it; the device has no other network.
  • State pushThe hub sends the whole screen state over Server-Sent Events, batched for 500 ms (at most twice a second, about 26 KB), with a heartbeat every 10 s. Each message carries the hub's start time; when that changes the page reloads itself, so new UI code reaches the device without touching it.
  • Mei (voice)A shell agent long-polls the hub for a record command, pauses the stock daemon that holds the mics, records 4 channels at 16 kHz and uploads the WAV. The hub downmixes, resamples, removes DC offset and gates on loudness. Short commands go to whisper.cpp; anything else goes to Gemini.
  • phonelinkA static Go binary (about 8 MB RAM) that talks to an iPhone over Bluetooth LE with no app installed: notifications (ANCS), now playing (AMS), the phone's clock (CTS), battery. It also estimates whether you are at the desk from signal strength (near above −62 dBm for 4 s, away below −78 dBm for 20 s).
  • Car modeWith no hub reachable, the device serves itself a static copy of the page plus a data pack synced every 5 minutes (album art, lyrics, forecast, calendar). An ELM327 OBD reader over BLE is read only in this mode.
  • Server healthServer 1 runs a push-only agent with no listening ports; a cron job reports SSH failures, firewall blocks, open ports and pending updates.
Stack

What it’s made of

Device
Amlogic S905D2, 512 MB RAM, 4 GB eMMC, Nocturne 4 (Yocto, Chromium kiosk), POSIX shell helpers, hardware watchdog.
Hub
Node 22, zero dependencies, ESM; vanilla JavaScript UI drawn by a custom glyph-atlas canvas engine.
Device agent
Go (static arm64): BlueZ over D-Bus, kernel Bluetooth management socket, ELM327 protocol.
Server
Docker Compose, UFW with DOCKER-USER rules, HAProxy as a Docker API filter, whisper.cpp, netplan, chrony, cron.
Protocols
USB CDC-NCM, HTTP + SSE, BLE GATT (ANCS, AMS, CTS, HID-over-GATT), OKX WebSocket, iCal, Spotify PKCE, SSH.
Tests / CI
node:test (calendar RRULE and DST, lunar dates, lyrics, commands, monitors), Go tests against a fake OBD reader, gofmt, go vet.
Design decisions

Choices, and what they cost

The device holds nothing

Zero trust used as a design tool: the Car Thing has no keys, the hub has no docker.sock, the stats agent only pushes. Losing or compromising any one piece reveals as little as possible.

Trade-off: every feature needs the hub; the device alone can only run car mode.
Firewall on the server, not the router

USB traffic never crosses the router, so the rules live on the server, per interface.

Trade-off: the server's firewall config is now security-critical and has to survive Docker's own rule changes.
Push the whole state

Sending complete state instead of diffs keeps the device stateless and self-healing after any reconnect.

Trade-off: about 26 KB per update, which is nothing on a USB link.
A custom renderer

An off-the-shelf ASCII-reveal library drew the Markets page at 40 fps with 183 ms frames. A small glyph-atlas engine (drawImage at 20 Hz) replaced it, and the UI went flat: no gradients, blur or rounded corners, the expensive parts on a one-core GPU.

Trade-off: a visual style chosen partly by the GPU budget.
No OAuth where avoidable

Spotify uses PKCE, so there is no client secret; the calendar uses a secret iCal link.

Trade-off: the iCal URL is itself a secret and is never logged.
Survive the firmware

Nocturne restores its own folder on every boot, so helpers live elsewhere and a check script re-applies system changes after OS updates.

Trade-off: that script must be re-run by hand after each Nocturne update.
Hard problems

The parts that fought back

  • Flashing timed out. Erasing 1.4 GB outlasted the tool's roughly 10 s USB timeout. The erase kept going on the device, so a re-run finished the write.
  • The old firmware was too old. On kernel 4.9, dnsmasq's bind-interfaces needs SO_BINDTODEVICE, which was missing. A custom config got it running; moving to Nocturne 4 fixed it properly.
  • Network traps. Linux's weak host model lets the USB device reach any of the server's IPs, and Docker-published ports bypass UFW's INPUT chain. Rules went into DOCKER-USER, scoped per interface.
  • The screen “died” after asking Mei. The stock daemon resets the backlight to 0 every time it restarts. Found through a gap in journald's sync and a reproduction; fixed by re-asserting brightness every 2 s, plus the watchdog and a kiosk watcher.
  • Mei answered questions nobody asked. The mics were held by the stock daemon, a loopback channel was silent and the threshold was computed on DC-offset data. Fixed by recording from the raw device, pausing the daemon, subtracting DC and detecting voice relative to the noise floor.
  • iOS 18 hid the accessory. iPhones stopped listing accessories that only request notifications. Adding a HID-over-GATT media-remote service (consumer keys only) made it visible again.
  • Two programs, one radio. The stock daemon also reads notifications, and BlueZ allows one write at a time. Fixed with retries and matching answers by header; iOS sends existing notifications only once to the first subscriber, so early values are replayed.
  • The first OBD scan found a stranger's gadget. Many cheap BLE devices share the same service IDs. Matching now requires the name, a −80 dBm floor and an ELM327 identity check.
  • Frame rate. Per-page tracing found inherited pointer-events and an expensive hidden-page selector; will-change took Weather from 18 to 58 fps; an element with id="stage" clashed with a global named stage and froze the page. Idle Chromium CPU dropped from 17–35% to 0–1%.
Security model

Assume the device is hostile

The Car Thing is treated as hostile: it ships with a public root password and SSH on, runs Chromium with --no-sandbox (a renderer bug means root), shows internet content, can be stolen or plugged in elsewhere, and has a reachable Bluetooth radio.

  • Network: the server accepts only the hub port and NTP from the device, and no routes, DNS or IPv6 from it. Root SSH to the device is key-only and from one admin machine.
  • Containers: the hub is read-only, drops all capabilities, runs as non-root with no-new-privileges and memory and PID limits. Docker status goes through an HAProxy filter that forwards exactly two read-only GET endpoints.
  • Endpoints: state-changing calls accept only the device's address; the stats ingest needs both a source address and a bearer token compared in constant time. Secrets live only in files with mode 600.
  • Bluetooth: one paired phone, a 2-minute pairing window, a 6-digit passkey, “just works” pairing refused. Notification text is never written to disk or sent to the hub.
  • OBD: a fixed command allow-list (read modes only, never “clear codes”) and a 4 KB answer cap, enforced below the HTTP API.
  • Microphones: only a loudness number is kept from idle listening. The speech-to-text container sits on an internal network with no route out.
  • Stated limits: Mei and article summaries send text to Gemini, whose free tier may use it for training; car-mode data on the device is readable by whoever holds it; cheap OBD readers have no pairing.
Status

Where it stands

  • Closed on 20 October 2026 with a documented hand-off; the hub works end to end.
  • Not yet proven in real conditions: car mode in an actual car, a real OBD reader, and voice commands from a real voice, especially in Vietnamese.
  • Built for one person: home addresses and Vietnamese market data are wired in. Not affiliated with Spotify or Nocturne.