{"id":43136645,"url":"https://github.com/phnahes/can-bus-analyzer","last_synced_at":"2026-04-12T01:06:19.527Z","repository":{"id":335732619,"uuid":"1146882737","full_name":"phnahes/can-bus-analyzer","owner":"phnahes","description":"Another CANBus message analyzer. Multiplatform, real-time analysis, playback, software filters, bitfield viewer, transmission and much more.","archived":false,"fork":false,"pushed_at":"2026-02-15T21:44:05.000Z","size":6007,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-16T02:49:21.668Z","etag":null,"topics":["canbus","carhacking","engineering","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phnahes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-31T20:45:45.000Z","updated_at":"2026-02-15T20:34:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/phnahes/can-bus-analyzer","commit_stats":null,"previous_names":["phnahes/can-bus-analyzer"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/phnahes/can-bus-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phnahes%2Fcan-bus-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phnahes%2Fcan-bus-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phnahes%2Fcan-bus-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phnahes%2Fcan-bus-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phnahes","download_url":"https://codeload.github.com/phnahes/can-bus-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phnahes%2Fcan-bus-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31700627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"ssl_error","status_checked_at":"2026-04-11T21:17:24.556Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canbus","carhacking","engineering","python3"],"created_at":"2026-01-31T22:04:32.020Z","updated_at":"2026-04-12T01:06:19.510Z","avatar_url":"https://github.com/phnahes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CAN Analyzer\n\n[![Version](https://img.shields.io/badge/version-1.2.2-blue.svg)](CHANGELOG.md)\n[![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](LICENSE)\n\nA comprehensive CAN bus analyzer with SLCAN support, protocol decoders, and real-time analysis. Built with Python and PyQt6. **Runs on macOS and Linux.**\n\n---\n\n## Table of Contents\n\n- [Quick Start](#quick-start)\n- [Screenshots](#screenshots)\n- [Supported Operating Systems](#supported-operating-systems)\n- [Requirements](#requirements)\n- [Features](#features)\n- [Protocol Decoders](#protocol-decoders)\n- [Project Structure](#project-structure)\n- [Hardware Support](#hardware-support)\n- [Advanced Features](#advanced-features)\n- [Usability](#usability)\n- [Configuration](#configuration)\n- [Documentation](#documentation)\n- [Tools \u0026 Utilities](#tools--utilities)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [Changelog](#changelog)\n- [License](#license)\n- [Project Status](#project-status)\n- [Technical Notes](#technical-notes)\n\n---\n\n## Quick Start\n\n**macOS / Linux:**\n```bash\n./run.sh\n```\n\nOr run manually:\n```bash\npython -m venv venv\nsource venv/bin/activate  # macOS/Linux\npip install -r requirements.txt\npython can_analyzer.py\n```\n\n---\n\n## Screenshots\n\n### Monitor \u0026 Tracer Modes\n| | |\n|:---:|:---:|\n| ![Monitor Mode](docs/images/image1.png) | ![Tracer Mode](docs/images/image2.png) |\n| *Monitor Mode - Grouped by ID* | *Tracer Mode - Chronological List* |\n\n### Configuration \u0026 Tools\n| | |\n|:---:|:---:|\n| ![CAN Bus Config](docs/images/image3.png) | ![Bit Viewer](docs/images/image4.png) |\n| *Multi-CAN Bus Configuration* | *Bit Field Viewer* |\n| ![Dual Device Connection](docs/images/image16.png) | |\n| *Connected to Two CAN Devices Simultaneously* | |\n\n### Split-Screen Monitor (Dual Channel View)\n| | |\n|:---:|:---:|\n| ![Split with TX Panel](docs/images/image5.png) | ![Split Clean View](docs/images/image6.png) |\n| *Split-Screen + Transmit Panel* | *Split-Screen (TX Hidden)* |\n| ![Multi-CAN View](docs/images/image7.png) | ![Split Channel Selection](docs/images/image8.png) |\n| *Multi-CAN Without Split* | *Split-Screen Channel Selection Dialog* |\n| ![Split with Active TX](docs/images/image9.png) | ![Tracer Multi-CAN](docs/images/image10.png) |\n| *Split-Screen + Active Transmission* | *Tracer Mode with Multi-CAN* |\n| ![Multi-Channel Tracer](docs/images/image17.png) | |\n| *Tracer Mode - Multiple Channels with Gateway Indicators* | |\n\n### CAN Gateway (Message Routing \u0026 Modification)\n| | |\n|:---:|:---:|\n| ![Gateway Configuration](docs/images/image11.png) | ![Message Modification Editor](docs/images/image12.png) |\n| *Gateway Basic Configuration* | *Bit-Level Message Modification* |\n| ![Modified Message Result](docs/images/image13.png) | ![Gateway Visual Indicators](docs/images/image15.png) |\n| *Original vs Modified Message Result* | *Gateway Action Indicators (🚫 blocked, ➡️ forwarded, ✏️ modified)* |\n\n---\n\n## Supported Operating Systems\n\n| OS        | Status   | Notes |\n|----------|----------|--------|\n| **macOS**  | ✅ Supported | Use `/dev/cu.usbserial*` or `/dev/cu.usbmodem*`. (Packaged with **py2app**.) |\n| **Linux**  | ✅ Supported | Use `/dev/ttyUSB*`, `/dev/ttyACM*`, or SocketCAN (`can0`, `vcan0`). (Packaged with **PyInstaller**.) |\n\n- **PyQt6**, **python-can**, and **pyserial** are cross-platform.\n- Device detection uses `pyserial` list_ports on all platforms.\n- Serial (SLCAN) and SocketCAN interfaces are auto-detected from the channel name.\n\n---\n\n## Requirements\n\n### Runtime Dependencies (included in packaged app)\n- **Python 3.9+**\n- **python-can** \u003e= 4.3.1\n- **pyserial** \u003e= 3.5\n- **PyQt6** \u003e= 6.6.0\n\n### System Requirements\n- **macOS**: 10.14+ (for running from source) or any recent version (for .app bundle)\n- **Linux**: Modern distribution with Python 3.9+ and Qt/GUI support\n\n---\n\n## Features\n\n### Core Features\n\n#### **Interface \u0026 Visualization**\n- **Monitor Mode**: Groups messages by (ID, Channel) with counter\n- **Tracer Mode**: Chronological list of all messages\n- **Multi-CAN Support**: Work with multiple CAN buses simultaneously\n- **Split-Screen Mode**: View messages from different channels side-by-side\n\n#### **Message Reception**\n- Reception panel with: ID, DLC, Data, Period, Count, ASCII, Comment\n- **Monitor Mode**: Groups by ID, shows Count (first column), Period (ms between messages)\n- **Tracer Mode**: Chronological list with timestamps\n- **Protocol Decoders**: Automatic decoding of FTCAN 2.0, OBD-II, and VAG BAP messages\n\n#### **Message Transmission**\n- Complete CAN message configuration\n- Support for 11 and 29-bit IDs\n- RTR (Remote Transmission Request)\n- Configurable transmission period\n- TX Mode: off, on, trigger\n- Trigger ID and Trigger Data for conditional transmission\n- Delete key support: select TX row(s) and press `Delete`/`Backspace` (macOS)\n\n#### **Advanced Features**\n- **Bit Field Viewer**: Detailed bit-by-bit visualization\n- **Diff Mode (Monitor)**: Reduce noise by hiding repeats and/or highlighting data deltas\n- **Software Filters**: Message filtering by ID and data\n- **Trigger-based TX**: Automatic transmission on received messages\n- **Playback**: Reproduce recorded traces\n- **CAN Gateway**: Bridge and filter messages between buses\n- **Protocol Decoders**: FTCAN 2.0, OBD-II, and VAG BAP support\n\n---\n\n## Protocol Decoders\n\nThe CAN Analyzer includes **modular protocol decoders** for automatic message interpretation:\n\n### FTCAN 2.0 (FuelTech CAN Protocol)\n\n**Description:** Proprietary protocol from FuelTech for ECUs and sensors.\n\n**Features:**\n- **Broadcast Protocol**: Automatic transmission; ECUs use 4 priority streams (Critical, High, Medium, Low)\n- **29-bit Extended IDs**: Product ID, Data Field, Message ID\n- **100+ Measures**: Lambda, RPM, TPS, MAP, temperatures, pressures, injection, ignition\n- **Supported Devices**: WB-O2 Nano (wideband), FT500/FT600 ECUs, FTSwitchPanel (button/LED), EGT-8 (exhaust gas temperature)\n- **Bitrate**: 1 Mbps (fixed) — required for FTCAN\n- **Byte Order**: Big-endian; segmented ECU streams use reverse byte order during reassembly\n\n**Interface — FTCAN Analyzer** (shortcut: **Ctrl+1** or Tools → FTCAN 2.0 Analyzer):\n- **Live Measures** (first tab): Real-time sensor values; best for monitoring\n- **Decoded Messages**: Full decoding of each frame; product-type filter and auto-scroll; may be slower under high message load\n- **Diagnostics**: Stream statistics (per-priority message/measure counts, update rate) and device list\n\n**Usability:** Open the FTCAN Analyzer only after connecting at 1 Mbps, or use Simulation mode. For high traffic, use the product filter (e.g. “O2 Sensors” or “ECUs”) to reduce clutter.\n\n**Documentation:**\n- [FTCAN Protocol \u0026 Decoder Documentation](docs/decoders/FTCAN.md) — Protocol, ECU streams, SwitchPanel, EGT-8, implementation\n- [Official FuelTech Specification](https://files.fueltech.net/manuals/Protocol_FTCAN20_Public_R026.pdf)\n\n**Tools:**\n- `tools/ftcan/ftcan_simulator.py` — Message simulator for testing\n- `tools/ftcan/ftcan_config_capture.py` — Configuration capture tool\n\n---\n\n### OBD-II (On-Board Diagnostics II)\n\n**Description:** Standardized automotive diagnostic protocol (ISO 15765-4).\n\n**Features:**\n- **Request/Response Protocol**: Polling required for data access\n- **11-bit Standard IDs**: 0x7DF (request), 0x7E8-0x7EF (responses)\n- **60+ PIDs**: Engine, fuel, air intake, lambda/O2 sensors, advanced parameters\n- **Services**: Current data, freeze frame, DTCs, vehicle info\n- **Bitrate**: 500 kbps (most common) or 250 kbps\n- **Byte Order**: Big-endian\n- **Universal**: Works with all vehicles 1996+ (US/EU/Japan)\n\n**Interface:**\n- **OBD-II Monitor** (Ctrl+Shift+O): Dedicated UI for OBD-II diagnostics\n  - PID Selection: Choose parameters to monitor\n  - Quick Presets: Basic, Extended, Lambda, Fuel\n  - Automatic Polling: Configurable interval (100ms-10s)\n  - Live Values: Real-time data display\n  - DTC Reading: Read and decode diagnostic trouble codes\n  - VIN Detection: Request VIN (Service 09 PID 02, ISO-TP) and display it in the header\n  - Raw Messages: Request/response log\n  - Statistics: Success rate, response time\n\n**Documentation:**\n- [OBD-II Protocol Documentation](docs/decoders/OBD2.md) - Complete technical specification\n- [ISO 15765-4 Standard](https://www.iso.org/standard/66574.html)\n- [SAE J1979 Standard](https://www.sae.org/standards/content/j1979_201702/)\n- [Wikipedia: OBD-II PIDs](https://en.wikipedia.org/wiki/OBD-II_PIDs)\n\n**Tools:**\n- `tools/general/obd2_poller.py` - CLI polling tool\n- `tools/arduino/arduino_obd2_ecu_simulator.ino` - Arduino ECU simulator\n\n---\n\n### VAG BAP (Bedien- und Anzeigeprotokoll)\n\n**Description:** Volkswagen Group's bidirectional communication protocol for control units and display units.\n\n**Features:**\n- **Bidirectional Protocol**: Two-way communication between FSG (Function Control Unit) and ASG (Display Control Unit)\n- **Multi-Frame Support**: Messages up to 4095 bytes across multiple CAN frames\n- **Parallel Streams**: Up to 4 simultaneous streams per CAN ID\n- **Event-Driven**: Reduces bus load vs constant polling\n- **Platform Flexibility**: Works with both 11-bit and 29-bit CAN IDs\n- **Logical Addressing**: LSG (Logical Service Group) and FCT (Function ID) for routing\n\n**Interface — VAG BAP Analyzer** (shortcut: **Ctrl+3** or Tools → VAG BAP Analyzer):\n- **Reassembled Messages**: Complete multi-frame payloads with header parsing (opcode/lsg/fct)\n- **Raw Frames**: Individual CAN frames (start/continuation) with progress indicators\n- **Visual Grouping**: Link raw frames to their reassembled packets\n- **Detection Modes**: Conservative (multi-frame only) or Aggressive (includes single-frame)\n- **Export/Import**: Save/load captures as JSON for offline analysis\n- **Replay**: Resend captured packets with optional timing preservation\n\n**Usability:** \n- Open the BAP Analyzer to capture and analyze BAP traffic in real-time\n- Use filters (CAN ID, LSG, Source) to focus on specific conversations\n- Export captures for offline analysis or sharing\n- Replay packets to reproduce captured behavior\n\n**Documentation:**\n- [VAG BAP Protocol \u0026 Decoder Documentation](docs/decoders/BAP.md) — Protocol structure, multi-frame reassembly, implementation details\n\n**References:**\n- [norly/revag-bap](https://github.com/norly/revag-bap) — C implementation (GPLv2)\n- [tmbinc/kisim](https://github.com/tmbinc/kisim) — Python implementation (BSD-3)\n- [MIGINC/BAP_RE](https://github.com/MIGINC/BAP_RE) — Reverse engineering documentation\n- [e-golf-comfort-can](https://github.com/thomasakarlsen/e-golf-comfort-can) — Protocol explanation\n\n---\n\n### Protocol Decoder Manager\n\n**Access:** Tools → Protocol Decoders → Manage Decoders (Ctrl+Shift+D)\n\n**Features:**\n- Enable/disable decoders independently\n- View decoding statistics (decoded/failed messages)\n- Configure decoder priority\n- Reset statistics\n\n**Automatic Decoding:**\n- Messages are automatically identified and decoded when decoders are active\n- Decoded information appears in tooltips and dedicated interfaces\n- Multiple decoders can be active simultaneously\n\n---\n\n## Project Structure\n\n```\ncan-bus-analyzer/\n├── can_analyzer.py             # Application entry point (run this to start the app)\n├── can_analyzer.spec           # PyInstaller spec for Linux builds\n├── setup.py                    # py2app configuration for macOS builds\n├── requirements.txt            # Runtime Python dependencies (included in packaged app)\n├── requirements-dev.txt        # Build and dev dependencies (py2app, PyInstaller, Pillow)\n├── run.sh                      # Quick start: creates venv, installs deps, runs the app\n├── LICENSE                     # GNU GPL v3.0 (see License section)\n├── config.json                 # Saved settings (created at first run)\n├── icon.icns / icon.ico        # App icons (macOS / Linux); generated from icon.png via extras\n├── docs/                       # Documentation\n│   ├── images/                 # Screenshots and app images (used in README)\n│   ├── BUILD.md                # Packaging and standalone build instructions\n│   ├── INTERNATIONALIZATION.md # Adding and editing translations\n│   ├── RELEASE_MANUAL.md       # How to create a release manually on GitHub\n│   ├── TOOLS.md                # Overview of tools and scripts\n│   ├── ftcan/                  # FTCAN protocol documentation\n│   │   └── README.md           # Complete FTCAN 2.0 specification\n│   └── decoders/               # Protocol decoder documentation\n│       ├── FTCAN.md            # FTCAN decoder implementation details\n│       └── OBD2.md             # OBD-II decoder implementation details\n├── extras/                     # Build and icon helper scripts (run from project root)\n│   ├── build.sh                # Build standalone app (macOS or Linux)\n│   └── create_icon.sh          # Generate icon.icns / icon.ico from a PNG\n├── tools/                      # Testing and utility scripts\n│   ├── README.md               # Overview of all tools\n│   ├── general/                # General CAN tools\n│   │   ├── README.md           # Documentation for general tools\n│   │   ├── send_can_message.py # Send CAN messages via command line\n│   │   ├── baudrate_detect.py  # Auto-detect CAN baudrate\n│   │   └── obd2_poller.py      # OBD-II polling tool\n│   ├── arduino/                # Arduino examples and simulators\n│   │   ├── README.md           # Arduino tools documentation\n│   │   ├── arduino_msg_generator.ino # CAN message generator\n│   │   ├── arduino_msg_receiver.ino  # CAN message receiver\n│   │   └── arduino_obd2_ecu_simulator.ino # OBD-II ECU simulator\n│   └── ftcan/                  # FTCAN-specific tools\n│       ├── README.md           # FTCAN tools documentation\n│       ├── ftcan_simulator.py  # FTCAN message simulator\n│       └── ftcan_config_capture.py # Configuration capture tool\n├── src/                        # Application source code\n│   ├── __init__.py\n│   ├── main_window.py          # Main window, reception/transmission UI, modes (orchestrator)\n│   ├── models.py               # Data models (CANMessage, CANFilter, TransmitMessage, etc.)\n│   ├── dialogs.py              # General dialogs: Settings, Filters, Triggers, Bit Field Viewer\n│   ├── dialogs_ftcan.py        # FTCAN Analyzer dialog (Live Measures, Decoded Messages, Diagnostics)\n│   ├── dialogs_obd2.py         # OBD-II Monitor dialog\n│   ├── file_operations.py      # Save/load logs and transmit lists (JSON, CSV, TRC)\n│   ├── logger.py               # Logging to files and UI\n│   ├── i18n.py                 # Internationalization (EN, PT, ES, DE, FR)\n│   ├── utils.py                # Helpers (formatting, filtering)\n│   ├── can_interface.py        # CAN bus connection and message send/receive\n│   ├── can_bus_manager.py      # Multi-CAN bus management\n│   ├── config_manager.py       # Configuration file management\n│   ├── protocol_decoder.py     # Protocol decoder base class\n│   ├── theme.py                # UI theme management\n│   ├── usb_device_monitor.py   # USB/serial device detection\n│   ├── config/                 # Centralized configuration\n│   │   ├── shortcuts.py       # Keyboard shortcuts (platform-aware)\n│   │   └── ...\n│   ├── handlers/               # Business logic (connection, playback, filters, gateway, etc.)\n│   │   ├── connection_manager.py\n│   │   ├── playback_handler.py\n│   │   ├── recording_handler.py\n│   │   ├── filter_manager.py\n│   │   ├── dialog_manager.py\n│   │   ├── ui_state_manager.py\n│   │   ├── gateway_manager.py\n│   │   ├── transmit_handler.py\n│   │   ├── file_handler.py\n│   │   └── ...\n│   ├── ui/                     # Reusable UI components\n│   │   ├── menu_bar.py         # Menu bar builder\n│   │   ├── table_helpers.py    # Table formatting helpers\n│   │   ├── receive_table.py    # Receive table component\n│   │   └── ...\n│   └── decoders/               # Protocol decoders\n│       ├── __init__.py\n│       ├── base.py             # Decoder base and manager\n│       ├── decoder_ftcan.py    # FTCAN core (streams, measures, SwitchPanel, EGT-8)\n│       ├── adapter_ftcan.py    # FTCAN protocol adapter\n│       ├── decoder_obd2.py     # OBD-II core decoder\n│       └── adapter_obd2.py     # OBD-II protocol adapter\n└── logs/                       # Application log files (created at runtime)\n```\n\n---\n\n## Hardware Support\n\n### Supported CAN Adapters\n\n- USB-CAN adapters (via python-can SLCAN)\n- Serial CAN adapters (via pyserial)\n- SocketCAN (Linux)\n- Virtual CAN (vcan) for testing\n\n### USB / Serial Device Detection (Cross-Platform)\n\nThe application includes **automatic device detection** on all supported OSes:\n\n- **Scan Devices** in Settings: Opens device selection dialog\n- **Auto-detection**: Monitors USB/serial connections in real-time\n- **Hot-swap support**: Automatically disconnects if device is removed\n- **Simulation Mode**: Test without hardware\n\n**Device paths by OS:**\n\n| OS      | Serial (SLCAN) examples      | SocketCAN |\n|---------|------------------------------|-----------|\n| **macOS**  | `/dev/cu.usbserial*`, `/dev/cu.usbmodem*` | — |\n| **Linux**  | `/dev/ttyUSB0`, `/dev/ttyACM0`           | `can0`, `vcan0` |\n\n### Connection Settings\n\nConfigure in **Settings** dialog (Ctrl+,):\n\n**Device Configuration:**\n- **CAN Device**: Select your adapter (e.g., `/dev/tty.usbserial`, `can0`)\n- **COM Baudrate**: Serial communication speed (default: 115200 bps)\n- **CAN Baudrate**: CAN bus speed (125K, 250K, 500K, 1M)\n\n**Operating Modes:**\n- **Normal Mode**: Receive and Transmit messages\n- **Listen Only**: Receive-only mode (no ACK transmission)\n- **Simulation Mode**: Use simulated data instead of real hardware\n\n---\n\n## Advanced Features\n\n### **Bit Field Viewer**\n\nInspect a received CAN message byte-by-byte and bit-by-bit. For each byte you see its value in hex and decimal, and each of the 8 bits (0 or 1) with color highlighting. You can attach custom labels to bits (e.g. \"Engine ON\", \"Brake\") and save/load them to JSON for documentation or decoding. Open it from the reception table context menu (right-click a message → Bit Field Viewer).\n\n### **Software Filters**\n\nReduce clutter by showing only the messages you care about. Filters can be by **CAN ID** (whitelist or blacklist, with ranges like `0x300-0x310`) and by **data content** (byte index, value, and mask in hex). Enable/disable filters and configure them in **Filters** (Ctrl+F). Filtering is applied in real time to the reception panel.\n\n### **Trigger-based TX**\n\nAutomatically send a CAN message when a specific message is received. You define a **trigger** (ID and optional data pattern); when a matching message appears on the bus, the app sends a configured **response message** (ID and data). Useful for automated replies, testing, or simulating ECUs. Configure in **Triggers** (Ctrl+G) and enable \"Trigger-based Transmission\".\n\n### **Playback**\n\nReplay previously recorded traffic back onto the bus. In **Tracer** mode, use **Record** to capture messages; then **Play All** or **Play Selected** sends them with the same timing. Requires an active connection. Use it to reproduce scenarios, test other nodes, or repeat a sequence without manual retyping.\n\n### **CAN Gateway** 🌉\n\nBridge and filter messages between multiple CAN buses with intelligent routing and real-time control. The Gateway feature allows you to:\n\n**Core Features:**\n- **Bidirectional Routes**: Configure message flow in both directions (CAN1↔CAN2) with automatic loop prevention\n- **Static Blocking**: Block specific message IDs from being forwarded\n- **Dynamic Blocking**: Automatically cycle through ID ranges, blocking each for a specified period\n- **Message Modification**: Modify message IDs and data bytes as they pass through\n- **Directional Rules**: Apply different rules based on route direction\n- **Visual Indicators**: Real-time feedback showing gateway actions (🚫 blocked, ➡️ forwarded, ✏️ modified, 🔄 loop prevented)\n- **Loop Prevention**: Automatic detection and prevention of infinite message loops\n- **Statistics**: Track forwarded, blocked, modified, and loop-prevented messages in real-time\n- **Configuration Save/Load**: Save gateway setups as JSON files for reuse\n\n**How to Use:**\n\n1. Configure at least 2 CAN buses in Settings\n2. Open **Tools → Gateway** (Ctrl+Shift+W)\n3. Click **\"⇄ Add Bidirectional\"** for quick bidirectional setup\n4. Enable **\"Enable Gateway\"** and **\"Enable loop prevention\"** (recommended)\n5. Add blocking rules or modification rules as needed\n6. Monitor statistics and visual indicators to verify operation\n\n**Visual Indicators in UI:**\n- `CAN1 🚫` - Message blocked (not forwarded)\n- `CAN1 ➡️` - Message forwarded to destination\n- `CAN1 ✏️` - Message modified before forwarding\n- `CAN1 🔄` - Loop detected and prevented\n\n**Important**: All received messages **always appear in the UI**, regardless of gateway actions. The gateway only controls forwarding, not display.\n\n**Use Cases:**\n- Bridge two isolated CAN networks with selective filtering\n- Test ECU behavior by blocking specific messages\n- Simulate automotive gateway ECUs\n- Protocol translation between networks\n- Debug multi-network vehicle architectures\n- Test network resilience by blocking messages dynamically\n\n**Documentation:** See [docs/GATEWAY.md](docs/GATEWAY.md) for complete gateway documentation\n\n### **Split-Screen Monitor**\n\nView messages from different CAN channels simultaneously in a split-screen layout.\n\n**How to Use:**\n\n1. Configure at least 2 CAN buses in Settings\n2. Enable **View → Split-Screen Mode** (Ctrl+D)\n3. Select which channel to display in each panel (left/right)\n4. Messages are automatically filtered by channel\n\n**Benefits:**\n- Compare message traffic between two networks\n- Monitor gateway operation in real-time\n- Analyze timing differences between channels\n- Simplify multi-network debugging\n\n### **Multi-CAN Support**\n\nWork with multiple CAN buses simultaneously. Configure up to multiple CAN interfaces (e.g., two USB adapters, or one adapter with multiple channels) and monitor/transmit on all of them at once.\n\n#### **Configuration**\n\n1. Open **Settings** (Ctrl+,)\n2. Navigate to **Multi-CAN Configuration** section\n3. For each CAN bus:\n   - **Name**: Identifier for the bus (e.g., \"CAN1\", \"CAN2\", \"Engine\", \"Body\")\n   - **Device**: Physical device path (e.g., `/dev/ttyUSB0`, `can0`, `/dev/cu.usbserial-1`)\n   - **Baudrate**: CAN bus speed (125k, 250k, 500k, 1000k, or custom)\n   - **Listen Only**: Enable for passive monitoring (no ACK, no transmission)\n   - **COM Baudrate**: Serial port speed for SLCAN adapters (115200, 230400, etc.)\n   - **RTS HS**: Hardware handshake for serial adapters\n4. Click **Add CAN** to add more buses\n5. Use **Scan Devices** to auto-detect available devices\n6. Click **OK** to save\n\n#### **Interface Auto-Detection**\n\nThe application automatically detects the interface type based on the device name:\n- **SocketCAN**: `can0`, `can1`, `vcan0` → uses `socketcan` interface\n- **SLCAN**: `/dev/ttyUSB*`, `/dev/cu.usbserial*` → uses `slcan` interface\n\n#### **Usage**\n\n**Monitor/Tracer:**\n- Messages from all connected buses appear in the reception table\n- **Channel** column shows which bus received each message (CAN1, CAN2, etc.)\n- Messages are grouped by **(ID, Channel)** in Monitor mode\n- Each (ID, Channel) combination has independent counters and period tracking\n\n**Transmit:**\n- Select target **Channel** from dropdown in TX panel\n- Send messages to specific bus or broadcast to all\n- TX list saves the channel for each message\n\n**Status Bar:**\n- Shows detailed status for each channel:\n  - **Real mode**: `CAN1: ✓ 500k | CAN2: ✓ 250k` (✓ = connected, ✗ = failed)\n  - **Simulation mode**: `CAN1: SIM 500k | CAN2: SIM 250k`\n- Device info shows mapping: `CAN1→/dev/ttyUSB0 | CAN2→can0`\n\n#### **Use Cases**\n\n- **Multi-network vehicles**: Monitor engine CAN and body CAN simultaneously\n- **Gateway testing**: Send on one bus, verify on another\n- **Dual-adapter setups**: Use two USB-CAN adapters for isolated testing\n- **Channel comparison**: Compare same ID on different buses\n- **Protocol mixing**: FTCAN on one bus, OBD-II on another\n\n---\n\n## Usability\n\nTips for day-to-day use and common workflows.\n\n### General\n\n- **Connect before protocol tools:** For **FTCAN Analyzer**, connect to the bus first (or enable Simulation mode). FTCAN requires **1 Mbps**; if no bus is at 1 Mbps, the analyzer will show a clear message.\n- **Simulation mode:** In **Settings**, enable “Simulation Mode” to run without hardware. Useful for learning the UI, testing filters/triggers, and trying decoders.\n- **Multi-CAN:** To use **Gateway** or **Split-Screen**, configure at least two CAN buses in **Settings** and connect.\n\n### FTCAN Analyzer\n\n- **Live Measures** is the first tab: use it for real-time sensor values (lambda, RPM, etc.).\n- **Decoded Messages** can be slower under very high message rates; a note appears next to “Auto-Decode”. Use the **product type filter** (e.g. “O2 Sensors”, “ECUs”) to reduce rows and improve responsiveness.\n- **Auto-scroll** in Decoded Messages can be turned on/off; status (cache, workers) is shown at the bottom-left of the dialog.\n- **Diagnostics** tab shows stream statistics (messages/measures per priority) and devices.\n\n### Keyboard Shortcuts (Platform)\n\n- On **macOS**, the shortcut modifier is **Command (⌘)** for the actions in the table (the app uses Qt’s “Ctrl” for both Command on macOS and Control on Windows/Linux).\n- Shortcuts are centralized in `src/config/shortcuts.py` and can be adjusted there.\n\n### Saving and Loading\n\n- **Receive:** Save/Load Monitor or Tracer log (JSON, CSV, or trace format) from the File menu or toolbar.\n- **Transmit:** Save/Load the transmit list (JSON) to reuse message sets.\n- **Settings** (including multi-CAN and theme) are stored in `config.json` and persist between runs.\n\n---\n\n## Configuration\n\n### Configuration File\n\nSettings are **automatically saved** to `config.json` in the application directory and persist across sessions:\n\n**Location:** `./config.json`\n\n**Format:**\n```json\n{\n  \"language\": \"en\",\n  \"theme\": \"system\",\n  \"timestamp\": true,\n  \"simulation_mode\": false,\n  \"can_buses\": [\n    {\n      \"name\": \"CAN1\",\n      \"channel\": \"/dev/ttyUSB0\",\n      \"baudrate\": 500000,\n      \"interface\": \"slcan\",\n      \"listen_only\": false,\n      \"com_baudrate\": \"115200 bit/s\",\n      \"rts_hs\": false\n    },\n    {\n      \"name\": \"CAN2\",\n      \"channel\": \"can0\",\n      \"baudrate\": 250000,\n      \"interface\": \"socketcan\",\n      \"listen_only\": true\n    }\n  ]\n}\n```\n\n**Legacy single-CAN format** is still supported for backward compatibility:\n```json\n{\n  \"language\": \"en\",\n  \"baudrate\": 500000,\n  \"channel\": \"can0\",\n  \"listen_only\": true\n}\n```\n\n**Manual editing:**\nYou can manually edit `config.json` if needed (application must be closed).\n\n### Keyboard Shortcuts\n\nOn **macOS**, the modifier is shown and works as **Command (⌘)**. Shortcuts are centralized in `src/config/shortcuts.py` and can be adjusted there.\n\n| Action | Shortcut |\n|--------|----------|\n| Connect | `Ctrl+O` |\n| Reset | `Ctrl+R` |\n| Save Receive Log | `Ctrl+Shift+M` |\n| Load Receive Log | `Ctrl+Alt+M` |\n| Save Tracer Log | `Ctrl+S` |\n| Load Tracer Log | `Ctrl+Alt+L` |\n| Save Transmit List | `Ctrl+Shift+S` |\n| Load Transmit List | `Ctrl+Alt+T` |\n| Clear Receive | `Ctrl+K` |\n| Tracer Mode | `Ctrl+T` |\n| Filters | `Ctrl+F` |\n| Triggers | `Ctrl+Alt+G` |\n| **Diff Mode Settings** | `Ctrl+D` |\n| **Gateway** | `Ctrl+Shift+W` |\n| Split-Screen Mode | `Ctrl+Alt+D` |\n| **FTCAN Analyzer** | `Ctrl+1` |\n| **OBD-II Monitor** | `Ctrl+2` |\n| **VAG BAP Analyzer** | `Ctrl+3` |\n| **Decoder Manager** | `Ctrl+Shift+D` |\n| Close Active Dialog | `Ctrl+W` |\n| Settings | `Ctrl+,` |\n| Exit | `Ctrl+Q` |\n\n---\n\n## Documentation\n\n### Main Documentation\n\n| Document | Description |\n|----------|-------------|\n| [docs/BUILD.md](docs/BUILD.md) | Packaging and standalone build (py2app, PyInstaller, icons) |\n| [docs/GATEWAY.md](docs/GATEWAY.md) | **CAN Gateway** — Complete documentation: bidirectional routes, blocking, modification, loop prevention |\n| [docs/INTERNATIONALIZATION.md](docs/INTERNATIONALIZATION.md) | Internationalization (i18n): adding and editing translations |\n| [docs/RELEASE_MANUAL.md](docs/RELEASE_MANUAL.md) | How to create a release manually on GitHub |\n| [docs/TOOLS.md](docs/TOOLS.md) | Overview of tools and scripts in the repository |\n\n### Protocol Documentation\n\n| Document | Description |\n|----------|-------------|\n| [docs/decoders/FTCAN.md](docs/decoders/FTCAN.md) | **FTCAN 2.0** — Protocol, ECU 4-stream broadcast, SwitchPanel, EGT-8, decoder implementation |\n| [docs/decoders/OBD2.md](docs/decoders/OBD2.md) | **OBD-II Protocol** — Complete technical specification |\n| [docs/decoders/BAP.md](docs/decoders/BAP.md) | **VAG BAP** — Protocol structure, multi-frame reassembly, implementation details |\n\n### Tools Documentation\n\n| Document | Description |\n|----------|-------------|\n| [tools/README.md](tools/README.md) | Overview of all testing and utility tools |\n| [tools/general/README.md](tools/general/README.md) | General CAN tools (send, baudrate detect, OBD-II poller) |\n| [tools/arduino/README.md](tools/arduino/README.md) | Arduino examples and simulators (CAN, OBD-II) |\n| [tools/ftcan/README.md](tools/ftcan/README.md) | FTCAN-specific tools (simulator, config capture) |\n\n---\n\n## Tools \u0026 Utilities\n\n### General CAN Tools\n\n**Location:** `tools/general/`\n\n- **send_can_message.py** - Send CAN messages via command line\n- **baudrate_detect.py** - Auto-detect CAN baudrate (trial and error)\n- **obd2_poller.py** - OBD-II polling tool with interactive PID selection\n\n**Documentation:** [tools/general/README.md](tools/general/README.md)\n\n### Arduino Tools\n\n**Location:** `tools/arduino/`\n\n- **arduino_msg_generator.ino** - CAN message generator (MCP2515)\n- **arduino_msg_receiver.ino** - CAN message receiver (MCP2515)\n- **arduino_obd2_ecu_simulator.ino** - OBD-II ECU simulator with animated data\n\n**Documentation:** [tools/arduino/README.md](tools/arduino/README.md)\n\n### FTCAN Tools\n\n**Location:** `tools/ftcan/`\n\n- **ftcan_simulator.py** - FTCAN message simulator (WB-O2 Nano, ECU)\n- **ftcan_config_capture.py** - Capture and replay configuration commands\n\n**Documentation:** [tools/ftcan/README.md](tools/ftcan/README.md)\n\n---\n\n## Troubleshooting\n\n### Application won't start\n\nWhen running from source, verify the environment:\n\n```bash\n# Check Python version\npython3 --version  # Should be 3.9+\n\n# Recreate virtual environment\nrm -rf venv\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n### CAN adapter not detected\n\n1. Check device connection: `ls /dev/tty.*`\n2. Verify permissions: `sudo chmod 666 /dev/tty.usbserial*`\n3. Try simulation mode (no hardware needed)\n\n### Language not changing\n\n1. Ensure you selected language in Settings\n2. **Restart the application** (required for full effect)\n3. Check logs for errors: `grep \"language\\|idioma\" logs/*.log`\n\n### Messages not appearing\n\n1. Check connection status (should show \"Connected\")\n2. Verify CAN baudrate matches your network\n3. Check software filters (disable if enabled)\n4. Try clearing and reconnecting\n\n### Protocol Decoder Issues\n\n**FTCAN not decoding:**\n1. Verify baudrate is exactly **1 Mbps** (required for FTCAN)\n2. Connect to the bus before opening FTCAN Analyzer, or use Simulation mode\n3. Check that FTCAN decoder is enabled (Decoder Manager: Ctrl+Shift+D)\n4. Open FTCAN Analyzer (Ctrl+1) and check the **Diagnostics** tab for stream/device info\n5. Ensure messages use 29-bit Extended IDs\n\n**FTCAN Decoded Messages tab slow:**\n- At high message rates the Decoded Messages tab can be slower; use the **product type filter** (e.g. O2 Sensors, ECUs) to reduce rows. Prefer the **Live Measures** tab for real-time values.\n\n**OBD-II not responding:**\n1. Verify baudrate is 500 kbps (or 250 kbps)\n2. Turn vehicle ignition to ON position\n3. Check that OBD-II decoder is enabled (Ctrl+Shift+D)\n4. Open OBD-II Monitor (Ctrl+Shift+O) and try \"Check Available PIDs\"\n5. Increase polling interval to 500-1000ms\n\n---\n\n## Contributing\n\nContributions are welcome! Here's how you can help:\n\n### Adding Translations\n\n1. Edit `src/i18n.py`\n2. Add your language to `LANGUAGES`\n3. Translate all keys in `TRANSLATIONS`\n4. Test thoroughly\n5. Submit PR\n\n### Reporting Bugs\n\n1. Check existing issues\n2. Provide detailed description\n3. Include log files (`logs/`)\n4. Specify OS version and Python version\n\n### Feature Requests\n\n1. Open an issue\n2. Describe the feature\n3. Explain use case\n\n---\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for detailed version history and release notes.\n\n**Latest Release: v1.2.2** - Docs: build and release process in BUILD.md\n- **FTCAN 2.0 Protocol Decoder**: Automatic decoding of FuelTech devices\n- **OBD-II Protocol Decoder**: Universal automotive diagnostics support\n- **FTCAN Analyzer**: Dedicated UI for FTCAN messages with live measures\n- **OBD-II Monitor**: Interactive PID selection, polling, and DTC reading\n- **Protocol Decoder Manager**: Enable/disable decoders, view statistics\n- **Comprehensive Documentation**: Complete technical specs for FTCAN and OBD-II\n- **Testing Tools**: Arduino OBD-II simulator, FTCAN simulator, OBD-II poller\n- **Improved Architecture**: Modular decoder system (core + adapter pattern)\n- **File Reorganization**: Decoders in `src/decoders/`, improved project structure\n\n**Previous Releases:**\n\n**v0.4.0** - Protocol Decoders \u0026 Enhanced Documentation\n- FTCAN 2.0 and OBD-II protocol decoders\n- Dedicated protocol analyzer UIs\n- Comprehensive technical documentation\n\n**v0.3.0** - CAN Gateway \u0026 Split-Screen\n- CAN Gateway for bridging and filtering between two CAN buses\n- Split-Screen Monitor for side-by-side channel viewing\n- Static and dynamic message blocking\n- Message modification capabilities\n- Real-time gateway statistics\n- Complete internationalization support\n\n---\n\n## License\n\nThis project is licensed under the **GNU General Public License v3.0 (GPL-3.0)**.\n\n### What this means:\n\n- **Freedom to use**: You can use this software for any purpose\n- **Freedom to study**: You can study how the program works and modify it\n- **Freedom to share**: You can redistribute copies of the software\n- **Freedom to improve**: You can distribute modified versions\n\n### Key terms:\n\n- If you distribute this software, you must make the source code available\n- Any modifications must also be licensed under GPL-3.0\n- You must include the original copyright notice and license text\n- There is NO WARRANTY for this software\n\n**Attribution:** Although not required by GPL-3.0, we recommend that you **reference and credit the original source** (this project and repository) when you use, redistribute, or build upon this software.\n\n**Full license text**: [LICENSE](LICENSE) (in this repo) · [GNU GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html) (official)\n\n---\n\n## Project Status\n\n**Version**: 1.2.2  \n**Status**: Stable  \n**Last Updated**: February 2026\n\n### Implemented Features\n- Monitor \u0026 Tracer modes\n- Message transmission\n- File operations (save/load)\n- Bit field viewer\n- Software filters\n- Trigger-based TX\n- Playback functionality\n- Multi-language support (5 languages)\n- Comprehensive logging\n- USB device auto-detection\n- Hot-swap device support\n- Multi-CAN support (multiple buses simultaneously)\n- Per-channel filters and improved terminology (Channel/Device)\n- CAN Gateway (bridge and filter between buses)\n- Split-Screen Monitor (dual channel view)\n- **FTCAN 2.0 Protocol Decoder** (FuelTech devices)\n- **OBD-II Protocol Decoder** (universal automotive diagnostics)\n- **Protocol Decoder Manager** (enable/disable, statistics)\n- **FTCAN Analyzer** (dedicated FTCAN UI)\n- **OBD-II Monitor** (interactive diagnostics UI)\n\n### Recently Added / Updated\n- **FTCAN / WB-O2** (v1.2.1): Devices tab in FTCAN analyzer; special IDs for WB-O2 config/association; `tools/ftcan/wbo2_nano_config_tx.py` for scale presets over CAN\n- **Packaging docs** (v1.2.2): `docs/BUILD.md` documents local build, version bump, tag push, and CI release builds\n- **CAN Gateway Enhancements** (v1.2.2):\n  - ✅ **Bidirectional Gateway** with automatic loop prevention\n  - ✅ **Visual Indicators** (🚫 blocked, ➡️ forwarded, ✏️ modified, 🔄 loop prevented)\n  - ✅ **Directional Rules** for blocking and modification\n  - ✅ **Always Show Messages** in UI (gateway only controls forwarding)\n  - ✅ **Device Disconnect Detection** with automatic reconnection prompt\n  - ✅ **Connection Monitoring** with watchdog for serial devices\n  - ✅ **JSON Configuration Files** (`.json` instead of `.gwcfg`)\n  - ✅ **Complete Gateway Documentation** ([docs/GATEWAY.md](docs/GATEWAY.md))\n- **FTCAN 2.0**: ECU 4-stream broadcast decoding, SwitchPanel (buttons/LED), EGT-8 support; Live Measures as primary tab; product filter and diagnostics\n- **Usability**: Centralized shortcuts (`src/config/shortcuts.py`), usability section in README, FTCAN tips (1 Mbps, filters, performance)\n- **Architecture**: Handlers (`src/handlers/`) and UI components (`src/ui/`), config module (`src/config/`) for maintainability\n\n### Planned Features\n- Hardware filters (28 configurable)\n- CAN Bomber (spoofing tool)\n- Statistics \u0026 analytics\n- DBC file support\n- Real-time plotting\n- Additional protocol decoders (J1939, CANopen)\n\n---\n\n## Technical Notes\n\n### CAN Protocol Implementation\n\nThe application uses `python-can` library which abstracts the Lawicel SLCAN protocol:\n\n**Supported Interfaces:**\n- **SLCAN** (Serial CAN): For USB-serial adapters implementing Lawicel protocol\n- **SocketCAN**: Native Linux/macOS CAN interface\n- **Virtual CAN**: For testing without hardware\n\n**Why python-can?**\n- Handles protocol complexity automatically\n- Supports multiple CAN interfaces\n- Cross-platform compatibility\n- Active development and community support\n- No need to implement low-level SLCAN commands manually\n\nThe application automatically detects the interface type based on the device path:\n- `/dev/tty.*` or `/dev/cu.*` → SLCAN\n- `can*` or `vcan*` → SocketCAN\n\n### Protocol Decoder Architecture\n\n**Modular Design:**\n- **Core Decoder** (`*_decoder.py`): Pure decoding logic, protocol-specific\n- **Protocol Adapter** (`*_protocol_decoder.py`): Integration with app, wraps core decoder\n- **Base Class** (`protocol_decoder.py`): Abstract interface for all decoders\n\n**Benefits:**\n- Easy to add new protocols\n- Clean separation of concerns\n- Testable decoder logic\n- Consistent API for all protocols\n\n**Supported Protocols:**\n- **FTCAN 2.0**: FuelTech proprietary (1 Mbps, 29-bit, broadcast)\n- **OBD-II**: ISO 15765-4 (500 kbps, 11-bit, request/response)\n\n---\n\n**Ready to analyze CAN traffic? Start with `./run.sh` or explore the [documentation](docs/)!** \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphnahes%2Fcan-bus-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphnahes%2Fcan-bus-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphnahes%2Fcan-bus-analyzer/lists"}