Skip to content
Projetos

Sobre

O firmware personalizado mais avançado para o Spotify Car Thing.

Outros projetos

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
+2
em 7 dias
+2
em 15 dias
+3
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

Nocturne
Nocturne

The most advanced custom firmware for the Spotify Car Thing.

Flashing • Donate • Building • Layout • Credits • License

Website Discord

Nocturne screenshot

Setup

[!WARNING] Bricking the Car Thing is nearly impossible, but the risk is always there when flashing custom firmware.

Requirements

  • Terbium driver is required on Windows: irm https://driver.terbium.app/get | iex (Powershell)

Flashing

The recommended way to flash is to use the Flash with Terbium button on our install page.

Flashing will likely take about 5-10 minutes, depending on your USB ports and some other factors. Please try multiple ports if one isn't working (Rear IO USB 3/2, BIOS flash port if on AMD, etc).

[!NOTE] If Terbium does not work correctly for you, you may try flashthing and an installer zip from the Releases.

Connecting to Nocturne

Mobile Device (iOS 16.1+ / Android 13+, recommended)

Nocturne supports Bluetooth without tethering. An internet connection is still required to access the Spotify API. App access requires Nocturne Lifetime ($9.99 one-time) or Nocturne+ ($1.99/month). Nocturne+ also unlocks voice controls on your Car Thing.

  1. Download Nocturne Companion.
  2. Follow the steps inside the app to pair your Car Thing.

Tip: Make sure your Car Thing is not connected to a computer, as this may conflict with Bluetooth.

Standalone (WiFi, Raspberry Pi, macOS 15.0+, Windows 10+)

Nocturne Connector turns a Raspberry Pi or Windows machine into a Wi-Fi bridge for your Car Thing, so you can use Nocturne without being connected to your phone. The Connector source lives under nocturne-connector. See Connector → Building for build instructions, or grab a prebuilt image from Releases.

Nocturne Companion for Mac functions in the same way as the mobile app, but does not require Nocturne Lifetime or Nocturne+. Nocturne Companion for Mac can be downloaded here.

Uninstall

Use a tool of your choice (flashthing-cli with stock firmware, or Terbium for the old Buildroot path) to flash stock or a different firmware.

Donate

Nocturne and Prelude are massive endeavors, and the team has spent every day over the last year making it a reality out of our passion for creating something that people like you love to use.

All donations are split between the three members of the Nocturne team and go towards the development of future features. We are so grateful for your support!

Donation Page

Building

Nocturne is a monorepo. Nocturne OS, nocturned (the on-device daemon), and nocturne-ui (web UI written with Vite + React) all live in the same tree and build through the same Justfile at the repo root.

Required host tools

Tool Why
just drives the recipes in the top-level and per-component Justfiles
cargo + cross builds the daemon, cross-compiled to aarch64 for the Car Thing
bun builds the device UI
docker or podman runs the kas container for the image build
kas invoked through kas-container
flashthing-cli host-side burn-mode flasher
uv (optional) runs the PEP-723 helper scripts under image/scripts/

The full image

just image-build              # default: nocturne-{prod,dev}-image + 4 OTA wrappers
VERSION_CORE=4.1.0
BUILD_ID=$(date -u +%Y%m%d%H%M%S)
NOCTURNE_BUILD_ID="$BUILD_ID" \
  just release-image "$VERSION_CORE" /secure/nocturne.pem \
  "${VERSION_CORE}+${BUILD_ID}" prod nocturne-local # build and publish full/zchunk OTA

The first cold build downloads upstream layers, crates, and tarballs (multiple gigabytes). Subsequent builds reuse image/build/sstate-cache/ and image/ccache/. The Nocturne kas configuration uses the project sstate mirror at https://sstate.bridgething.com/sstate/ and hash-equivalence service at wss://hashserv.bridgething.com/ws, with the public Yocto mirror as a fallback.

Because the daemon and UI sources live in-tree, the image build picks them up directly via Yocto EXTERNALSRC - there is no separate "publish daemon, bump SRCREV, rebuild image" round trip when you're iterating.

Outputs land in image/build/tmp/deploy/images/superbird/:

  • nocturne-prod-image-superbird-flashthing.zip - ext4 read-only rootfs, chromium kiosk
  • nocturne-dev-image-superbird-flashthing.zip - squashfs-lz4 rootfs, weston desktop + VNC + tools-debug
  • nocturne-update-{prod,dev}-superbird.swu - full A/B OTA payloads
  • nocturne-update-{prod,dev}-delta-superbird.swu - zchunk delta OTA payloads
  • bandaid.ext4 - daemon + UI floor for the bandaid partition

Daemon

