Repository navigation
Description
The firmware should ensure the CAN bus is healthy at all time. For development purposes, there should be a way to control the CAN read-only mode. And on each boot, before sending any CAN messages, we need to make sure the car is the right one for the firmware. So each platform implementations need a way to detect what cars they are plugged into (VIN is probably a good way).
Remaining from the audit
Done on main: listen-only while read-only, bus-off restart, bounded TX, per-bus
TX queues.
- Configurable bitrate. Done in feat(can): configurable TWAI bitrate and a CAN-FD guard #48: TWAI buses take an optional
bitrate
in[[hardware.esp.can_buses]], and the vehicle crate declares the expected
bitrate per bus in itsCargo.tomlso xtask fails the build on a mismatch. - CAN-FD buses. Done in feat(can): configurable TWAI bitrate and a CAN-FD guard #48: a bus declared
fdnever leaves listen-only
mode. - Bus health in system state. Done in feat(can): report each bus's health to the app over BLE #115, feat(system): report the health of each CAN bus contracts#43 and
feat: show each CAN bus's health in the settings mobile-app#127:SystemState.can_bus_health(status,
frames per second, RX errors, overruns, bus-offs, listen-only) over BLE for
ESP TWAI and PC buses, shown in the app's settings. Follow-ups: MCP2515
buses (Report MCP2515 CAN bus health #116) and counting TWAI bus errors (ESP TWAI never counts RX bus errors, so a wrong bitrate looks silent #117). - Dev control of read-only mode: when added, BLE + debug builds only,
never MQTT. Done in feat(can): gate read-write mode on car identity, owner approval and a dev lock #76 as the dev write lock, within the read-write policy
from Decide when CAN read-only is turned off, and who can do it #72: development builds only (--productionremoves it), BLE from a
bonded phone only, never MQTT, locked at every boot.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 6 sub-issues
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(system): report the health of each CAN bus (#43)
feat(can): report each bus's health to the app over BLE (#115)