Decode raw CAN bus frames into physical signal values using a DBC file with the cantools Python library.

domain: cantools.readthedocs.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install cantools and load the vehicle's DBC file with `cantools.database.load_file("vehicle.dbc")`.
  2. Look up the message definition by CAN ID or name via `db.get_message_by_frame_id()` or `db.get_message_by_name()`.
  3. Decode a captured payload (from candump or python-can) with `message.decode(payload)` to get a dict of named signals.
  4. Pass `decode_choices=False` to get raw scaled numeric values instead of DBC-defined enum/choice strings.
  5. Pair cantools with python-can's Notifier/Listener to decode frames live off a SocketCAN interface instead of static payloads.

Known gotchas

Related routes

Decode NMEA 2000 CAN bus traffic with the canboat toolkit
github.com/canboat/canboat · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans