Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

BLE: send the current state when the app subscribes

オープン
#58 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Tichael がすでに取り組んでいます。

2026年10月23日 から。

  • #65 @Tichael による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
rust
領域
embedded-iot

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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 notify sends nothing to a peer that hasn't subscribed and returns Ok (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.

主要言語
Rust
スター
1
フォーク
0
平均マージ
10時間 56分
マージ済み PR(30日)
15

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenCarControls/firmware のほかの issue

OpenCarControls/firmware の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。