Skip to content

Add "Use Konik instead of comma connect" toggle#136

Open
dirkpetersen wants to merge 1 commit into
BluePilotDev:bp-devfrom
dirkpetersen:konik-connect-toggle
Open

Add "Use Konik instead of comma connect" toggle#136
dirkpetersen wants to merge 1 commit into
BluePilotDev:bp-devfrom
dirkpetersen:konik-connect-toggle

Conversation

@dirkpetersen

Copy link
Copy Markdown
Contributor

What

Adds an optional BluePilot setting, Use Konik instead of comma connect (BPUseKonik, default OFF), that points the device's backend at Konik instead of comma connect. Works on both comma 3X (TICI) and comma 4 (mici).

How

openpilot already reads API_HOST and ATHENA_HOST from the environment with comma defaults, and every backend consumer (registration, uploader, athena websocket, prime/firehose) inherits from those two. When the toggle is on, launch_env.sh exports:

  • API_HOST=https://api.konik.ai
  • ATHENA_HOST=wss://athena.konik.ai

That's the same switch Konik's docs describe (editing the launch script), just driven by a toggle — no changes to the connectivity code. With the toggle off/unset, behavior is byte-for-byte stock comma.

The pairing dialog (TICI + mici) also points its QR code and on-screen instructions at stable.konik.ai when the toggle is on, so users pair on the right site.

Files

  • common/params_keys.h — declare BPUseKonik (BOOL, default 0)
  • launch_env.sh — export the Konik hosts when the toggle is on
  • selfdrive/ui/bp/layouts/settings/bluepilot.py — toggle in the TICI settings (System section)
  • selfdrive/ui/bp/mici/layouts/settings/bluepilot.py — toggle in the mici settings
  • selfdrive/ui/widgets/pairing_dialog.py — QR + instructions use stable.konik.ai when enabled (TICI)
  • selfdrive/ui/mici/widgets/pairing_dialog.py — QR + "pair with Konik" label when enabled (mici)

Behavior

  • Reboot required — hosts are set at launch, so the change applies on the next reboot (the toggle text says so).
  • Re-pair — after enabling + reboot, pair at https://stable.konik.ai (scan the on-device QR).
  • Reversible — registration/DongleId is intentionally left untouched, so toggling back returns you to comma connect with your original dongle. (Konik's manual steps suggest rm DongleId; doing that from a settings toggle would be destructive/irreversible, so it's left to the user.)

Enabling this sends routes/location/telemetry to a third-party server; the toggle description says so.

Testing

  • Off/unset → comma defaults, no behavior change.
  • On + reboot → registers/uploads against api.konik.ai, athena connects at athena.konik.ai, pairing QR → stable.konik.ai.

New optional toggle (BPUseKonik, default OFF) that points the device's backend
at Konik (stable.konik.ai) instead of comma connect. When enabled, launch_env.sh
exports API_HOST=https://api.konik.ai and ATHENA_HOST=wss://athena.konik.ai;
openpilot already reads these env vars everywhere it talks to the backend
(common/api/comma_connect.py, system/athena/athenad.py, registration, uploader),
so no other code changes are needed. Unset/OFF keeps the stock comma defaults
exactly byte-for-byte.

The pairing dialog (both comma 3X / TICI and comma 4 / mici) also points its QR
code and on-screen instructions at stable.konik.ai when the toggle is on, so
users pair on the right site.

Takes effect after a reboot; the user then re-pairs at stable.konik.ai. The
toggle is added to both the TICI and mici BluePilot settings. Registration /
DongleId is intentionally left untouched so the switch stays reversible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant