Skip to content

CANtrip v1.2.0 - Yukari

Choose a tag to compare

@avmolaei avmolaei released this 08 Jul 15:49

CANtrip v1.2.0 - Yukari

Graph view quality-of-life, .rune config files, and bus autodetect.

New: Graph view improvements

  • Multi-select drag-and-drop: Ctrl+click / Shift+click to select several
    signals at once in the signal list, then drag the whole selection onto an
    axis in one go.
  • Cursors: a new Cursor tool in the Graph toolbar. Hover over the plot
    for a live readout of every visible signal's value at that point in time.
    Click and drag between two points on a curve to see the delta (Δt, Δvalue)
    between them - handy for measuring pulse widths, rise times, etc. without
    doing the math by hand.
  • Clear Graph: a new toolbar button that wipes plotted data and restarts
    from t=0, without touching your axis/signal setup.
  • Axes survive Start/Stop: set up your axes and signals once - Stop and
    Start a new capture no longer throws the graph away. (Clear Graph is now
    the same operation Start uses internally, just triggered manually.)

New: .rune config files

CANtrip can now save and load .rune files - the equivalent of CANalyzer's
.cfg files. A rune remembers:

  • which channel/hardware you had selected,
  • bus timing (bitrate, CAN FD settings),
  • capture mode and display rate,
  • which DBC was loaded,
  • and your entire Graph view axis/signal layout (not sample data - that's
    always live).

Save Rune... / Load Rune... live in the Home tab, next to Capture and
Display. Both are disabled mid-capture, same as Import DBC, since opening a
file dialog during a real capture can start a nested event loop that
overwhelms frame processing on a busy bus.

New: Autodetect Bus Config

Hardware tab now has an "Autodetect Bus Config..." button. Click it and
CANtrip scans classic CAN bitrates (125k/250k/500k/1M) against the selected
channel, applies the one that comes back clean, and prompts you to save a
rune with the result. FD autodetect isn't in this pass - classic only for
now.

Under the hood: real bus errors now show up

VectorBackend and PeakBackend were silently swallowing real chip-state
and error events instead of surfacing them - previously the only thing that
ever produced a bus-error row in Trace view was the synthetic test source.
Real hardware errors (bus-off, ACK/form/stuff/bit errors, overrun) now
appear in Trace view like they should. This was also a prerequisite for
Autodetect, which needs to tell "clean bus" apart from "errors happening"
to know a bitrate guess actually worked.

Note: bus-error surfacing and Autodetect have been verified against the
synthetic source and compile-verified against real PEAK/Vector SDKs, but
still need a pass against real hardware with a deliberately-wrong bitrate
before calling them fully field-tested.

Getting started (step by step)

CANtrip doesn't capture CAN traffic itself - it hands that job to
Wireshark's own capture engine, then decodes and displays what comes back.
So there are two things to install, not one. Here's the whole path from
zero to seeing live CAN data, no hardware required:

  1. Install Wireshark. Download and install it from
    wireshark.org using the
    defaults. You don't need to know how to use Wireshark itself - CANtrip
    just needs it present on the machine, since it runs Wireshark's tshark
    under the hood instead of talking to hardware directly.

  2. Download CANtrip. Grab the latest zip from the
    Releases page and
    extract it anywhere (e.g. your Desktop or C:\CANtrip).

  3. Tell Wireshark about CANtrip's capture helper. Inside CANtrip's
    extracted folder there's a file called can2pcap.exe - copy it into
    Wireshark's personal extcap folder: press Win+R, type
    %AppData%\Wireshark\extcap, and press Enter - this opens the exact
    folder directly (Windows creates it automatically if it doesn't exist
    yet). Copy can2pcap.exe into it.

    This is a one-time step. Without it, CANtrip's hardware/test-source list
    will simply be empty.

  4. Launch cantrip.exe from the extracted folder.

  5. Pick a source. On the Hardware tab, open the "Network Hardware"
    dropdown:

    • No CAN adapter yet, just want to try it out? Pick
      "CANtrip synthetic test source (no hardware needed)" - it fakes
      realistic traffic so you can explore everything below with zero wires.
    • Have a real PEAK or Vector CAN adapter plugged in (with its driver
      installed)? Pick that channel instead - everything else works exactly
      the same way.
  6. (Optional) Set the bus speed. Still on Hardware, click
    CAN Controller... if you need to change the bitrate (defaults are
    fine for the synthetic source).

  7. (Optional) Load a DBC file so raw frames decode into named signals
    with real units. On the Analysis & Measurement tab, click
    Import DBC... and pick a .dbc file - the bundled sample.dbc
    matches the synthetic source out of the box.

  8. Hit Start on the Home tab. Live frames start streaming into the
    table immediately; click the arrow next to a row to expand it into
    decoded signal values (if a DBC was loaded). Try the Graphics button
    to switch to the Graph view and plot a signal over time. On a busy real
    bus, use the Display Rate dropdown (also on Home) if the UI feels
    sluggish - it defaults to 30 Hz, which should be smooth on most buses.

That's the whole loop - swapping the synthetic source for real hardware
later needs no extra setup beyond having that vendor's driver installed.
See the README for further
detail.

Full diff: v1.1.1_yukari...v1.2.0_yukari