Skip to content

fix(daemon): remember last connected device — empty device_address is no longer fatal#174

Merged
quad341 merged 1 commit into
mainfrom
fix/settings-device-wipe
Jul 5, 2026
Merged

fix(daemon): remember last connected device — empty device_address is no longer fatal#174
quad341 merged 1 commit into
mainfrom
fix/settings-device-wipe

Conversation

@quad341

@quad341 quad341 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Root cause of the 18-hour phone-bridge outage (and the 'AEC stopped working' reports — calls had no managed audio path at all): the GUI's 'Auto-discover (recommended)' picker choice persists device_address="", and oFono auto-discovery only works while the phone is already connected. After any disconnect: no address → can't proactively connect the phone → no modem → discovery finds nothing → retry '' forever. Overnight restart storms re-read the wiped INI each time.

Fix — a one-way ratchet: TincanService.Connect persists bluetooth/last_device_address on every successful session; _resolve_device_address falls back to it when explicit config is empty and discovery fails. Auto-discover keeps its semantics (fresh discovery still wins when the phone is connected) — it just can't strand the daemon anymore.

Suite green (2,416). Machine already recovered by hand (INI restored, reconnected); this makes the recovery automatic next time.

🤖 Generated with Claude Code

… no longer fatal (tincan-97mlk)

Root cause of the 2026-07-04→05 outage (18h with no phone bridge, calls
without AEC): the GUI's device picker persists device_address="" for
its 'Auto-discover (recommended)' choice — but oFono auto-discovery only
works while the phone is ALREADY connected. After any disconnect that's
a chicken-and-egg trap: no address → cannot proactively connect the
phone → no HFP modem → discovery finds nothing → daemon retries ''
forever. Restart storms re-read the wiped INI each time.

- TincanService.Connect now persists bluetooth/last_device_address on
  every successful session (skip-if-unchanged; best-effort)
- _resolve_device_address gains step 5: fall back to that last-known
  address when explicit config is empty and discovery fails
- Auto-discover keeps its semantics (fresh discovery still wins when the
  phone is connected); it just can't strand the daemon anymore

Co-Authored-By: Claude Fable 5 <[email protected]>
@quad341
quad341 merged commit c892a19 into main Jul 5, 2026
1 check passed
@quad341
quad341 deleted the fix/settings-device-wipe branch July 5, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant