PC board: an unreachable MQTT broker blocks the whole firmware
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- embedded-iot
调研方向
Start with boards/pc/src/network.rs and trace mqtt_driver_task and how the PC board runs tasks on its Embassy executor. Compare its connection path with the other stream code that uses Embassy timers. Done means an unreachable broker no longer blocks the BLE HTTP server, CAN, or vehicle tasks while MQTT retries; the issue does not name specific tests.
由索引模型根据 Issue 内容生成。
描述
Problem
mqtt_driver_task on the PC board (boards/pc/src/network.rs) opens the broker connection with a blocking std::net::TcpStream::connect. The PC board runs every task on one Embassy executor thread, so while that connect waits, nothing else runs: no BLE test HTTP server, no CAN, no vehicle tasks, no state publishing.
A refused connection returns at once, so a local broker that is down is fine. An address that doesn't answer (a host that is off or not on the network) leaves the connect waiting for the OS TCP timeout, more than a minute on Linux. Then the 5 s retry starts it again, so the firmware is blocked almost all the time.
This hits anyone running the PC board straight from config.toml.example: its broker_url is mqtt://192.168.0.100:1883, which usually doesn't answer. The log stops at MQTT: connecting to 192.168.0.100:1883 and the BLE HTTP mock on port 4242 refuses connections. Found while testing #74 end to end on virtual-car; pointing broker_url at a closed local port (mqtt://127.0.0.1:1) works around it.
Proposal
- Connect without blocking the executor: a non-blocking socket polled with Embassy timers (like the rest of the stream), or the connect on a separate thread with the result handed back.
- Bound the connect with a timeout (a few seconds), then retry as today.
- Optionally make the example config's broker one that fails fast, or document that the PC board needs a reachable broker or a closed local port.
Done when
With an unreachable broker, the PC board's BLE HTTP server, CAN and vehicle tasks keep working while MQTT retries.
- 主要语言
- Rust
- 星标
- 1
- 派生
- 0
- 平均合并
- 13 小时 27 分钟
- 30 天内合并 PR
- 31
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenCarControls/firmware 的其他 Issue
-
e-gmp enhancement
难度 5/5 一周以上 新手友好度 25/100
OpenCarControls/firmware#92 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 12/100
OpenCarControls/firmware#86 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 15/100
OpenCarControls/firmware#85 ·
维护者通常 1 天内回复
-
e-gmp enhancement
难度 5/5 一周以上 新手友好度 25/100
OpenCarControls/firmware#75 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 51/100
OpenCarControls/firmware#68 ·
维护者通常 1 天内回复
查看 OpenCarControls/firmware 的全部 Issue
相似的 Issue
-
binding:python bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 78/100
coollabsio/orbit#72 ·
维护者通常 1 天内回复
-
Synth suite fails unless run from the repo root: signal_flow's default machine path is cwd-relative未关闭bug
难度 2/5 1-3 小时 新手友好度 80/100
Nimblesite/osprey#370 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
-
bug order-flow studies ui
难度 2/5 1-3 小时 新手友好度 88/100
userFRM/egui-charts#2417 ·
维护者通常 1 天内回复