Alex4386/komitake

a Go daemon and CLI that provides the Wi-Fi connectivity plane for a companion RC kart used by a "build a Circuit at Home" kart-racing game

★ 0Forks 0GoGitHub ↗Compare

README

Komitake: connect a Fuji kart to your PC

Komitake (小御岳) is a Go daemon and CLI that provides the Wi-Fi connectivity plane for a companion RC kart used by a "build a Circuit at Home" kart-racing game (Fuji). It emulates the "game"'s FujiControl classes and several LSP and MoLive2 demuxing into a one bundled daemon, allowing you to control and manage connection.

Tip

Looking for how to use kart on your PC? Click here

What does it do?

  • Brings up the LP2P access point the kart joins (patched OpenKart hostapd)
  • Pairs the kart with a QR code (Fuji pairing / group info)
  • Keeps the RCD link up and talks Fuji control
  • Also keeps up the LSP link up and ingest live camera feed
  • Drive, telemetry, and live camera from the PC
  • Optional web UI (REST / WebSocket / WebRTC) and a Go client SDK with control/pair interface

Prerequisites

  • Go 1.26+
  • C toolchain, pkg-config, libnl-3 / libnl-genl-3 (patched hostapd)
  • FFmpeg with VAAPI (h264_vaapi) for live camera
  • ffplay for komitake video
  • Node.js / npm from NodeSource to rebuild the embedded web UI

Hostapd build deps (helper detects your package manager):

./scripts/deps.sh

Debian/Ubuntu by hand:

sudo apt install build-essential libnl-3-dev libnl-genl-3-dev pkg-config

Build

Clone with nested submodules (OpenKart hostapd wraps upstream hostap):

git clone --recurse-submodules https://github.com/Alex4386/komitake
# or, in an existing checkout:
git submodule update --init --recursive

Then:

./build.sh                          # patched hostapd -> ./hostapd
go generate ./internal/wireless/lp2p # OpenKart lp2p nonce table (network)
./scripts/rebuild-webui.sh          # optional; embeds UI under internal/web/frontend/dist
go build -o komitake ./cmd/komitake

./build.sh initializes third_party/openkart-hostapd and nested hostap if needed. go generate writes internal/wireless/lp2p/lp2p_nonces.bin (gitignored, embedded at compile time). Without a UI build, komitake web still serves the API and a placeholder page.

Install

./INSTALL

Defaults:

Artifact Path
CLI / daemon /usr/bin/komitake
Patched hostapd /usr/bin/komitake-hostapd
Config /etc/komitake/
systemd unit /etc/systemd/system/komitake.service

The unit text is generated by scripts/install-systemd.sh (no separate .service file to keep in sync):

sudo ./scripts/install-systemd.sh
sudo systemctl enable --now komitake.service

Usage

komitake daemon        # run the daemon (foreground)
komitake set           # change settings (e.g. --wireless-interface=wlan0)
komitake pair          # pairing QR in the terminal
komitake status        # mode, wireless, pairing state
komitake devices       # connected karts (serial / kind; -l for detail)
komitake video         # live camera via ffplay
komitake web           # REST + drive/telemetry/video UI

Clients talk to the daemon over the admin API (unix:/run/komitake.sock by default, or TCP via --address / socket.bind).
See USAGE.md for pairing, the web UI and REST API, video, config, logging, and shell completion.
For Quickstart, see QUICKSTART.md for how to get it running in no time.

Credits

FAQ

  • Why name it Komitake?
    Mt. Fuji is built on top of Mt. Komitake, and so does your Fuji control stack runs on abstracted connection on top of Komitake.

  • What do I need?
    A Linux PC, a Wi-Fi adapter that supports SoftAP mode, and a Fuji kart. See QUICKSTART.md for a step-by-step setup.

  • Does it run on macOS or Windows?
    The daemon (access point, pairing, drive, camera transcode) is Linux-only today because it drives a patched hostapd and configures the wireless interface directly. You can run client commands (komitake status, komitake web, ...) from another OS by pointing --address at a Linux host with socket.bind set to TCP.
    You can technically try with WSL2, but it is not supported. continue at your own risk. ./docs/wsl2-setup.md

  • I want to know more about LSP and MoLive2!
    Check the analysis at ./docs/fuji-video.md

Contributors

Alex4386

Issues