BLE: send the current state when the app subscribes
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #65 của @Tichael — đã merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust
- Lĩnh vực
- embedded-iot
Hướng nghiên cứu
Read the CCCD write handling for the device→app characteristic and trouble-host's attribute.rs, especially should_notify, to understand why notifications are dropped before subscription. Trace how the current basic and advanced state is sent, then check the WiCAN virtual-car pairing and reconnect flows described in the issue. Done means both flows receive the full state immediately after notifications are enabled; linked pull request #65 is already open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The first state update after a BLE connection is usually lost:
- The firmware holds state updates until the link is encrypted, then sends the held one right away.
- The app subscribes to the device→app characteristic only after that (the pairing wizard subscribes once its bond-probe write succeeds; the dashboard transport subscribes after connecting).
- trouble-host's
notifysends nothing to a peer that hasn't subscribed and returnsOk(attribute.rs,should_notify), so the update is dropped silently.
The app then waits for the next periodic update (every 5 s on the virtual car; on E-GMP it depends on CAN traffic). The pairing wizard waits only a limited time for that first message, so pairing could time out even though the bond was made. That happened while testing #52 and OpenCarControls/mobile-app#41. The 500 ms sleep after encryption, which #52 removes (#28), used to hide this race most of the time.
OpenCarControls/mobile-app#41 makes the wizard wait 15 s as a safety margin; this issue is the actual fix.
Proposal
When the app writes the CCCD of the device→app characteristic to enable notifications, send the current full state (basic + advanced) to that connection. Pairing then gets its first message straight away, and the dashboard shows data at once on every reconnect.
Testing
On the WiCAN with the virtual car: pair from the app and check the wizard finishes within a second of the bond; reconnect and check the dashboard fills straight away.
- Ngôn ngữ chính
- Rust
- Star
- 1
- Fork
- 0
- Merge trung bình
- 11 giờ 26 phút
- Pull request đã merge (30 ngày)
- 18
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
-
Độ 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
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
OpenCarControls/firmware#55 ·
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 35/100
OpenCarControls/firmware#54 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
First-setup pairing window is too short and stays open after the first bondCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
OpenCarControls/firmware#53 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
OpenCarControls/firmware#51 ·
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ự
-
checkpoint/verify/rebuild_indexes on a thread holding a WriteTransaction deadlock instead of INT-001Đang mởbug known-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
project-minigraf/minigraf#734 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug CLI documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
openai/codex#56630 · 3 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
DayuanJiang/PecoFence#139 ·
Maintainer thường phản hồi trong vòng 1 ngày