Keep live BlueZ discovery client alive for real scans

The previous Bluetooth fix only proved parser behavior with a synthetic stream. Real BlueZ discovery needs one interactive client to stay alive while unpaired Device1 objects exist. Add a bluetoothctl wrapper and bananarchy-bt-scan.sh PTY session that powers on, sets auto/duplicate-data filters, queries devices during discovery, and stops discovery cleanly. Add util-linux-misc, host test, docs and rebuild guards. Deployed to the live phone; a physical peripheral in pairing mode is still needed for final confirmation.
This commit is contained in:
Luxferre committed 2026-11-10 16:04:14 +02:00
1 parent f892531df6
commit 77127c7844
10 files changed
+232 -4

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
# Route bluetoothctl discovery through one live interactive BlueZ client.
# All other bluetoothctl calls go to the real package binary unchanged.
REAL="${BANANARCHY_REAL_BLUETOOTHCTL:-/usr/bin/bluetoothctl}"
HELPER="${BANANARCHY_BT_SCAN_HELPER:-/usr/bin/bananarchy-bt-scan.sh}"
export BANANARCHY_REAL_BLUETOOTHCTL="$REAL"
case " $* " in
*" scan on "*|*" scan bredr "*|*" scan le "*)
"$HELPER" || true
exit 0
;;
*)
exec "$REAL" "$@"
;;
esac