Star on GitHubStar1.1k stars

Tool

cantools

Python 3 library and command-line tool for CAN bus databases that parses DBC, KCD, SYM, ARXML 3/4 and CDD files and encodes and decodes CAN messages, including simple and extended signal multiplexing and diagnostic DIDs. Its CLI decodes candump output against a database, plots decoded signals from candump logs with matplotlib, dumps each message's bit layout, converts between database formats, generates C pack and unpack code, and monitors a live bus in a text interface through python-can.

Targets
Protocol
Category
Protocol analysis tools
Relationship
Foundation tool
Sources reviewed

Requirements & limits

  • Latest release at review: 45.1.0, published 2026-10-20 on GitHub and PyPI; the reviewed master commit is 15 commits ahead of that tag. It installs with pip, and pyproject.toml requires Python 3.10+ with python-can, bitstruct, textparser, crccheck and argparse_addons, plus optional extras for plotting (matplotlib), caching (diskcache) and Windows curses support for the monitor.
  • Bring a database describing the target network and frames captured from it: decode reads candump output on standard input and plot reads candump log files, while monitor takes python-can bus arguments for a live interface, and the README's scripting example sends and receives frames on a SocketCAN channel. The repository's tests/files directory holds sample DBC, KCD, SYM, ARXML and CDD databases and generated C sources used by the examples and tests.
  • Decoding covers only what the supplied database defines; cantools applies existing message and signal definitions rather than inferring unknown layouts, and the README notes that generated C code is limited to signals of at most 64 bits. MIT licensed.

About this entry

The description was reviewed against primary sources.

Report an outdated entry Suggest a translation fix

Primary sources

  1. README.rst GitHub · cantools/cantools · Revision 5d37340
  2. README.rst#L1-L35 GitHub · cantools/cantools · Revision 5d37340
  3. README.rst#L83-L130 GitHub · cantools/cantools · Revision 5d37340
  4. README.rst#L291-L310 GitHub · cantools/cantools · Revision 5d37340
  5. pyproject.toml GitHub · cantools/cantools · Revision 5d37340
  6. src/cantools/subparsers GitHub · cantools/cantools · Revision 5d37340
  7. src/cantools/subparsers/monitor.py GitHub · cantools/cantools · Revision 5d37340
  8. tests/files GitHub · cantools/cantools · Revision 5d37340
  9. LICENSE GitHub · cantools/cantools · Revision 5d37340
  10. https://github.com/cantools/cantools/releases/tag/45.1.0
  11. https://pypi.org/project/cantools/45.1.0/
  12. https://cantools.readthedocs.io/en/latest/

More in Protocols

All 140 entries in Protocols

↑↓ move↵ open⌘↵ new tab