How quantyle/can-shark works
CAN-Shark is a vehicle CAN-bus monitoring/injection project: its documented use is a Python serial client with Arduino firmware and either a Sparkfun or Seeed CAN shield. The sampled web UI sends PID requests over a local WebSocket and renders returned values as a table. The Python client, firmware sketch, and full server/protocol wiring were not sampled, so those runtime links are shown only where documentation supports them; UI source does not establish the server implementation.
Main entry points: Home.jsx CAN dashboard · mcp2515.c MCP2515 SPI driver · CAN_Shark.ino CAN firmware · mcp2515.h MCP2515 interface
Components 20
Browser dashboard
- CAN dashboard
can-shark/src/views/home/Home.jsx - View routing
can-shark/src/routes/routes.jsx - App container
can-shark/src/containers/App.jsx - Route loading
can-shark/src/components/loading/Loading.jsx - UI styles
can-shark/src/variables/styles/homeStyle.jsx
Host communication
- Python serial client
can.py - WebSocket endpoint
Arduino firmware
- CAN firmware
firmware/CAN_Shark.ino
Shield drivers
- Seeed CAN API
firmware/src/Seeed_Shield_Custom/mcp_can.h - Seeed CAN driver
firmware/src/Seeed_Shield_Custom/mcp_can.cpp - Seeed controller definitions
firmware/src/Seeed_Shield_Custom/mcp_can_dfs.h - Sparkfun CAN API
firmware/src/Sparkfun_Shield_Custom/Canbus.h - Sparkfun CAN driver
firmware/src/Sparkfun_Shield_Custom/Canbus.cpp - MCP2515 SPI driver
firmware/src/Sparkfun_Shield_Custom/mcp2515.c - MCP2515 interface
firmware/src/Sparkfun_Shield_Custom/mcp2515.h - MCP2515 definitions
firmware/src/Sparkfun_Shield_Custom/mcp2515_defs.h - GPIO mapping
firmware/src/Sparkfun_Shield_Custom/global.h - Shield pin defaults
firmware/src/Sparkfun_Shield_Custom/defaults.h
Other components
- Vehicle operator
- Toyota Prius CAN bus
Connections 22
- Vehicle operator → CAN dashboard: uses
README.md - App container → View routing: renders routes
can-shark/src/containers/App.jsx - View routing → CAN dashboard: loads view
can-shark/src/routes/routes.jsx - View routing → Route loading: shows while loading
can-shark/src/routes/routes.jsx - CAN dashboard → UI styles: uses styles
can-shark/src/views/home/Home.jsx - CAN dashboard → WebSocket endpoint: sends PID requests
can-shark/src/views/home/Home.jsx - WebSocket endpoint → CAN dashboard: returns readings
- Python serial client → WebSocket endpoint: serves connection
- Python serial client → CAN firmware: communicates serially
README.md - CAN firmware → Seeed CAN API: uses driver
- CAN firmware → Sparkfun CAN API: uses driver
- Seeed CAN driver → Seeed CAN API: implements API
firmware/src/Seeed_Shield_Custom/mcp_can.cpp - Seeed CAN API → Seeed controller definitions: uses definitions
firmware/src/Seeed_Shield_Custom/mcp_can.h - Sparkfun CAN driver → Sparkfun CAN API: implements API
firmware/src/Sparkfun_Shield_Custom/Canbus.cpp - Sparkfun CAN driver → MCP2515 interface: calls controller
firmware/src/Sparkfun_Shield_Custom/Canbus.cpp - MCP2515 SPI driver → MCP2515 interface: implements interface
firmware/src/Sparkfun_Shield_Custom/mcp2515.c - MCP2515 SPI driver → MCP2515 definitions: uses definitions
firmware/src/Sparkfun_Shield_Custom/mcp2515.c - MCP2515 SPI driver → GPIO mapping: uses GPIO macros
firmware/src/Sparkfun_Shield_Custom/mcp2515.c - MCP2515 SPI driver → Shield pin defaults: uses pin mapping
firmware/src/Sparkfun_Shield_Custom/mcp2515.c - MCP2515 interface → MCP2515 definitions: uses definitions
firmware/src/Sparkfun_Shield_Custom/mcp2515.h - MCP2515 interface → GPIO mapping: uses GPIO macros
firmware/src/Sparkfun_Shield_Custom/mcp2515.h - CAN firmware → Toyota Prius CAN bus: reads and injects CAN
README.md