Enable WCNSS LE before Bluetooth discovery

Live btmgmt/btmon showed hci0 powered with le absent from current settings; BlueZ issued only BR/EDR Inquiry, so BLE peripherals were invisible. Add a narrow doas helper to run btmgmt -i hci0 le on before each interactive scan, make bluez-btmgmt explicit, add the doas rule, host guards and docs. With real peripherals in pairing mode the plugin UI reported 5 devices and retained BT KeyBoard / LE-QC Ultra entries.
This commit is contained in:
Luxferre committed 2026-11-10 16:15:50 +02:00
1 parent 77127c7844
commit e4358665f7
11 files changed
+58 -9

No files matched your search

@@ -0,0 +1,2 @@
permit nopass :wheel as root cmd /usr/bin/bananarchy-bt-le-enable.sh
permit nopass :wheel as root cmd bananarchy-bt-le-enable.sh
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# Enable the WCNSS controller's LE setting before BlueZ discovery.
# The kernel management socket requires root for this write.
set -eu
if [ "$(id -u)" -ne 0 ]; then
echo "Error: bananarchy-bt-le-enable.sh must run as root" >&2
exit 1
fi
exec /usr/bin/btmgmt -i hci0 le on
@@ -18,6 +18,9 @@ elif [ "$DURATION" -gt 13 ]; then
DURATION=13
fi
"$REAL" power on >/dev/null 2>&1 || true
doas -n /usr/bin/bananarchy-bt-le-enable.sh >/dev/null 2>&1 || true
q1=$((DURATION / 3))
q2=$((DURATION * 2 / 3))
q3=$((DURATION - 1))