Fix Bluetooth KeyboardDisplay pairing agent, MGMT flags, and refresh a1120 images

- Switch bananarchy-bt-obex Agent1 from NoInputNoOutput to KeyboardDisplay with /run/bananarchy/bt-obex/pair_{prompt,decision}.tsv and op_done.tsv IPC, auto-confirming Classic Audio headsets while prompting user confirmation, PIN, passkey, or keyboard display codes.
- Enforce bredr on, ssp on, linksec on, bondable on, advertising off, class 2 3, and le on in bananarchy-bt-le-enable.sh alongside PairableTimeout = 0 in main.conf (keeping DiscoverableTimeout = 60 hidden by default) and boot hook sync in sxmo_hook_start.sh.
- Fix root/user daemon UID collisions and sticky-/tmp status/PID writes, separate phones from Classic Audio headsets, increase Pair timeout to 50 s, and add non-blocking --async-ui pairing/connect plus NetModal::BtPairingPrompt in networks.so.
- Extend scripts/test-bluetooth-obex.py, scripts/test-bluetooth-headset.py, scripts/check-rebuild.sh, docs, and rebuild/pin a1120 (cocojamboo) images and archives for nokia-argon, nokia-beatles, nokia-coconut, and nokia-sparkler.
This commit is contained in:
Luxferre committed 2026-11-17 11:30:42 +02:00
1 parent 36a5f8cb8a
commit 1e1fe7c317
17 files changed
+1387 -326

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
# U5: BT is off by default (rfkill soft-block, daemon not started). When a
# user enables it, do not leave the controller permanently discoverable.
DiscoverableTimeout = 60
PairableTimeout = 60
PairableTimeout = 0
ControllerMode = dual
Class = 0x5a020c
MultiProfile = multiple
@@ -145,5 +145,8 @@ superctl start sxmo_notificationmonitor
(
sxmo_hook_apps.sh >/dev/null 2>&1 || true
sxmo_hook_scripts.sh >/dev/null 2>&1 || true
if [ "$(/usr/bin/sxmo_bluetoothtoggle.sh status 2>/dev/null)" = "on" ]; then
SXMO_OS=alpine doas -n /usr/bin/sxmo_bluetoothtoggle.sh on >/dev/null 2>&1 || true
fi
) &
)
@@ -144,5 +144,8 @@ superctl start sxmo_notificationmonitor
(
sxmo_hook_apps.sh >/dev/null 2>&1 || true
sxmo_hook_scripts.sh >/dev/null 2>&1 || true
if [ "$(/usr/bin/sxmo_bluetoothtoggle.sh status 2>/dev/null)" = "on" ]; then
SXMO_OS=alpine doas -n /usr/bin/sxmo_bluetoothtoggle.sh on >/dev/null 2>&1 || true
fi
) &
)
@@ -1,12 +1,17 @@
#!/bin/sh
# Enable the WCNSS controller's LE setting before BlueZ discovery.
# The kernel management socket requires root for this write.
# Enable BR/EDR + SSP + bondable + link security + Smartphone CoD + LE Central
# (disable LE peripheral advertising so phones pair via BR/EDR SSP, not CTKD).
set -eu
if [ "$(id -u)" -ne 0 ]; then
echo "Error: bananarchy-bt-le-enable.sh must run as root" >&2
echo "bananarchy-bt-le-enable.sh must run as root" >&2
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
exec /usr/bin/btmgmt -i hci0 le on
File diff suppressed because it is too large. Load diff
@@ -25,8 +25,10 @@ on() {
if [ -s /etc/bananarchy/bt_mac ] && [ -x /usr/bin/bananarchy-engmenu-ctl ]; then
/usr/bin/bananarchy-engmenu-ctl apply-boot >/dev/null 2>&1 || true
fi
/usr/bin/bananarchy-bt-le-enable.sh >/dev/null 2>&1 || true
timeout 2 /usr/bin/btmgmt -i hci0 class 2 3 >/dev/null 2>&1 || true
timeout 2 bluetoothctl power on >/dev/null 2>&1 || true
/usr/bin/bananarchy-bt-le-enable.sh >/dev/null 2>&1 || true
timeout 2 /usr/bin/btmgmt -i hci0 class 2 3 >/dev/null 2>&1 || true
bt_name=""
@@ -44,10 +46,11 @@ on() {
if [ -r /home/user/.config/sxmo/bt_discoverable ]; then
IFS= read -r bt_disc < /home/user/.config/sxmo/bt_discoverable 2>/dev/null || true
fi
timeout 2 bluetoothctl pairable-timeout 0 >/dev/null 2>&1 || true
timeout 2 bluetoothctl pairable on >/dev/null 2>&1 || true
timeout 2 bluetoothctl discoverable-timeout 60 >/dev/null 2>&1 || true
case "$bt_disc" in
1|on|ON|yes|YES|true|TRUE)
timeout 2 bluetoothctl pairable on >/dev/null 2>&1 || true
timeout 2 bluetoothctl discoverable on >/dev/null 2>&1 || true
;;
*)
@@ -55,7 +58,7 @@ on() {
;;
esac
/usr/bin/bananarchy-bt-obex start >/dev/null 2>&1 &
/usr/bin/bananarchy-bt-obex start >/dev/null 2>&1 || true
}
off() {
Binary file not shown.
@@ -153,5 +153,8 @@ superctl start sxmo_notificationmonitor
(
sxmo_hook_apps.sh >/dev/null 2>&1 || true
sxmo_hook_scripts.sh >/dev/null 2>&1 || true
if [ "$(/usr/bin/sxmo_bluetoothtoggle.sh status 2>/dev/null)" = "on" ]; then
SXMO_OS=alpine doas -n /usr/bin/sxmo_bluetoothtoggle.sh on >/dev/null 2>&1 || true
fi
) &
)