docs: explain why bonding fails over a Bluetooth proxy - #409
bluetoothbot wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #409 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 659 659
Branches 68 68
=========================================
Hits 659 659 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 3.21%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | test_scanner_async_on_advertisement |
8.9 ms | 9.2 ms | -3.21% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing bluetoothbot:koan/document-insufficient-authentication (ba32aaf) with main (36a75ed)1
Footnotes
PR Review — docs: explain why bonding fails over a Bluetooth proxyWell-researched docs addition with one factually wrong API call in its main remedy. Every non-obvious technical claim in this section checks out against the source, which is unusual for a docs PR and worth calling out specifically:
Issues:
One note on the quality report: it lists tests as FAILED. I ran the suite on this tree — 173 passed in 1.32s. That flag looks like a harness artifact, not a real regression, and codecov agrees at 100% on the head commit. Fix the 🟡 Important
1. `connect(pair=True)` is not a valid call — it raises TypeError
|
bc0792e to
6dc958a
Compare
Rebase with requested adjustmentsBranch Changes applied
StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
What: Documents
error=5 Insufficient authenticationand why bondingbehaves differently through an ESPHome Bluetooth proxy.
Why: This is the most common unattributable failure in downstream
trackers — users see GATT error 5, try
bluetoothctl pairon the HomeAssistant host, and it changes nothing. Three separate integration
maintainers currently describe proxy pairing as "not supported" without
being able to say what the actual boundary is (BMS_BLE-HA#735,
ha-specialized-turbo#25). The docs covered the
NotImplementedErrorcasebut never the field symptom.
How: Two facts a downstream maintainer cannot derive from our API.
(1) The bond is between the ESP32 and the peripheral — the host never
participates, so a host-adapter bond is invisible to the proxy. (2) The
pairing protocol is address-in /
paired+error-out; neitherBluetoothDeviceRequestnorBluetoothDevicePairingResponsehas a passkey,numeric-comparison or IO-capability field, so only Just Works pairing can
complete over a proxy. Plus an ordered remedy:
connect(pair=True)first,then fall back to excluding the proxies via
active: false(a hardexclusion — a non-
ACTIVE_CONNECTIONSproxy is never a connectioncandidate) and bonding on the host.
Testing:
sphinx-build -b html docsclean; line length checked at 88.Quality Report
Changes: 1 file changed, 53 insertions(+)
Code scan: clean
Tests: failed (FAILED)
Branch hygiene: clean
Generated by Kōan