Skip to content

General: Help fix devices that connect but show no data#607

Merged
d4rken merged 2 commits into
mainfrom
worktree-issue-603-troubleshooter
Jun 8, 2026
Merged

General: Help fix devices that connect but show no data#607
d4rken merged 2 commits into
mainfrom
worktree-issue-603-troubleshooter

Conversation

@d4rken

@d4rken d4rken commented Jun 7, 2026

Copy link
Copy Markdown
Member

What changed

When your headphones are connected (you hear audio) but CAPod's dashboard shows no connection, your phone's Bluetooth stack is usually dropping the broadcasts CAPod relies on — common on some Xiaomi/HyperOS ROMs (#603). Two improvements:

  • The dashboard now shows a hint pointing to the Troubleshooter in exactly that situation, instead of leaving it buried in Settings → Support.
  • The Troubleshooter now applies the minimal compatibility tweak that makes reception work, and only changes your settings when it actually succeeds — no leftover options toggled on, and nothing changed after a failed or cancelled run.

Technical Context

  • Probing now goes through a transient in-memory override on BlePodMonitor instead of writing the three compat settings on every attempt; only the winning combo is persisted, and only on terminal success. Failure/cancellation clears the override, restoring untouched settings.
  • Combos are tried fewest-disables-first, so a phone that only needs batching disabled isn't also left with filtering disabled (ongoing CPU cost).
  • Each probe clears the device cache and counts only observations past a settle cutoff, so a prior combo's cached devices (kept ~20s) can't be mistaken for the current one working. "Found" checks require a fresh live BLE observation, not cached/AAP state — so it can't exit early with "nothing to troubleshoot" for the devices that need it.
  • The dashboard hint is debounced ~15s and suppressed whenever any pod is live, so it never flashes during connect→first-broadcast and never claims "no data" while data is arriving.
  • Known limitation: during the ~1.5s scanner-restart window a lingering old-combo case-context frame can still mask a fresh non-case one via preferCaseContextPod — a rare, self-correcting false-negative left as-is to avoid touching shared monitoring behavior.
  • Scope: addresses the discoverability/robustness half of BLE broadcasts only received during pairing on Xiaomi Redmi Note 13 5G  #603. The separate "device shows twice when hardware batching is off" duplicate needs a verbose repro log and is not in this PR — hence Refs, not Closes.

Review checklist

  • In-memory override always cleared on every exit path (success, failure, cancellation, persist-throw)
  • Only the minimal winning combo is persisted, only on terminal success
  • collectFreshDevices() doesn't discard observations on timeout
  • Dashboard hint stays hidden while any pod is live and during the debounce window

Refs #603

d4rken added 2 commits June 7, 2026 14:42
Probe compatibility options through a transient in-memory override on BlePodMonitor instead of writing the user's persisted settings on every attempt. Only the winning combo is persisted, and only on success; failure or cancellation clears the override, restoring the user's original settings. Combos are tried fewest-disables-first so a phone that only needs batching disabled isn't left with filtering disabled too. Per-attempt cache clearing plus a freshness cutoff stop a previous combo's cached devices from satisfying the next one, and the 'found' checks now require a fresh live BLE observation rather than cached/AAP state.
…no data

Adds a dashboard hint card pointing at the existing Troubleshooter when a profile is connected to the system (audio) but CAPod is receiving no live data — the symptom of a phone dropping AirPods BLE broadcasts (e.g. some HyperOS devices, #603). Debounced ~15s so it doesn't flash during the gap between an audio connection and the first broadcast, and suppressed whenever any pod is live so it never claims 'no data' while data is visibly arriving.
@d4rken d4rken added enhancement Add a new feature of improve an existing feature coms/BLE Uses Apple's Proximity Payloads, based on BLE broadcasted advertisements. labels Jun 7, 2026
@d4rken d4rken merged commit 81e2bc1 into main Jun 8, 2026
11 checks passed
@d4rken d4rken deleted the worktree-issue-603-troubleshooter branch June 8, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coms/BLE Uses Apple's Proximity Payloads, based on BLE broadcasted advertisements. enhancement Add a new feature of improve an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant