Decide when CAN read-only is turned off, and who can do it

已关闭
#72 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
embedded-iot

调研方向

Start with docs/can.md and the existing set_can_read_only(false) behavior; the issue also points to identity check #49, logger #44, and debug toggle #12. Compare the listed unlock and relock policies, including the constraint that MQTT cannot unlock the bus, and check the TWAI mode-switching cost. Done means the policy is documented, implemented with tests for relock conditions and MQTT, and defines the debug toggle.

由索引模型根据 Issue 内容生成。

描述

enhancement

Part of the prerequisites for real commands (tracking issue to follow). Related: #12.

Problem

Every command issue says "only send while read-only is off and the car identity check passes". The identity gate exists (#49) and the SavvyCAN logger forces read-only (#44), but nothing calls set_can_read_only(false) and no document says when that should happen, who may trigger it, or when the bus locks again. Each command would otherwise invent its own answer.

Options

  • Automatic. The bus unlocks once the identity is confirmed (and, say, a bonded phone is connected). Simple, but the car is controllable with no deliberate action from the owner.
  • Explicit. A system command from a bonded phone (BLE only, never MQTT) turns control on. Off at every boot, and it locks again after a timeout, on disconnect or on a bus fault. Needs a contracts message and app UI.
  • Per command. The bus leaves listen-only only while a command is being sent. The ESP driver rebuilds the TWAI controller when the mode changes (see docs/can.md), so check what that costs and what it does to the bus before considering this.
  • Development only. A BLE toggle in debug builds (the item in #12 and contracts#21), regardless of the choice above.

Questions

  • What locks the bus again: phone disconnect, car asleep, bus-off, a logger session, a timeout?
  • What does the app show (read-only or control enabled), and which contracts field carries it?
  • Is switching between listen-only and normal mode repeatedly safe on a real car?
  • MQTT must never unlock the bus, whatever is chosen.

Done when

The policy is written in docs/can.md, implemented with tests (including the relock conditions and that MQTT can't unlock), and the debug toggle from #12 is defined within it.

主要语言
Rust
星标
1
派生
0
平均合并
12 小时 36 分钟
30 天内合并 PR
28

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenCarControls/firmware 的其他 Issue

查看 OpenCarControls/firmware 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。