# CanLab

> PyQt6 desktop workstation and command-line tool for reverse-engineering CAN bus captures offline. It reads SavvyCAN/GVRET CSV, candump, pcap, Vector BLF/ASC, MDF4 and openpilot logs, then suggests counters, checksums and their algorithms, byte roles, flags, multiplexers, entropy-based field boundaries and cross-ID correlations, decodes J1939 and NMEA 2000 PGNs and reassembles multi-frame messages. A cantools-backed DBC builder checks signal definitions against the captured frames and exports DBC, openpilot DBC, CANdb++, ARXML and Wireshark Lua dissectors, and an optional MCP server offers 29 receive-only analysis tools to assistants.

- Type: Tool
- Targets: Protocol
- Category: Protocol analysis tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-27
- Added to the catalog: 2026-11-03
- Original resource: <https://github.com/Sherin-SEF-AI/CanLab>
- Primary source: <https://github.com/Sherin-SEF-AI/CanLab/blob/8aaa6fff2bdfb1099574661c415a7d07a3a6a3de/README.md>
- Catalog page: <https://awesomerea.org/resources/canlab/>
- Record JSON: <https://awesomerea.org/resources/canlab/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/canlab/index.md)

## Requirements & limits

- README calls CanLab a beta, single-author project. The reviewed commit 8aaa6ff (2026-09-23) declares version 2.1.0 in pyproject.toml, while the latest release is v2.0.0 (2026-09-15) with a Linux x86_64 build and demo videos. README stresses that the analysis is heuristic, suggests candidates rather than identifying signals, and has not been validated on many real vehicles.
- Python 3.11+ on Linux, macOS or Windows (developed on 3.12), with optional extras for AI, REST, MCP, hardware adapters, MDF4 (asammdf) and openpilot logs (pycapnp); README asks for 4 GB RAM, 8 GB for the machine-learning features. Live capture uses SocketCAN, a comma.ai Panda, GVRET boards or python-can adapters; README reports one physical adapter used, a CANalyst-II, and the others only on a virtual bus.
- Inputs are the user's own captures. The bundled sample is a synthetic Hyundai-style capture generated by a script, the test fixtures are a few lines each, and the real-data acceptance runs fetch public SavvyCAN, CSS Electronics and comma.ai recordings instead of committing them. The opendbc matcher downloads the commaai/opendbc index on first use, and the optional AI analysis sends the selected ID's frame statistics to the configured Anthropic, OpenAI, Groq or Ollama provider.
- The application also has bench-only transmit functions behind a global ARM TX switch that is off by default and a blocked-ID list; README restricts them to isolated bench setups. The MCP tools cannot transmit.
- README's Testing section reports 753 passing pytest tests (its badge still says 578), interoperability tests against can-isotp, udsoncan and can-j1939, and 99 checks over public real-world recordings; diagnostic requests were tested only against scripted responders. MIT; the NMEA 2000 table derives from CANboat (Apache-2.0) and the cereal schema from comma.ai (MIT).

## Primary sources

1. <https://github.com/Sherin-SEF-AI/CanLab/blob/8aaa6fff2bdfb1099574661c415a7d07a3a6a3de/README.md>
2. <https://github.com/Sherin-SEF-AI/CanLab/blob/8aaa6fff2bdfb1099574661c415a7d07a3a6a3de/pyproject.toml>
3. <https://github.com/Sherin-SEF-AI/CanLab/blob/8aaa6fff2bdfb1099574661c415a7d07a3a6a3de/tests/real_data/README.md>
4. <https://github.com/Sherin-SEF-AI/CanLab/blob/8aaa6fff2bdfb1099574661c415a7d07a3a6a3de/canlab/sample_data/generate_sample.py>
5. <https://github.com/Sherin-SEF-AI/CanLab/blob/8aaa6fff2bdfb1099574661c415a7d07a3a6a3de/canlab/core/data/CANBOAT-NOTICE.txt>
6. <https://github.com/Sherin-SEF-AI/CanLab/blob/8aaa6fff2bdfb1099574661c415a7d07a3a6a3de/canlab/core/data/cereal/NOTICE.txt>
7. <https://github.com/Sherin-SEF-AI/CanLab/blob/8aaa6fff2bdfb1099574661c415a7d07a3a6a3de/LICENSE>
8. <https://github.com/Sherin-SEF-AI/CanLab/releases/tag/v2.0.0>

## More in Protocols

- [Facedancer](https://awesomerea.org/resources/facedancer/index.md) · Tool
- [Mirage](https://awesomerea.org/resources/mirage-wireless-framework/index.md) · Tool
- [Protobuf Decoder](https://awesomerea.org/resources/pawitp-protobuf-decoder/index.md) · Tool
- [gr-lora](https://awesomerea.org/resources/gr-lora/index.md) · Tool
- [termshark](https://awesomerea.org/resources/termshark/index.md) · Tool
- [SigDigger](https://awesomerea.org/resources/sigdigger/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