just daemon-host              # cargo build for the dev host (no swupdate)
just daemon-build             # cross build for aarch64 + --features device
just daemon-copy              # build daemon via Yocto + install to a running device (default: nocturne.local)
just test                     # native Linux; native codegen + aarch64 cross runtime tests on macOS
just lint                     # cargo clippy --workspace -- -D warnings + cargo fmt --check

The daemon's vendored libswupdate IPC client lives at crates/swupdate-sys/vendor/ (LGPL-2.1-or-later, sbabic/[email protected]). It builds into a static library, so the daemon binary has no libswupdate.so runtime dependency outside the image's own.

Device UI

just ui-dev                   # vite dev server (talks to a daemon on ws://localhost:5000)
just ui-build                 # static bundle (image build picks this up via EXTERNALSRC)
just ui-lint

Codegen

The canonical wire schema lives in crates/shared/src/. After any wire-protocol change:

just codegen                  # regenerate TS / Swift / Kotlin bindings under crates/shared/generated/
just codegen-check            # CI-style check that bindings are up to date

The generated bindings are consumed by packages/ui/ and the external mobile app and Connector.

Talking to a booted device

Over USB-CDC-NCM, the device shows up on mDNS as nocturne.local. The image's image/Justfile ships the host-side recipes for talking to it:

just -f image/Justfile ssh                # interactive shell
just -f image/Justfile console start      # UART agent on /dev/ttyUSB0
just -f image/Justfile reboot-to-maskrom  # drop to 1b8e:c003 for full reflash
just -f image/Justfile flash              # full image via flashthing-cli
just -f image/Justfile ota                # delta OTA push to a booted device

The UART agent keeps FT232 RTS deasserted (it's wired to the SoC reset pin), so the board doesn't reset every time another process opens the serial node. Don't open /dev/ttyUSB0 directly while the agent is running.

OTA

OTAs are A/B with libswupdate. A successful install writes the inactive slot, flips slot_active in u-boot env, and waits for the user to restart from the settings UI. If the new slot fails to come up three times the bootloader rolls back.

Four install kinds (driven by the companion app):

  • image - writes a full .swu to the inactive root partition
  • daemon - aarch64 nocturned binary rotated atomically on the bandaid bind-mount, service restart
  • builtin-webapp - SPA bundle swapped on the bandaid bind-mount, service restart
  • bandaid - combined daemon and SPA bundle update

Delta OTAs (zchunk) ship only the changed chunks via HTTP range requests over the USB link. See image/README.md for the signing, publishing, and release-manifest details.

Layout

Path What lives there
image/ The Yocto image. kas/nocturne.yml pins yocto-superbird upstream + adds meta-nocturne/. image/Justfile is the canonical command surface for image builds and device interaction.
crates/daemon/ The nocturned Rust daemon. iAP2 / RFCOMM, OTA orchestration, embedded HTTP server serving the UI, WS to UI on 127.0.0.1:5000.
crates/shared/ The canonical wire schema and generated TS/Swift/Kotlin bindings.
crates/iap2/, crates/iap2-macros/, crates/iap2-mfi/ iAP2 link/session layer + Identification CSM derive + MFi chip driver.
crates/swupdate-sys/ Vendored libswupdate IPC client sources, built into a static lib by cc::Build.
tools/codegen/ Wire-schema codegen for TS/Swift/Kotlin. Reads crates/shared/src/, writes crates/shared/generated/.
packages/ui/ React 19 + Vite kiosk app served by Chromium on the Car Thing (480x800).

The mobile companion app, the website, the OTA server, and the backend API for AI and payments are private and live in their own repositories. Anything that ships inside the firmware lives here; anything that's a remote service that Nocturne talks to does not.

Credits

This software was made possible only through the following individuals and open source projects:

We'd like to give a huge thanks to Joey Eamigh for bridgething (protocol, more robust iAP2, OTA, and more), yocto-superbird, and for a ton of help during the Yocto migration. We'd also like to thank lmore377 for modernizing the Car Thing's tooling and contributions to bridgething/yocto-superbird. The new Nocturne OS image powered by Yocto and modern software wouldn't be possible without them.

License

This project is licensed under the GPL-3.0 license.

We kindly ask that any modifications or distributions made outside of direct forks from this repository include attribution to the original project in the README, as we have worked hard on this. :)

This software contains calls to the Nocturne API. Any use, distribution, or modification of this software constitutes acceptance of the Nocturne API License.


© 2026 Vanta Labs.

"Spotify" and "Car Thing" are trademarks of Spotify AB. This software is not affiliated with or endorsed by Spotify AB.

usenocturne.com  ·  GitHub  ·  X  ·  Discord

Explore projetos relacionados

Carregando…