Skip to content

Recover Bluetooth transport after controller loss - #6

Merged
dmytrogajewski merged 1 commit into
masterfrom
fix/bluetooth-transport-recovery
Nov 7, 2026
Merged

dmytrogajewski merged 1 commit into
masterfrom
fix/bluetooth-transport-recovery

Conversation

@dmytrogajewski

@dmytrogajewski dmytrogajewski commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

A removed controller left the daemon serving RPC and logging failed advertisement rotations indefinitely. Detect controller removal and lost advertising, invalidate transport readiness, and exit so the managed service rebuilds GATT and rotating advertising on the available controller. Keep retrying while the controller is absent and reload the existing bond on recovery.

Expose optional daemon.transport_ready in Status RPC and CLI JSON, independently of RPC liveness and phone presence. Ordinary unanswered approvals do not trigger recovery. The panel consumer is dmytrogajewski/sy#9.

Validation: make lint and make test pass in the isolated PR worktree (460 passing results, zero failures, 10 ignored). A private D-Bus integration test drives the real daemon through hci0 removal, failure exit, and relaunch on hci1, checking bond hydration and unchanged bond/key bytes. Native RPM build and package verification pass. The installed daemon advertised, the phone resubscribed, and a fresh sudo challenge succeeded through phone approval in 2.135 seconds; all seven bond/key files retained their original contents, ownership, and modes.

All applicable GitHub CI checks pass for commit 82f9b01, including lint, workspace tests, release build, and documentation: https://github.com/Mewplane/syauth/actions/runs/42307576078

@dmytrogajewski
dmytrogajewski merged commit 4818a48 into master Nov 7, 2026
10 checks passed
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.

2 participants