Open-source browser-based CAN bus analyzer
Project description
CANviz
Open-source, browser-based CAN bus analyzer.
Works with cheap (~$10) USB-C CAN modules. No GUI install. Just pip install and open a browser.
pip install canviz
canviz --interface gs_usb
# → browser opens at http://localhost:8080
What it does
CANviz is a web-based CAN bus analyzer that runs entirely in your browser. You plug in a USB CAN module, run one command, and get a live view of your CAN bus, no desktop app to install, no compiling from source.
v1 features:
- Live message table: ID, DLC, data bytes, frame count, rate (fps), last seen
- DBC file support: upload a
.dbcfile and see decoded signal values inline - Filter by message ID or signal name
- Send CAN frames manually from the UI
- Record sessions to
.ascand.csv - Replay recorded log files with speed control
- REST API + WebSocket - scriptable and automation-friendly
Hardware
Primary (plug and play on Windows):
Any CAN module running Candlelight firmware - including the FYSETC UCAN (STM32F072, ~$8).
These show up in Windows Device Manager as gs_usb / WinUSB - no COM port, no reflash needed.
Also supported:
- slcan devices (COM port) - CANable and others running slcan firmware
- SocketCAN - Linux, Raspberry Pi, WSL2
- PEAK PCAN-USB, Kvaser, Vector - via python-can config
- Virtual bus - for development and CI (no hardware needed)
Quick Start
Windows (Candlelight / gs_usb device)
pip install canviz
canviz
Auto-detects the connected gs_usb device. Browser opens at http://localhost:8080.
Windows (slcan / COM port device)
pip install canviz
canviz --interface slcan --channel COM3 --bitrate 500000
Raspberry Pi / Linux (SocketCAN)
# One-time setup
sudo ip link set can0 up type can bitrate 500000
pip install canviz
canviz --interface socketcan --channel can0
No hardware (virtual bus)
pip install canviz
canviz --interface virtual
Frames loop back on themselves. Useful for testing and development.
Interface Notes
| Interface | When to use | Windows | Linux |
|---|---|---|---|
gs_usb |
Candlelight firmware devices (default) | ✓ | ✓ |
slcan |
Devices that enumerate as a COM port | ✓ | ✓ |
socketcan |
Native SocketCAN | - | ✓ |
virtual |
No hardware, development/CI | ✓ | ✓ |
Candlelight vs slcan: If your device shows up as a COM port in Device Manager, use --interface slcan --channel COMx. If it shows as gs_usb / WinUSB with no COM port, use --interface gs_usb (the default).
CLI Reference
canviz [OPTIONS]
Options:
--interface gs_usb | slcan | socketcan | virtual (default: gs_usb)
--channel COM port or SocketCAN channel (e.g. COM3, can0)
--bitrate CAN bitrate in bps (default: 500000)
--host Host to bind to (default: 127.0.0.1)
--port Port to bind to (default: 8080)
API
The backend exposes a REST API and WebSocket. Useful for scripting and automation.
| Method | Path | Description |
|---|---|---|
| POST | /connect |
Open CAN interface |
| POST | /disconnect |
Close interface |
| GET | /status |
Connection state |
| POST | /send |
Transmit a frame |
| WS | /ws/frames |
Live frame stream (JSON) |
| POST | /dbc/load |
Upload DBC file |
| GET | /dbc/messages |
List decoded messages |
| DELETE | /dbc |
Unload DBC |
| POST | /log/start |
Start recording |
| POST | /log/stop |
Stop recording |
| GET | /log/download/{file} |
Download log file |
| POST | /replay/start |
Start log replay |
| POST | /replay/stop |
Stop replay |
Full interactive API docs available at http://localhost:8080/docs when running.
Known Limitations
- USB timestamp jitter ~1ms - not suitable for sub-millisecond timing analysis
- High bus loads (>5000 fps) may require server-side throttling (planned for a future release)
- Tested on Chrome; Firefox and Edge are best-effort
- CAN FD (>8 byte payloads) display support is planned for a future release
- Replay timing accuracy depends on the asyncio scheduler - not wall-clock perfect at high bus loads
Stack
Backend: Python 3.10+ · FastAPI · python-can · cantools · aiofiles
Frontend: React 18 · TanStack Table · Zustand · Vite
Supported OS: Windows 10/11 · Linux · Raspberry Pi OS · macOS (best-effort)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file canviz-0.1.2.tar.gz.
File metadata
- Download URL: canviz-0.1.2.tar.gz
- Upload date:
- Size: 102.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9c7f6a93d9d4f847a85d3cee99a03739a88c52f6b1c1ca2b2b7f70f63fe394f
|
|
| MD5 |
8c2bd73d68b54c48ba5e644dd09367aa
|
|
| BLAKE2b-256 |
318f1adbd3c563f842c415148bb875962bae64adbf060c293c4cc49a58a4c64c
|
File details
Details for the file canviz-0.1.2-py3-none-any.whl.
File metadata
- Download URL: canviz-0.1.2-py3-none-any.whl
- Upload date:
- Size: 103.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3ff70defa03f1f8fd18e950ca1d2bf93315152b86ab6551dd7ec8e38e381658
|
|
| MD5 |
2ba6554155fe0e85c57b950da0dea847
|
|
| BLAKE2b-256 |
adb56a721eeb6c4441733dbdfe45bc32bd6ebdc2164630ec1c30d4ba7b7f6afb
|