██╗ ██████╗ ████████╗ █████╗ ██████╗
██║██╔═══██╗╚══██╔══╝██╔══██╗╚════██╗
██║██║ ██║ ██║ ███████║ █████╔╝
██║██║ ██║ ██║ ██╔══██║██╔═══╝
██║╚██████╔╝ ██║ ██║ ██║███████╗
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝
Copyright (c) 2025 iota2 (iota2 Engineering Tools)
Licensed under the MIT License. See LICENSE file in the project root for details.
🟢 Version: v0.14.0
A collection of CANopen utilities for development and debugging:
- Sniffer (GUI/CLI): capture and decode PDO/SDO traffic using EDS files
- Frame Simulator: generate CANopen traffic aligned with EDS mappings
- Node Monitor: live OD variable monitor with Rich TUI and command panel
Check wiki pages for more details regarding setup and tools.
Install required Python dependencies:
pip install python-can canopen rich PyQt5 tqdm pytest pre-commitThis project uses pre-commit hooks to automatically verify that license headers are present in all files before committing.
To enable it, install the hooks once in your local clone:
pre-commit installAfter running pre-commit install, the hooks defined in .pre-commit-config.yaml run automatically on every git commit (they operate on the staged files).
If any hook fails or reports missing headers, it will block the commit.
To update the local hook versions defined in .pre-commit-config.yaml:
pre-commit autoupdateYou can run all configured hooks against all tracked files (useful for CI parity or repo-wide fixes):
# Run all configured hooks against all files in the repo
pre-commit run --all-files
# Run a specific hook across all files (e.g. the auto-fix)
pre-commit run fix-license-headers --all-files -vIf a hook auto-fixes files (for example, the license header fixer), it will modify and re-stage them; you will then need to git add and commit the changes.
# Check all files in the repository
pre-commit run check-license-headers --all-files
# Check only specific files
pre-commit run check-license-headers --files path/to/file.py path/to/README.mdpre-commit run fix-license-headers --all-filesThis will run the internal tools/add_license_headers.sh script to fix headers automatically.
sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set vcan0 upsudo ip link set can0 type can bitrate 1000000
sudo ip link set can0 up- Decode PDOs and SDOs with EDS/OD metadata
- GUI: searchable table, filtering, CSV export, histogram, frame-rate graphs
- CLI: Rich tables, bus stats, logging, export
- Modes: Fixed (replace row) or Sequential (append row)
Run GUI:
python canopen_bus_sniffer_gui.py --interface vcan0 --eds sample_device.edsRun CLI:
python canopen_bus_sniffer_cli.py --interface vcan0 --eds sample_device.eds --log --export- Parses TPDO mappings dynamically from EDS
- Sends PDOs (auto-generated values) + unmapped OD entries as SDOs
- Supports heartbeat, timestamp, emergency frames
- Logging option
Run:
python canopen_frame_simulator.py --interface vcan0 --count 20 --eds sample_device.eds --with-timestamp --with-emcy- Uses LocalNode + RemoteNode from EDS
- Displays raw CAN frames, decoded PDOs, SDO requests/responses
- Split OD variable tables + live status panel
- Interactive command input panel
- CSV export of OD changes + logging
Run:
python canopen_node_monitor_cli.py --interface vcan0 --local-eds local.eds --remote-eds remote.eds --export --log- Start a virtual CAN (
vcan0) or physical CAN (can0) - Run Frame Simulator to generate traffic (optional)
- Use Sniffer (GUI/CLI) or Node Monitor to observe traffic
- Export logs / CSVs for analysis
- Sniffer: CSV export (data, histogram)
- Simulator: logs to
simulate_can_frames.log(optional) - Node Monitor: logs to
canopen_node_monitor_cli.log, OD variable changes to CSV (if enabled)
⚡ This suite is designed for testing, debugging, and visualizing CANopen networks with minimal setup.