Fix bluetoothd CPU busy-loops, cache BT state, and refresh a1120 images

- Add /etc/conf.d/bluetooth (supervise-daemon, retry=TERM/3/KILL/1, --noplugin=hfp,bap,bass,mcp,vcp,micp,csip,ccp,tmap,gmap,asha,midi,neard) and drop gateway UUIDs (111f/1112/110a) from main.conf ReconnectUUIDs so Experimental = true keeps PreferredBearer without BlueZ hfp-hf/ATT EOF GMainLoop spins.

- Set duplicate-data off in bananarchy-bt-scan.sh and update sxmo_bluetoothtoggle.sh to disconnect, btmgmt power off, and clean state files on disable so adapter_stop() never busy-loops on dual-bearer links.

- Add single-shot BlueZ ObjectManager state caching (bt_state.tsv, dump-state, CTRL_READY_FILE, EPHEMERAL_DEV_PROPS filter) in bananarchy-bt-obex and consume it in networks.so instead of per-device bluetoothctl refresh storms.

- Extend Bluetooth host tests and check-rebuild.sh, update docs, and rebuild/pin a1120 (cocojamboo) images and release archives for nokia-argon, nokia-beatles, nokia-coconut, and nokia-sparkler.
This commit is contained in:
Luxferre committed 2026-11-18 06:34:13 +02:00
1 parent 1e1fe7c317
commit 1e7077e314
15 files changed
+924 -282

No files matched your search

+55
View File
@@ -480,6 +480,9 @@ def test_networks_ui_wiring():
"openObexDirPicker",
"tryPresentObexPrompt",
"tryPresentPairPrompt",
"bt_state.tsv",
"dump-state",
"parseBtStateTsv",
):
require(tok in src, f"networks_plugin.cpp missing OBEX/Pairing UI element {tok}")
obex_src = read(BT_OBEX)
@@ -490,12 +493,64 @@ def test_networks_ui_wiring():
print("[ok] networks_plugin.cpp OBEX & KeyboardDisplay pairing UI wiring")
def test_managed_objects_state_cache(mod):
require("RSSI" in mod.EPHEMERAL_DEV_PROPS and
"ManufacturerData" in mod.EPHEMERAL_DEV_PROPS,
"EPHEMERAL_DEV_PROPS must suppress RSSI/advertising cache rewrites")
objs = {
"/org/bluez/hci0": {
"org.bluez.Adapter1": {
"Powered": ("b", True),
"Discoverable": ("b", False),
"Alias": ("s", "Bananarchy"),
},
},
"/org/bluez/hci0/dev_AA_BB_CC_DD_EE_FF": {
"org.bluez.Device1": {
"Address": ("s", "AA:BB:CC:DD:EE:FF"),
"Alias": ("s", "Audio Headset"),
"Paired": ("b", True),
"Connected": ("b", True),
"Icon": ("s", "audio-headset"),
"Class": ("u", 0x240404),
"UUIDs": ("as", [
"0000110B-0000-1000-8000-00805F9B34FB",
"0000111e-0000-1000-8000-00805f9b34fb",
]),
},
"org.bluez.Battery1": {
"Percentage": ("y", 85),
},
},
"/org/bluez/hci0/dev_11_22_33_44_55_66": {
"org.bluez.Device1": {
"Address": ("s", "11:22:33:44:55:66"),
"Name": ("s", "Pixel Phone"),
"Paired": ("b", True),
"Connected": ("b", False),
"Icon": ("s", "phone"),
"Class": ("u", 0x5a020c),
"UUIDs": ("as", ["00001105-0000-1000-8000-00805f9b34fb"]),
},
},
}
lines = mod.format_managed_objects_tsv(objs).splitlines()
expected = [
"CTRL\t1\t0\tBananarchy",
"DEV\t11:22:33:44:55:66\tPixel Phone\t1\t0\tphone\t0x5a020c\t-1\t00001105-0000-1000-8000-00805f9b34fb",
"DEV\tAA:BB:CC:DD:EE:FF\tAudio Headset\t1\t1\taudio-headset\t0x240404\t85\t0000110b-0000-1000-8000-00805f9b34fb;0000111e-0000-1000-8000-00805f9b34fb",
]
require(lines == expected, f"unexpected format_managed_objects_tsv output: {lines!r}")
print("[ok] BlueZ ObjectManager bt_state.tsv snapshot formatter & ephemeral property filter")
def main():
mod = load_obex_module()
test_class_and_roles()
test_seqpacket_and_stream_reader(mod)
test_accept_and_reject_sessions(mod)
test_keyboard_display_agent(mod)
test_managed_objects_state_cache(mod)
test_networks_ui_wiring()
print("bluetooth obex verification: all checks passed")