[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1413":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":15,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":38,"readmeContent":39,"aiSummary":40,"trendingCount":16,"starSnapshotCount":16,"syncStatus":41,"lastSyncTime":42,"discoverSource":43},1413,"CANviz","Chanchaldhiman\u002FCANviz","Chanchaldhiman","Open-source browser-based CAN bus analyzer. Works with low cost USB hardware.","",null,"TypeScript",261,12,8,4,0,1,26,3,49.94,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34,35,36,37],"automotive","can","can-bus","canbus","cantools","embeddded","fastapi","open-source","python","raspberry-pi","react","socketcan","2026-06-12 04:00:09","# CANviz\n\n**A browser-based CAN bus analyzer. Plug in. One command. Analyze.**\n\n[![CI](https:\u002F\u002Fgithub.com\u002FChanchaldhiman\u002FCANviz\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FChanchaldhiman\u002FCANviz\u002Factions)\n[![PyPI version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fcanviz.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcanviz\u002F)\n[![Total Downloads](https:\u002F\u002Fimg.shields.io\u002Fpepy\u002Fdt\u002Fcanviz?label=total%20downloads)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fcanviz)\n[![Monthly Downloads](https:\u002F\u002Fstatic.pepy.tech\u002Fbadge\u002Fcanviz\u002Fmonth)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fcanviz)\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fcanviz.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcanviz\u002F)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](LICENSE)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FChanchaldhiman\u002FCANviz?style=social)](https:\u002F\u002Fgithub.com\u002FChanchaldhiman\u002FCANviz)\n\n```bash\npip install canviz\ncanviz\n# → browser opens at http:\u002F\u002Flocalhost:8080\n```\n\n![CANviz demo](docs\u002Fdemo.gif)\n\nCANviz works with any USB CAN adapter even low cost adapters too(~$8). No GUI install,\nno driver setup, no account, no internet connection required. It runs entirely in\nyour browser at `localhost` - whether you are an embedded engineer debugging an ECU,\na researcher studying automotive protocols, or a hobbyist on your first CAN project.\n\n[python-can](https:\u002F\u002Fgithub.com\u002Fhardbyte\u002Fpython-can) is the library\nCANviz is built on and is invaluable for scripting and automation. CANviz takes a\ndifferent approach: browser-first, pip-installable, and SSH-friendly for engineers\nworking on remote and headless setups.\n\n---\n## Which Interface Do I Use?\nNot sure which interface to select? Check [Device Guide](docs\u002Finterfaceguide.md)\n\n---\n\n## What's New\n\n### v0.3.0\n\n**J1939 passive decoder** - zero-config protocol intelligence for trucks, agriculture, and marine networks.\n\n- **Auto-detection** - CANviz detects 29-bit extended-ID traffic automatically and offers to enable the decoder\n- **CAN ID decomposition** - every frame instantly shows Priority, PGN, Source Address (SA), and Destination Address\n- **54 PGN name definitions** built-in (EEC1, CCVS, DM1, ET1, AMB, VEP1, TP.CM\u002FDT and more)\n- **99 SA address names** - ECU names like \"Engine #1\", \"Brakes - System Controller\", \"Diesel Particulate Filter Controller\"\n- **BAM transport reassembly** - multi-packet messages (VIN, software ID, long DM payloads) are reassembled and shown complete\n- **DM1 active fault decode** - SPN number, component name, Failure Mode description, occurrence count, and lamp status (MIL \u002F Red Stop \u002F Amber Warning \u002F Protect)\n- **Message table columns** - PGN, PGN Name, SA, DA appear automatically when decoder is enabled; BAM CM, BAM DT, and DM1 badges on each row\n- **Light \u002F dark mode** - theme toggle in the top bar, persists across sessions\n\n**Standard bitrate for J1939:** 250 kbps (trucks, agriculture, marine). See [J1939 Guide](docs\u002Fj1939.md) for full protocol documentation, limitations, and DBC-based signal decode.\n\n---\n\n### v0.2.4 \n \n**New hardware support**\n- Added **GY \u002F Seeed Studio USB-CAN Analyzer** (`seeedstudio` interface) - the cheap\n  USB CAN adapter widely sold on Amazon and AliExpress using the `0xAA`\u002F`0x55` binary\n  protocol. Select `USB-CAN Analyzer (GY\u002FSeeed)` in the interface dropdown, enter your\n  COM port, and connect. No baud rate configuration needed.\n**Bug fixes**\n- Fixed `The serial module is not installed` error - `pyserial` is now a declared\n  dependency and installs automatically with `pip install canviz`.\n- Fixed sent frames not appearing in the message table on seeedstudio and slcan\n  interfaces. Previously only gs_usb (Candlelight) showed sent frames because it\n  echoes them back through hardware loopback. Non-loopback interfaces now echo sent\n  frames in software.\n- Fixed `AttributeError` on first connect (`self._open_serial_baudrate` not\n  initialised in `BusManager.__init__`).\n---\n\n## Quick Start\n\n### Windows - gs_usb (Candlelight firmware)\n```bash\npip install canviz\ncanviz\n```\nAuto-detects your connected device. Browser opens automatically.\n\n### Windows - slcan \u002F COM port\n```bash\ncanviz --interface slcan --channel COM3 --bitrate 500000\n```\n\n### Raspberry Pi \u002F Linux\n```bash\nsudo ip link set can0 up type can bitrate 500000\ncanviz --interface socketcan --channel can0\n```\n\n### Remote machine over SSH\n```bash\n# On your laptop - forward port 8080 from the remote machine\nssh -L 8080:localhost:8080 user@remote-ip\n\n# On the remote machine\ncanviz --interface socketcan --channel can0\n\n# Open in your local browser\nhttp:\u002F\u002Flocalhost:8080\n```\n\n### Headless \u002F no browser\n```bash\ncanviz serve --headless --port 8080\n```\n\n### No hardware - virtual bus\n```bash\ncanviz --interface virtual\n```\n\n> **If your device shows a COM port** in Device Manager, it is running slcan firmware -\n> use the slcan quick start above. Candlelight devices enumerate as `gs_usb \u002F WinUSB`\n> with no COM port.\n\n---\n\n## Features\n\n### Live message table\nEvery frame on the bus, in real time. ID, DLC, raw bytes, frame count, update rate,\nlast seen timestamp. Virtual scrolling handles thousands of rows without frame loss.\nTested at 2,000 fps sustained with zero drops.\n\n### DBC signal decoding\nUpload your `.dbc` file and raw hex bytes become named signal values - inline in the\nmessage table. Toggle between raw and decoded view at any time.\n\n### Signal time-series plotting *(new in v0.2.0)*\nPlot any DBC-decoded signal as a live time-series graph. Select up to 8 signals\nsimultaneously on a shared time axis. Built on [uPlot](https:\u002F\u002Fgithub.com\u002Fleeoniya\u002FuPlot)\n- handles 36,000 buffered points per signal with LTTB downsampling, rendering at a\nsmooth 10 Hz regardless of bus rate.\n\n- **Adjustable time window** - 10s, 30s, 1m, 5m, 30m\n- **Zoom and pan** - drag to zoom, double-click to resume live scroll\n- **Threshold lines** - set a limit per signal; line and pill border turn red on breach\n- **Multi-signal overlay** - compare RPM, throttle, and vehicle speed on one axis\n- **PNG export** - one click, includes signal legend and axis labels\n\n### Bus health statistics *(new in v0.2.0)*\nAlways-visible status bar showing frames Rx\u002FTx, bus load %, error frame count,\nbus-off events, and KB\u002Fs throughput. Error frame visibility depends on hardware -\nslcan devices typically drop error frames silently; a tooltip explains this when\na slcan interface is active.\n\n### Multi-frame transmit with timers *(new in v0.2.0)*\nBuild a list of frames, each with its own independent transmission interval.\nSend a heartbeat at 20 Hz and a speed signal at 10 Hz simultaneously.\nEach row has its own start\u002Fstop control. State persists across tab switches.\n\n### CLI and headless mode *(new in v0.2.0)*\n`canviz monitor` renders a live colour-coded table in the terminal - works over SSH,\nin CI pipelines, and on headless Raspberry Pi setups. See the\n[CLI Reference](#cli-reference) below for all subcommands.\n\n### Record and replay\nRecord sessions to industry-standard `.asc` and `.csv` formats. Replay any log file\nwith adjustable speed (0.5× to 10×).\n\n### Filtering\nFilter by message ID (hex range) or signal name. Filter state persists in the URL\nso you can share an exact view with a colleague.\n\n---\n\n## Hardware\n\nAny module running **Candlelight firmware** works plug-and-play on Windows:\n\n| Hardware | Price | Notes |\n|----------|-------|-------|\n| FYSETC UCAN (STM32F072) | ~$8 | Validated reference hardware |\n| CANable 1.0 (Candlelight firmware) | ~$15 | Widely available |\n| Any gs_usb \u002F WinUSB compatible device | varies | Should work |\n\n**Also supported via python-can configuration:**\n- **slcan** - devices running slcan firmware (COM port)\n- **SocketCAN** - Linux, Raspberry Pi, WSL2\n- **PEAK PCAN-USB, Kvaser** - via python-can config, no code changes needed\n- **Virtual bus** - software loopback, no hardware needed\n\n---\n\n## Security Model\n\nCANviz does not use WebUSB or any browser-level hardware access API.\n\n```\nBrowser  (your local browser tab)\n    ↕  HTTP + WebSocket - localhost only, never leaves your machine\nPython backend  (127.0.0.1:8080)\n    ↕  python-can\nUSB CAN adapter\n    ↕\nCAN Bus\n```\n\nThe browser communicates only with a local Python process at `127.0.0.1:8080`.\nNo data leaves your machine. No cloud. No telemetry. No external connections of any kind.\nAll USB communication happens inside the Python backend - the browser never has\ndirect access to your USB device or CAN bus.\n\nThe security model is the same as running any locally installed Python tool:\nyou are trusting the code you installed via `pip`. If you are security-conscious,\nreview the source on GitHub before installing.\n\n**Remote deployments:** Use the default `--host 127.0.0.1` binding and access via\nSSH port forwarding. Do not expose port 8080 to an untrusted network without additional\ncontrols such as a reverse proxy with authentication.\n\n---\n\n## CLI Reference\n\n```\ncanviz [OPTIONS]\n\n  --interface   gs_usb | slcan | socketcan | virtual  (default: gs_usb)\n  --channel     COM port or SocketCAN channel  (e.g. COM3, can0)\n  --bitrate     CAN bitrate in bps  (default: 500000)\n  --host        Host to bind to  (default: 127.0.0.1)\n  --port        Port to bind to  (default: 8080)\n  --headless    Start without opening a browser\n```\n\n**Subcommands:**\n```bash\n# Live terminal monitor - works over SSH\ncanviz monitor --interface socketcan --channel can0 --dbc vehicle.dbc\n\n# Capture frames to file\ncanviz capture --output trace.json --duration 60\n\n# Decode a captured log\ncanviz decode --input trace.json --dbc vehicle.dbc --output decoded.csv\n\n# API-only server, no browser\ncanviz serve --headless --port 8080\n```\n\nSee the **[CLI Guide](docs\u002Fcli.md)** for full SSH workflow documentation.\n\n---\n\n## REST API & WebSocket\n\nFull interactive docs at `http:\u002F\u002Flocalhost:8080\u002Fdocs` while running.\n\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | `\u002Fconnect` | Open CAN interface |\n| POST | `\u002Fdisconnect` | Close interface |\n| GET | `\u002Fstatus` | Connection state and config |\n| GET | `\u002Fstats` | Bus statistics snapshot |\n| POST | `\u002Fsend` | Transmit a CAN frame |\n| WS | `\u002Fws\u002Fframes` | Live frame + stats stream (JSON) |\n| POST | `\u002Fdbc\u002Fload` | Upload a DBC file |\n| GET | `\u002Fdbc\u002Fmessages` | List decoded message definitions |\n| DELETE | `\u002Fdbc` | Unload DBC |\n| POST | `\u002Flog\u002Fstart` | Start recording |\n| POST | `\u002Flog\u002Fstop` | Stop and finalise log |\n| GET | `\u002Flog\u002Fdownload\u002F{file}` | Download `.asc` or `.csv` |\n| POST | `\u002Freplay\u002Fstart` | Start replaying a log file |\n| POST | `\u002Freplay\u002Fstop` | Stop replay |\n\n---\n\n## Architecture\n\n```\n[CAN Bus]\n    ↓\n[USB CAN Module]  ~$8–$65 depending on capability\n    ↓\n[Python Backend]\n  FastAPI · python-can · cantools · aiofiles · typer · rich\n    ↓  HTTP + WebSocket (localhost only - no external connections)\n[Browser UI]\n  React 18 · TanStack Table · TanStack Virtual · Zustand · uPlot\n    ↓\n  http:\u002F\u002Flocalhost:8080\n```\n\n---\n\n## Validated Hardware & Performance\n\n| Hardware | Interface | OS | Status |\n|----------|-----------|-----|--------|\n| FYSETC UCAN (STM32F072, Candlelight) | gs_usb | Windows 11 | ✅ Tested |\n| FYSETC UCAN (STM32F072, Candlelight) | gs_usb | Raspberry Pi OS | ✅ Tested |\n| DSD TECH SH-C31A | gs_usb\u002Fslcan | Windows \u002F Linux | ✅ Tested |\n| SEEEDStudio | GV\u002FSEEED | Windows \u002F Linux | ✅ Tested |\n| Virtual bus | virtual | Windows \u002F Linux | ✅ Tested |\n| PEAK PCAN-USB | pcan | Windows \u002F Linux | ✅ Tested |\n| Kvaser | kvaser | Windows \u002F Linux | Blocked - see Known Limitations |\n\n**Throughput:** 2,000 fps sustained - zero frame loss, stable UI, no memory growth.\n\n---\n\n## Known Limitations\n\n- **USB timestamp jitter ~1 ms** - a hardware limitation of USB-connected CAN adapters.\n  Not suitable for sub-millisecond timing analysis.\n- **Bus load above 2,000 fps** - untested. A server-side throttling hook is built in\n  and can be enabled if needed.\n- **CAN FD** - frames with >8 byte payloads display as raw hex. Full CAN FD UI\n  support is in progress.\n- **Kvaser on Windows** - CANviz has full UI support for Kvaser hardware. However,\n  connecting fails due to multiple `canIoCtlInit` calls returning `canERR_PARAM (-1)`\n  in python-can 4.6.1 on Windows. This is a python-can bug tracked at\n  [python-can #2051](https:\u002F\u002Fgithub.com\u002Fhardbyte\u002Fpython-can\u002Fissues\u002F2051). No CANviz\n  code change is needed - once the upstream fix releases, upgrade python-can and\n  Kvaser will work without any other changes.\n- **slcan error frames** - slcan firmware on most adapters silently drops error frames\n  before forwarding to the host. Bus error statistics will read 0% on slcan interfaces\n  even on a degraded bus. Use gs_usb (Candlelight) for accurate error visibility.\n- **Replay timing** - depends on the Python asyncio scheduler, not a wall clock.\n- **Browser support** - tested on Chrome. Firefox and Edge are best-effort.\n- **Mobile layout** - not a target for v1. Optimised for 1080p and above.\n\n---\n\n## Roadmap\n\n- [x] **v1** - Live frame table, DBC decode, filter, send, record, replay, pip install\n- [x] **v2** - Signal plotting, multi-signal overlay, threshold alerts, CLI mode,\n              bus health statistics, multi-frame transmit with timers\n- [ ] **v3** - CAN FD UI, J1939 decoder, OBD-II over raw CAN, UDS diagnostics,\n              CANopen (CiA 301 + CiA 402), reverse engineering toolkit, plugin API\n\nSee the [full project board](https:\u002F\u002Fgithub.com\u002Fusers\u002FChanchaldhiman\u002Fprojects\u002F1\u002Fviews\u002F1)\nfor live status.\n\n---\n\n## Troubleshooting\n\n**`No matching distribution found for canviz` on Ubuntu\u002FLinux**\nUse `pip3 install canviz` or `python3 -m pip install canviz`. CANviz requires Python 3.10+.\nUbuntu 20.04 ships Python 3.8 - upgrade to 22.04+ or install Python 3.10 separately.\n\n**Kvaser device fails to connect (`canIoCtl failed - Error in parameter`)**\nKnown bug in python-can 4.6.1, not a CANviz issue. Tracked at\n[python-can #2051](https:\u002F\u002Fgithub.com\u002Fhardbyte\u002Fpython-can\u002Fissues\u002F2051).\nUpgrade python-can once the issue is resolved and Kvaser will connect without any\nother changes.\n\n**PEAK PCAN-USB fails to connect**\nEnsure the [PEAK driver](https:\u002F\u002Fwww.peak-system.com\u002FDrivers.523.0.html) is installed.\nDevice Manager must show the device under **CAN-Hardware**, not as an unknown device.\n\n**Device shows a COM port on Windows**\nYour adapter is running slcan firmware, not Candlelight.\nUse: `canviz --interface slcan --channel COM3`\n\n---\n\n## Contributing\n\nCANviz is actively developed. **The most useful contribution right now is testing\nhardware we have not tried** - a CANable 2.0, anything on macOS, anything on a COM\nport. No code required. Open an issue and tell us what happened.\n\nBug reports, DBC files that decode incorrectly, and code contributions are all welcome.\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for how to get the dev environment running.\n\n---\n\n## Support\n\nCANviz is free and open source. If it saves you time or helps your project,\nconsider [sponsoring development on GitHub](https:\u002F\u002Fgithub.com\u002Fsponsors\u002FChanchaldhiman).\n\nEvery sponsorship directly funds hardware for testing new adapters and protocols.\n\n---\n\n## License\n\nMIT - see [LICENSE](LICENSE).","CANviz 是一个基于浏览器的开源 CAN 总线分析工具，支持低成本 USB 硬件。其核心功能包括自动检测 29 位扩展 ID 流量、CAN ID 分解、54 种 PGN 名称定义以及 99 个 SA 地址名称解析等，并且无需安装额外驱动或软件即可运行在本地浏览器中。该工具采用 TypeScript 编写，结合了 Python 的强大库支持，特别适用于嵌入式工程师调试 ECU、研究人员研究汽车协议及爱好者进行 CAN 项目开发等多种场景。此外，CANviz 还提供了 J1939 被动解码器等功能，增强了对卡车、农业和海洋网络的支持。",2,"2026-06-11 02:43:37","CREATED_QUERY"]