How meatpihq/wican-fw works
WiCAN is embedded firmware for vehicle OBD-II/CAN access over Wi-Fi, BLE and USB/serial, with vehicle-data reporting and diagnostic protocols. The main workflow initializes device services, receives or transmits CAN frames, and dispatches host traffic according to the configured protocol; AutoPID and MQTT provide vehicle-data reporting. The README also documents web setup, Home Assistant webhooks, sleep behavior and diagnostic interfaces. Several implementation files were not sampled, so uncertain subsystem links are omitted; documented capabilities may be represented at their existing source path without implying inspected internals.
Main entry points: main.c Firmware runtime · autopid.c AutoPID profiles · can.c CAN driver · mqtt.c MQTT reporting
Components 23
Device services
- Firmware runtime
main/main.c - Setup and HTTP API
main/config_server.c - Wi-Fi network
main/wifi_network.c - Sleep and wake
main/sleep_mode.c
Vehicle data
- CAN driver
main/can.c - AutoPID profiles
main/autopid.c - Expression evaluator
main/expression_parser.c
Host interfaces
- Bluetooth LE
main/ble.c - TCP/UDP server
main/comm_server.c - slcan protocol
main/slcan.c - ELM327 adapter
main/elm327.c - RealDash protocol
main/realdash.c - GVRET / SavvyCAN
main/gvret.c - FTP access
main/ftp.c
Reporting and storage
- MQTT reporting
main/mqtt.c - Home Assistant webhooks
components/ha_webhooks/ha_webhooks_http.c - Webhook configuration
components/ha_webhooks/ha_webhooks_config.c - Filesystem
components/filesystem/filesystem.c
Other components
- Vehicle CAN bus
- Device user
- MQTT broker
- Home Assistant
- Diagnostic apps
Connections 24
- Vehicle CAN bus → CAN driver: CAN frames
README.md - Firmware runtime → Setup and HTTP API: reads settings
main/main.c - Firmware runtime → CAN driver: configures and receives
main/main.c - Firmware runtime → TCP/UDP server: starts server
main/main.c - Firmware runtime → Bluetooth LE: starts BLE
main/main.c - Firmware runtime → Wi-Fi network: starts networking
main/main.c - Firmware runtime → Sleep and wake: initializes sleep
main/main.c - Firmware runtime → MQTT reporting: initializes reporting
main/main.c - Firmware runtime → slcan protocol: dispatches traffic
main/main.c - Firmware runtime → RealDash protocol: parses traffic
main/main.c - Firmware runtime → GVRET / SavvyCAN: dispatches traffic
main/main.c - Firmware runtime → ELM327 adapter: dispatches commands
main/main.c - Firmware runtime → AutoPID profiles: initializes polling
main/main.c - AutoPID profiles → Expression evaluator: evaluates formulas
main/autopid.c - AutoPID profiles → MQTT reporting: publishes values
main/autopid.c - AutoPID profiles → Webhook configuration: updates status
main/autopid.c - Home Assistant webhooks → Webhook configuration: manages settings
- Webhook configuration → Filesystem: persists config
components/ha_webhooks/ha_webhooks_config.c - CAN driver → AutoPID profiles: supplies vehicle data
- MQTT reporting → MQTT broker: publishes messages
README.md - Home Assistant webhooks → Home Assistant: posts events
README.md - Diagnostic apps → TCP/UDP server: connects over Wi-Fi
README.md - Device user → Setup and HTTP API: configures device
README.md - Device user → FTP access: accesses files
README.md