Files
bananarchy/overlay/rootfs/usr/bin/bananarchy-bt-le-enable.sh
T

17 lines
665 B
Bash
Raw Normal View History

2026-11-10 16:15:50 +02:00
#!/bin/sh
# Enable BR/EDR + SSP + bondable + link security + Smartphone CoD + LE Central
# (disable LE peripheral advertising so phones pair via BR/EDR SSP, not CTKD).
2026-11-10 16:15:50 +02:00
set -eu
if [ "$(id -u)" -ne 0 ]; then
echo "bananarchy-bt-le-enable.sh must run as root" >&2
2026-11-10 16:15:50 +02:00
exit 1
fi
/usr/bin/btmgmt -i hci0 bredr on >/dev/null 2>&1 || true
/usr/bin/btmgmt -i hci0 ssp on >/dev/null 2>&1 || true
/usr/bin/btmgmt -i hci0 linksec on >/dev/null 2>&1 || true
/usr/bin/btmgmt -i hci0 bondable on >/dev/null 2>&1 || true
/usr/bin/btmgmt -i hci0 advertising off >/dev/null 2>&1 || true
/usr/bin/btmgmt -i hci0 class 2 3 >/dev/null 2>&1 || true
2026-11-10 16:15:50 +02:00
exec /usr/bin/btmgmt -i hci0 le on