Repository navigation
fix: explain on Linux why phones ask to pair when Bluetooth experimental mode is on - #101
Conversation
49f6df8 to
ad8cb21
Compare
|
Thanks for tracking this down. The WiFi drop itself is why the BLE receiver exists (docs/ble-receiver-discovery.md), so please link that doc from section C rather than describing it as new. The part I didn't have is that it's a same-band check and a phone on 2.4 or 6 GHz keeps its WiFi, which is worth keeping in C. Before going further with the code: was If it is If the detector stays: please drop the tray notification and keep just the side menu hint and the log warning, and wrap the For a change this size, please open an issue first next time so we can agree on the approach before you write it. |
With Experimental on, BlueZ's LE Audio `mcp` client reads a phone's Media Player Name when it connects to read our receiver advertisement, gets Insufficient Authentication and asks to pair. The phone declines, drops the link and retries, and with its WiFi dropped by the send sheet it never finds us. A btmon capture confirmed it, and `bluetoothd -P mcp` stopped it. The advertisement monitor only registers with experimental mode, so the core publishes that as a watch and the side menu shows one dismissible note. KNOWN_ISSUES.md gains C (the WiFi drop) and D (this), and ble-nearby-alert.md no longer calls declining the request harmless. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Experimental was on, and i verified, it is So I've replaced the detector with the smaller check you described. The core publishes whether the advertisement monitor registered, and the side menu shows one dismissible note when it did. Since the monitor only runs with nearby alerts on, the note can't show when alerts are off. I think that's fine, but say if you'd rather check another way. The Docs:
Noted on opening an issue first for big fixes next time! |
8d0592c to
5204316
Compare
|
Thanks, this is what I was after. Checking only when the nearby alert runs is fine, since alerts are on by default. Merging. |

Summary
On a Pixel with AirDrop compatibility, the Quick Share send sheet drops the phone's WiFi when it's on 5 GHz, so the BLE receiver advertisement is the only way it can find us. On Linux with
Experimental = true, BlueZ's LE Audio clientmcpthen asks the phone to pair, and the phone never lists us:The advertisement monitor only registers when Experimental is on, so the app now uses that to show one dismissible note:
get_bluez_experimentalcovers a window that opens after the event. Itsinvokeis in a try/catch, so a failure can't skip the rest of the mount.bluez_experimental_note_dismissedin the settings store, so it holds across closing to the tray and restarts.KNOWN_ISSUES.mdgains C (the WiFi drop, linking ble-receiver-discovery.md) and D (this, with-P mcpfirst, then pairing once, thenClient = false).Limits: the note can't show with nearby alerts off, since the monitor only runs then. It also keeps showing after
-P mcpis applied, because nothing on D-Bus says the plugin is off, so "Got it" is the way out.Evidence
btmonon BlueZ 5.85 with a Pixel 11 Pro, unpaired, WiFi off:mcploaded): read of 0x2b93, Insufficient Authentication, Security Request on every retry. The phone showed a pairing prompt and never listed us.After (
bluetoothd -P mcp): 0x2b93 shows up in discovery but nothing reads it. No prompt, and the phone listed us.The app built from this branch, against the real bluetoothd:
RegisterMonitor ... doesn't exist, continuous scan)The last row comes from an existing bug: after a bluetoothd restart, the BLE listener logs
waiting for Bluetooth to turn onand never resumes. That happens on master too and isn't changed here.cargo fmt --check,cargo clippy --workspace --all-features --all-targets -D warnings,cargo test --workspace --all-features,pnpm lint,pnpm ts-checkandpnpm vitest runpass on Linux.Merge danger
Door: two-way. One new settings key, nothing migrated.
Blast radius: small. A note in the Linux side menu and docs. Windows only compiles the command, which returns false.
🤖 Generated with Claude Code