Skip to content

About

Cabana support for DashKit

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

DashKit Cabana Bridge

DashKit Cabana Bridge converts DashKit's BLE CAN stream into a real-time feed for Cabana.

How it works

The bridge discovers and connects to a DashKit peripheral over BLE, receives binary-encoded CAN frames, serializes them into Cap'n Proto cereal::Event messages (OpenPilot format), and publishes them to a MSGQ PubSocket on the "can" endpoint. Cabana (or any MSGQ consumer) can then subscribe and visualize the CAN data in real time.

DashKit (BLE) → BLECentral.swift → msgq_bridge.cpp → MSGQ "can" → Cabana

Data flow

  1. BLE Discovery — Scans for a peripheral named "DashKit" and connects automatically.
  2. CAN Reception — Subscribes to BLE notifications on the DashKit CAN characteristic.
  3. Parsing — Decodes the DashKit binary protocol: [count][bus:1 addr:4LE len:1 data:N]...
  4. Serialization — Builds Cap'n Proto cereal::Event messages with monotonic timestamps.
  5. Publishing — Sends serialized bytes to the MSGQ ring buffer at /tmp/msgq_can.

Prerequisites

  • macOS 13+ (uses CoreBluetooth)
  • Swift 5.9+
  • Cap'n Proto libraries via Homebrew:
    brew install capnp
    

Build and run

swift build
.build/debug/DashKitBridge

For a release build:

swift build -c release
.build/release/DashKitBridge

The process will scan for DashKit, connect, and begin publishing CAN frames. Press Ctrl+C for graceful shutdown.

Usage with Cabana

  1. Start DashKitBridge — it will begin publishing on the "can" MSGQ endpoint.
  2. Launch Cabana
  3. Select "Device" tab, and MSGQ
  4. Load DBC
  5. Click "OK"

License

MIT

About

Cabana support for DashKit

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages