DashKit Cabana Bridge converts DashKit's BLE CAN stream into a real-time feed for Cabana.
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
- BLE Discovery — Scans for a peripheral named "DashKit" and connects automatically.
- CAN Reception — Subscribes to BLE notifications on the DashKit CAN characteristic.
- Parsing — Decodes the DashKit binary protocol:
[count][bus:1 addr:4LE len:1 data:N]... - Serialization — Builds Cap'n Proto
cereal::Eventmessages with monotonic timestamps. - Publishing — Sends serialized bytes to the MSGQ ring buffer at
/tmp/msgq_can.
- macOS 13+ (uses CoreBluetooth)
- Swift 5.9+
- Cap'n Proto libraries via Homebrew:
brew install capnp
swift build
.build/debug/DashKitBridgeFor a release build:
swift build -c release
.build/release/DashKitBridgeThe process will scan for DashKit, connect, and begin publishing CAN frames. Press Ctrl+C for graceful shutdown.
- Start
DashKitBridge— it will begin publishing on the "can" MSGQ endpoint. - Launch Cabana
- Select "Device" tab, and MSGQ
- Load DBC
- Click "OK"
MIT