From 80717d432ade345114db6aad716bcec0ed1789e9 Mon Sep 17 00:00:00 2001 From: Alejandro Garcia Date: Tue, 3 Nov 2026 20:25:43 -0800 Subject: [PATCH] device-cheetah 0.1.45, device-raven 0.1.31, device-tegu 0.2.9: the Bluetooth address rule matches the controller only 80-omamobile-bt-addr.rules matched KERNEL=="hci[0-9]*", which also takes the bluetooth device each connection adds under the controller (hci0:N, DEVTYPE link; its parent chain still reaches hci_uart_bcm). So every connection, such as a pair of headphones or a mouse, started omamobile-bt-addr@hci0:N.service. The script refuses a name that isn't hciN ("not a controller"), so nothing changed, but the unit stayed failed, and tools/phone-smoke reports it. Match ENV{DEVTYPE}=="host" as well, which only the controller has. Each package's test checks the rule. Tested on a Pixel 7, whose local package carries the same rule, with the new rule loaded from /run/udev/rules.d: udevadm test on hci0 still wants omamobile-bt-addr@hci0.service. With headphones connected (hci0:11, DEVTYPE link), udevadm test on the link wants only bluetooth.target, and no omamobile-bt-addr@hci0:N unit started. Before the change, the same headphones left omamobile-bt-addr@hci0:6 and @hci0:11 failed. Co-Authored-By: Claude Opus 5.5 --- packages/omamobile-device-cheetah/test/all | 4 ++++ .../vendor/udev/rules.d/80-omamobile-bt-addr.rules | 5 +++-- packages/omamobile-device-cheetah/version | 2 +- packages/omamobile-device-raven/test/all | 4 ++++ .../vendor/udev/rules.d/80-omamobile-bt-addr.rules | 5 +++-- packages/omamobile-device-raven/version | 2 +- packages/omamobile-device-tegu/test/all | 4 ++++ .../vendor/udev/rules.d/80-omamobile-bt-addr.rules | 5 +++-- packages/omamobile-device-tegu/version | 2 +- 9 files changed, 24 insertions(+), 9 deletions(-) diff --git a/packages/omamobile-device-cheetah/test/all b/packages/omamobile-device-cheetah/test/all index fba7eb760..14106a973 100755 --- a/packages/omamobile-device-cheetah/test/all +++ b/packages/omamobile-device-cheetah/test/all @@ -182,3 +182,7 @@ if [[ -f ../omamobile-modem/systemd/omamobile-modem-boot.target ]]; then || fail "the modem unit the link turns on is skipped on a phone that isn't provisioned" fi pass "sitd waits for the CP; the modem stack is on by default through the target's vendor link; sit-data needs the modem's port" + +grep -q 'KERNEL=="hci\[0-9\]\*", ENV{DEVTYPE}=="host"' vendor/udev/rules.d/80-omamobile-bt-addr.rules \ + || fail "the address service starts for the controller only, not for its connections (hci0:N)" +pass "the Bluetooth address rule matches only the controller" diff --git a/packages/omamobile-device-cheetah/vendor/udev/rules.d/80-omamobile-bt-addr.rules b/packages/omamobile-device-cheetah/vendor/udev/rules.d/80-omamobile-bt-addr.rules index 873caff85..7cb05ac10 100644 --- a/packages/omamobile-device-cheetah/vendor/udev/rules.d/80-omamobile-bt-addr.rules +++ b/packages/omamobile-device-cheetah/vendor/udev/rules.d/80-omamobile-bt-addr.rules @@ -1,4 +1,5 @@ # SPDX-License-Identifier: MIT # Omarchy Mobile: give the BCM4389 Bluetooth controller its real address -# (omamobile-bt-addr@.service). -ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", DRIVERS=="hci_uart_bcm", TAG+="systemd", ENV{SYSTEMD_WANTS}+="omamobile-bt-addr@%k.service" +# (omamobile-bt-addr@.service). Only the controller (DEVTYPE host): each +# connection is a bluetooth device too (hci0:N, DEVTYPE link). +ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", ENV{DEVTYPE}=="host", DRIVERS=="hci_uart_bcm", TAG+="systemd", ENV{SYSTEMD_WANTS}+="omamobile-bt-addr@%k.service" diff --git a/packages/omamobile-device-cheetah/version b/packages/omamobile-device-cheetah/version index 6871b9e7a..6ee33ba22 100644 --- a/packages/omamobile-device-cheetah/version +++ b/packages/omamobile-device-cheetah/version @@ -1 +1 @@ -0.1.44 +0.1.45 diff --git a/packages/omamobile-device-raven/test/all b/packages/omamobile-device-raven/test/all index 0203a74ee..894277e4a 100755 --- a/packages/omamobile-device-raven/test/all +++ b/packages/omamobile-device-raven/test/all @@ -132,3 +132,7 @@ grep -q 'ENV{SYSTEMD_WANTS}+="omamobile-feedbackd-rescan.service"' "$rule" || fa grep -qx 'ExecStart=-/usr/bin/pkill -x feedbackd' vendor/systemd/system/omamobile-feedbackd-rescan.service \ || fail "the rescan stops only feedbackd, and no feedbackd is not an error" pass "feedbackd picks up the haptics motor" + +grep -q 'KERNEL=="hci\[0-9\]\*", ENV{DEVTYPE}=="host"' vendor/udev/rules.d/80-omamobile-bt-addr.rules \ + || fail "the address service starts for the controller only, not for its connections (hci0:N)" +pass "the Bluetooth address rule matches only the controller" diff --git a/packages/omamobile-device-raven/vendor/udev/rules.d/80-omamobile-bt-addr.rules b/packages/omamobile-device-raven/vendor/udev/rules.d/80-omamobile-bt-addr.rules index 873caff85..7cb05ac10 100644 --- a/packages/omamobile-device-raven/vendor/udev/rules.d/80-omamobile-bt-addr.rules +++ b/packages/omamobile-device-raven/vendor/udev/rules.d/80-omamobile-bt-addr.rules @@ -1,4 +1,5 @@ # SPDX-License-Identifier: MIT # Omarchy Mobile: give the BCM4389 Bluetooth controller its real address -# (omamobile-bt-addr@.service). -ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", DRIVERS=="hci_uart_bcm", TAG+="systemd", ENV{SYSTEMD_WANTS}+="omamobile-bt-addr@%k.service" +# (omamobile-bt-addr@.service). Only the controller (DEVTYPE host): each +# connection is a bluetooth device too (hci0:N, DEVTYPE link). +ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", ENV{DEVTYPE}=="host", DRIVERS=="hci_uart_bcm", TAG+="systemd", ENV{SYSTEMD_WANTS}+="omamobile-bt-addr@%k.service" diff --git a/packages/omamobile-device-raven/version b/packages/omamobile-device-raven/version index 013adb716..db7a48047 100644 --- a/packages/omamobile-device-raven/version +++ b/packages/omamobile-device-raven/version @@ -1 +1 @@ -0.1.30 +0.1.31 diff --git a/packages/omamobile-device-tegu/test/all b/packages/omamobile-device-tegu/test/all index 3a55ebd03..1b97e0580 100755 --- a/packages/omamobile-device-tegu/test/all +++ b/packages/omamobile-device-tegu/test/all @@ -192,3 +192,7 @@ for t in test/graphics-start test/aoc-start test/usb-rescue test/sleep-hooks tes "$t" || fail "$t" done pass "the scripts behave in a scratch root" + +grep -q 'KERNEL=="hci\[0-9\]\*", ENV{DEVTYPE}=="host"' vendor/udev/rules.d/80-omamobile-bt-addr.rules \ + || fail "the address service starts for the controller only, not for its connections (hci0:N)" +pass "the Bluetooth address rule matches only the controller" diff --git a/packages/omamobile-device-tegu/vendor/udev/rules.d/80-omamobile-bt-addr.rules b/packages/omamobile-device-tegu/vendor/udev/rules.d/80-omamobile-bt-addr.rules index e53bd1bbb..0e2b5ce7b 100644 --- a/packages/omamobile-device-tegu/vendor/udev/rules.d/80-omamobile-bt-addr.rules +++ b/packages/omamobile-device-tegu/vendor/udev/rules.d/80-omamobile-bt-addr.rules @@ -1,4 +1,5 @@ # SPDX-License-Identifier: MIT # Omarchy Mobile: give the BCM4383 Bluetooth controller its real address -# (omamobile-bt-addr@.service). -ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", DRIVERS=="hci_uart_bcm", TAG+="systemd", ENV{SYSTEMD_WANTS}+="omamobile-bt-addr@%k.service" +# (omamobile-bt-addr@.service). Only the controller (DEVTYPE host): each +# connection is a bluetooth device too (hci0:N, DEVTYPE link). +ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", ENV{DEVTYPE}=="host", DRIVERS=="hci_uart_bcm", TAG+="systemd", ENV{SYSTEMD_WANTS}+="omamobile-bt-addr@%k.service" diff --git a/packages/omamobile-device-tegu/version b/packages/omamobile-device-tegu/version index a45be4627..1866a362b 100644 --- a/packages/omamobile-device-tegu/version +++ b/packages/omamobile-device-tegu/version @@ -1 +1 @@ -0.2.8 +0.2.9