feat: add opt-in Linux BlueZ transport probe - #717
Open
enaboapps wants to merge 4 commits into
Open
Conversation
enaboapps
marked this pull request as ready for review
September 10, 2026 11:12
Greptile SummaryThe PR adds an opt-in Linux BlueZ transport probe for hardware investigation without integrating pairing or input into the desktop runtime.
Confidence Score: 5/5The PR appears safe to merge because the previously reported reconnect ownership failure is fixed and no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| tools/linux-ble-probe/src/probe.rs | Implements bounded BlueZ GATT probe handling and now clears closed notification ownership before admitting reconnects. |
| tools/linux-ble-probe/src/main.rs | Provides an explicit Linux-only serving command while keeping default and help invocation Bluetooth-free. |
| src-tauri/src/ble_wire.rs | Holds the extracted shared protocol framing, status serialization, and bounded frame reassembly. |
| src-tauri/src/protocol.rs | Re-exports the extracted wire implementation while retaining the desktop protocol engine. |
| .github/workflows/ci.yml | Adds formatting, linting, tests, help-command validation, and dependency auditing for the probe. |
| docs/linux-bluez-probe.md | Documents the probe’s limited scope, isolation caveats, operation, and uncompleted physical validation matrix. |
Sequence Diagram
sequenceDiagram
participant Peer as BLE peer
participant BlueZ as BlueZ/BlueR
participant Probe as Linux probe
Peer->>BlueZ: Subscribe to TX
BlueZ->>Probe: Notify writer event
Probe->>Probe: Clear closed prior session
Probe->>Probe: Admit peer ownership
loop Fixed diagnostic cadence
Probe->>BlueZ: Framed public diagnostic
BlueZ-->>Peer: Notification
end
Peer->>BlueZ: Disconnect or unsubscribe
BlueZ->>Probe: Writer closed
Probe->>Probe: Clear ownership and reassembly
Reviews (2): Last reviewed commit: "fix: clear closed notification ownership..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Standalone, ordinary-user BlueZ peripheral probe with Switchify service/characteristic UUIDs, offset-aware status reads, bounded framed writes and public-only notifications. No pairing tokens, input, app-runtime integration or Linux release claim. Reuses framing extracted unchanged from the desktop protocol and documents binding choice, peer-isolation uncertainty and the physical validation matrix.
Stack: #711 → #714 → #715 → this PR. Base is the preceding implementation branch as requested. Do not merge out of order or without authorization.
Closes #716 (probe tooling only, not completion of the hardware milestone).
Validation
773ffc9094ac302f65c286fdbbc89a661eb7ab3d: no remaining actionable findings. Fixed RX ownership reservation and closed-writer replacement ordering, with regression tests for rejected first frames, idle RX-only ownership, active notification ownership and reconnects without stale fragments.Boundaries and next gate
Android/two-adapter interoperability and notification isolation remain unqualified. With the user's supervision approval, the final-head probe was run as ordinary user
owenon Linux Mint 22.3 (Ubuntu noble base), kernel7.0.0-31-generic, BlueZ5.72-0ubuntu5.5, adapterhci0(USB ID8087:0aaa). GATT and advertising registration succeeded without root or radio power changes. The five-minute deadline stopped the process successfully. RX counters remained zero and no TX subscription was observed; phone-side discovery/connection has not been confirmed. This is registration/lifecycle evidence on one host, not completion of the physical test matrix in the checked-in checklist.After the process exited, BlueZ
LEAdvertisingManager1.ActiveInstanceswas zero, confirming advertisement cleanup. The tool does not contain the authentication engine or credential/input adapters. Only a fixed public diagnostic response can leave TX, so this increment does not depend on unproven subscriber secrecy.RX-only ownership expires after ten seconds without an accepted frame; active notification ownership persists until teardown. Rejected first frames cannot reserve a peer. Notification failure, unsubscribe, Ctrl-C, SIGTERM and the five-minute serving deadline clear owned session resources. No automatic radio/daemon recovery is implemented.
The hardware checklist was committed before the registration-only experiment above; the remaining physical tests are still unperformed. Secure pairing integration remains gated on that evidence.