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.
17 lines
475 B
Bash
Executable File
17 lines
475 B
Bash
Executable File
#!/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
|