2026-11-10 16:15:50 +02:00
|
|
|
#!/bin/sh
|
2026-11-17 11:30:42 +02:00
|
|
|
# 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
|
2026-11-17 11:30:42 +02:00
|
|
|
echo "bananarchy-bt-le-enable.sh must run as root" >&2
|
2026-11-10 16:15:50 +02:00
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2026-11-17 11:30:42 +02:00
|
|
|
/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
|
2026-11-17 10:33:09 +02:00
|
|
|
/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
|