PC board: an unreachable MQTT broker blocks the whole firmware
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- embedded-iot
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 1
- Fork
- 0
- Merge trung bình
- 13 giờ 27 phút
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenCarControls/firmware
-
E-GMP: phone validation methodsĐang mởe-gmp enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
OpenCarControls/firmware#92 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
OpenCarControls/firmware#86 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
OpenCarControls/firmware#85 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
e-gmp enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
OpenCarControls/firmware#75 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 51/100
OpenCarControls/firmware#68 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của OpenCarControls/firmware
Issue tương tự
-
[cosmic-applet-battery] Division by zero displays NaN% when UPower reports max_brightness = 0Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
pop-os/cosmic-applets#1619 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
binding:python bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coollabsio/orbit#72 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
swc_common: Mark::least_ancestor never returns when the answer is the root mark (ANT-2026-JYDQGGRT)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
swc-project/swc-ai-issues#137 ·
-
Synth suite fails unless run from the repo root: signal_flow's default machine path is cwd-relativeĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Nimblesite/osprey#370 ·
Maintainer thường phản hồi trong vòng 1 ngày