Fix probe reliability and restore sane missing_after

Two false locks with the phone present: missing_after=30 sat below the
realistic worst-case event gap (beacon counter rotation every 10s times
2-20% duty sampling, with frozen-RSSI dedupe collapsing catches inside
one window), and the connect probe ran while our own discovery
duty-cycling was active, where attempts stall or abort with
le-connection-abort-by-local.

Probe now stops discovery first and retries (2x6s); sample config and
handoff document the sampling math. Local config additionally raises
rssi_lock to -85, where nearby-phone readings were pinning.
This commit is contained in:
Bastian Mäuser committed 2026-11-06 12:17:47 +01:00
1 parent 38087583cf
commit dcf403200a
4 files changed
+105 -44

No files matched your search

+9 -2
View File
@@ -66,9 +66,16 @@ rearms monitoring. See README.md for the full design.
during a pause the phone is both undetectable and unconnectable.
- `DuplicateData = true` in the discovery filter does not bypass the
RSSI dedupe at the `Device1` property level.
- **Sampling math**: the beacon rotates its counter every 10 s, but the
daemon only hears it a fraction of the time (2-20% duty), and frozen
RSSI dedupes catches within one rotation window — event gaps of
25-60 s are routine. `missing_after_secs` must be well above that
(30 s false-locked twice; 60 s is the sane floor).
- `Device1.Connect` is the only reliable "is it actually there" oracle,
and it works whenever the phone advertises. Scan-based checks cannot
distinguish "silent but present" from "gone".
and it works whenever the phone advertises — but connection attempts
stall or abort (`le-connection-abort-by-local`) while our own
discovery duty-cycling is active. Stop discovery before probing and
retry; do not run a single long attempt under scan contention.
- The long-term fix for all of the above is the AdvertisementMonitor
roadmap (controller-offloaded patterns, BlueZ ≥ 5.65 + Experimental).