Drivox-Canre

A CAN bus reverse-engineering tool for the CANalyst-II USB adapter on Linux

Status
Research
Version
0.1.0
Platform
Library / CLI
License
MIT
01 · Problem

The CANalyst-II is a proprietary ControlCAN USB device that SavvyCAN has no driver for, and the usual bridge workaround leaves two programs fighting over one USB handle with two unsynchronised recordings. This tool makes one process own the adapter and treats the dashboard, CSV and SavvyCAN feed as consumers of that single stream.

02 · Architecture

How it is put together.

Drivox-Canre records both CAN channels of a CANalyst-II adapter to CSV, shows a live terminal dashboard, and lets a passenger tag events with hotkeys while the vehicle is moving. Offline, it turns a recorded session into a byte-level analysis, per-marker evidence and a DBC file exported from a YAML hypothesis registry. One process owns the adapter and republishes the live capture onto virtual SocketCAN interfaces so SavvyCAN can watch the same session.

Capture backendsdrivox_canre/capture/Sinksdrivox_canre/sinks/Live dashboarddrivox_canre/tui/Core analysisdrivox_canre/core/Offline pipelinedrivox_canre/pipeline.pyHypotheses and DBC expo…drivox_canre/dbc_export.pylive frames + event markerslive frames + event mar…vcan0 / vcan1 for SavvyCANvcan0 / vcan1 for Savvy…can_frames.csvcan_frames.csvevidence.md, DBCevidence.md, DBCCapture backendsdrivox_canre/capture/Sinksdrivox_canre/sinks/Live dashboarddrivox_canre/tui/Core analysisdrivox_canre/core/Offline pipelinedrivox_canre/pipeline.pyHypotheses and DBC expo…drivox_canre/dbc_export.pylive frames + event markerslive frames + event mar…vcan0 / vcan1 for SavvyCANvcan0 / vcan1 for Savvy…can_frames.csvcan_frames.csvevidence.md, DBCevidence.md, DBC
FIG. 01Modules and data flows, from the repository layout and documentation.
  1. 1

    Capture backends

    canalystii, panda, replay and mock sources

    drivox_canre/capture/
  2. 2

    Sinks

    Secondary consumers of the live stream (vcan republish)

    drivox_canre/sinks/
  3. 3

    Live dashboard

    Terminal dashboard and raw keyboard input for markers

    drivox_canre/tui/
  4. 4

    Core analysis

    State, byte classifier, periodicity, word detection, markers, windows

    drivox_canre/core/
  5. 5

    Offline pipeline

    Session to analysis to evidence to DBC

    drivox_canre/pipeline.py
  6. 6

    Hypotheses and DBC export

    YAML signal registry with confidence levels; DBC output via cantools

    drivox_canre/dbc_export.py
03 · Capabilities

Specification.

Capture
Both CANalyst-II channels from one device handle; auto-reconnect with dropout gaps recorded in session metadata
Backends
canalystii, panda, replay, mock
Live dashboard
Terminal UI (works over SSH): per-ID count, rate, periodicity class, changed-byte highlighting
Event markers
Single-key hotkeys for brake, regen, drive mode, AC, headlights, turn signals, drive phases
Byte analysis
Constant / toggle / counter / low-entropy / high-entropy classifier; 16-bit word detection; periodicity classes
Marker-window diffs
Bytes changed before vs after each tagged event, ranked
DBC export
From a YAML hypothesis registry with confidence levels; defaults to medium and above
SavvyCAN feed
Republishes onto vcan0 / vcan1 and writes SavvyCAN connection settings
Runs on
Python CLI (drivox-canre console script in pyproject.toml) with a terminal dashboard; Linux-only, needs SocketCAN/udev/systemd
Stack
  • Python 3.10+
  • python-can
  • cantools
  • PyYAML
  • NumPy
  • Rich
  • canalystii
  • pyusb
  • SocketCAN
  • systemd
  • udev
04 · Changelog

Log.

  1. Drivox CAN-RE published
    CAN reverse-engineering tool for the CANalyst-II adapter.