cargo-deb metadata produces a .deb with the binary, the packaged user unit variant, man page and example config; arm64 cross-builds as a static musl binary via an isolated rustup and rust-lld (recipe in README). Add MIT LICENSE for the package copyright.
Proximity Beacon (companion Android app)
A minimal beacon app that replaces third-party iBeacon apps. It exists to
fix the two phone-side reliability problems documented in
docs/HANDOFF.md and AGENTS.md:
- BlueZ dedupes identical RSSI values, so a stationary phone goes
silent in the desktop's event stream. This app rotates the advertised
ServiceDatacounter every 10 s (AdvertisingSet.setAdvertisingData), which makes BlueZ emitPropertiesChangedeven when the RSSI repeats. The desktop daemon treats anyDevice1property update as a sighting. - Beacon apps get frozen by Android doze / battery optimization,
pausing advertising for stretches. This app advertises from a
foreground service (
connectedDevicetype) with a persistent notification, and offers a one-tap battery-optimization exemption.
The advertisement is legacy, connectable and scannable at ~1 Hz
(INTERVAL_HIGH): connectable so the desktop's pre-lock connect probe
can attach, ~1 Hz to match the daemon's duty-cycle assumptions.
Payload: 16-bit service UUID 0xFCA7 (unassigned) + 8-byte rotating
counter. No stable identifier — privacy comes from the phone's rotating
private address, which only the bonded desktop can resolve.
Build
Requires JDK 17+ (Android Studio's bundled JDK works):
cd android
./gradlew assembleDebug
# -> app/build/outputs/apk/debug/app-debug.apk
Release builds are signed when keystore.properties (gitignored, see
AGENTS.md) exists; otherwise they come out unsigned:
./gradlew assembleRelease
# -> app/build/outputs/apk/release/btle-proximity-beacon-release.apk
Install: adb install app/build/outputs/apk/debug/app-debug.apk, or copy
the APK to the phone and open it.
Use
- Open "Proximity Beacon", grant the advertising/notification prompts.
- Tap "Exempt from battery optimization" (the point of the app).
- Tap "Start beacon"; keep the notification. Point the daemon's
device_macat this phone as before.
If the beacon is running, the desktop journal should show sightings every
few seconds even when the phone lies still — watch with
journalctl --user -u btle-proximity -f while testing.