# CAN

Decode CAN signals live or from logs, with your DBC

- Category: Robotics
- Capabilities: Streams, Assets, History, Entities
- Runs on: Linux x64, Linux ARM64, macOS Apple silicon, macOS Intel, Windows x64

Decode a CAN bus into named signals with your DBC file. Read a live bus, or
replay a candump log.

## Sources

- **Live bus** — a SocketCAN interface on Linux (`can0`). Classic CAN or CAN
  FD, 11- and 29-bit ids, with the kernel's receive timestamps. Run it on the
  Linux machine on the bus, such as a Jetson or a bench PC.
- **candump log** — a `can-utils` recording, replayed at its own pace,
  including CAN FD and error-frame lines. Speed `0` imports as fast as the
  disk allows. **Loop** replays over and over.

## Your DBC decodes it

Point **DBC** at your database. Each frame is decoded into the signals it
names, at `/can/<message>/<signal>`, with the DBC's units. Both byte orders,
signed values, factor and offset, multiplexed and extended-multiplexed
signals, and value labels all work.

A message's cycle time (`GenMsgCycleTime`) sets the rate each signal is
expected at, so a missed cycle shows.

Frames with no DBC entry land as raw bytes on `/can/<id>` when **Keep raw
frames** is on. Otherwise they are counted and reported, never silently
dropped.

## Setup

1. Choose the source and the DBC.
2. Browse to the log, or name the interface.
3. The table lists every signal in the DBC: its message and id, scaling,
   range, cycle time, value labels, and how many frames the log (or a
   two-second listen on the bus) carried.
4. Tick the signals to record. All start ticked.

## Bus errors

Error frames, bus-off and receive overflow show as gaps on the affected
signals, with the kernel's description. Frames the adapter dropped before the
kernel saw them cannot be seen.

## Standards

- SocketCAN: the Linux kernel's `networking/can` documentation
- candump log format: `can-utils`
- Vector DBC file format

## Supports

- Live SocketCAN: classic CAN and CAN FD, 11- and 29-bit ids, kernel receive timestamps (linux)
- candump (can-utils) logs replayed at the recording's pace, including CAN FD and error frame lines
- Vector DBC decode at the source: Intel and Motorola byte order, signed, factor/offset, multiplexed and extended-multiplexed signals, value tables, units, GenMsgCycleTime as the declared rate
- Error frames, bus-off and receive overflow stated as gap records on the affected signals

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Source | One of | Yes |  |
| Log | Path | No |  |
| Interface | Text | No |  |
| DBC | Path | No |  |
| CAN FD | On / off | No |  |
| Keep raw frames | On / off | No |  |
| Signals | Text | No |  |
| Speed | Number | No |  |
| Loop | On / off | No |  |
