Skip to content

device-cheetah 0.1.45, device-raven 0.1.31, device-tegu 0.2.9: the Bluetooth address rule matches the controller only - #423

Open
nesmeck wants to merge 1 commit into
derekross:mainfrom
nesmeck:bt-addr-udev-host
Open

nesmeck wants to merge 1 commit into
derekross:mainfrom
nesmeck:bt-addr-udev-host

Conversation

@nesmeck

@nesmeck nesmeck commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

What and why

80-omamobile-bt-addr.rules matched KERNEL=="hci[0-9]*". That also takes the bluetooth device each connection adds under the controller (hci0:N, DEVTYPE link), whose parent chain still reaches hci_uart_bcm. So every connection, such as headphones or a mouse, started omamobile-bt-addr@hci0:N.service. The script refuses any name that isn't hciN ("not a controller"), so nothing changed, but the unit stayed failed, and tools/phone-smoke reports it (omarchy-mobile#396's smoke report, and #342).

The rule now also requires ENV{DEVTYPE}=="host", which only the controller has. It's the same one-line change in the three packages that ship the rule, each with a test.

Device and build

  • Phone: Pixel 7 (panther). Its local device package carries the same rule, which comes to panther with my device-panther update.
  • Kernel release (uname -r): 7.3.0-rc6-omamobile-push1-gdb341d1e29e7
  • Packages changed, with versions: omamobile-device-cheetah 0.1.45, omamobile-device-raven 0.1.31, omamobile-device-tegu 0.2.9

Checks (no phone needed)

  • tools/pr-check upstream/main passes
  • tests/all passes
  • tests/packages passes
  • Each changed package has its version bumped, and the new version is in the commit subject
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: or Assisted-by: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, with the new rule loaded from /run/udev/rules.d (until the next reboot)
  • What passed:
    • The controller: udevadm test /sys/class/bluetooth/hci0 still gives SYSTEMD_WANTS=omamobile-bt-addr@hci0.service.
    • A connection: with headphones connected (hci0:11, DEVTYPE link), udevadm test on the link gives only SYSTEMD_WANTS=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.
  • What I did not test:
    • the packages installed from this branch (I tested the rule file itself);
    • a Pixel 7 Pro, a Pixel 6 Pro or a Pixel 9a. The rule is identical apart from tegu's comment naming the BCM4383, and DEVTYPE host comes from the Bluetooth core, not the chip.
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)

🤖 Generated with Claude Code

…uetooth 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 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

Thank you, @nesmeck. This is a clean fix with a clear cause: the per-connection devices really are bluetooth devices named hci0:N, and the kernel gives the controller the device type host and the connections link (net/bluetooth/hci_sysfs.c), so ENV{DEVTYPE}=="host" is exactly the right test. I also confirmed the script exits 1 on hci0:N, which is where the failed units came from. tools/pr-check passes, CI is green, and the branch merges cleanly onto main. The three rules are the only copies on main, so nothing is missed, and I'm glad panther's copy will start from the fixed line.

Two things before it goes in, both on my side:

  1. Version numbers. device-raven 0.1.31 is also claimed by omamobile-audio 0.5.14, device-raven 0.1.31: raven's microphones without speaker protection #400, reboot-to, omamobile-modem: a deliberate restart doesn't cost the next boot its modem #403 and omamobile-modem 0.1.22, omamobile-modem-sit 0.3.35, device-raven 0.1.36: the modem runtime on the Pixel 6 Pro #389, and device-tegu 0.2.9 by omamobile-device-tegu 0.2.9, device/tegu: the radio partitions tools/nv-backup reads #407, reboot-to, omamobile-modem: a deliberate restart doesn't cost the next boot its modem #403 and omamobile-telephony-tegu: Phone and Messages on the Pixel 9a through omamobile-mmd (stacked on #367 and #363) #371. Version files that agree merge without a conflict, so whichever lands second would ship new contents under a number that's already published. Only cheetah's 0.1.45 is free today. Please leave it to me: I'll set the next free numbers when I merge and update the title to match.
  2. The Pixel 7 Pro. This changes the reference phone's package, so I'll check it on my 7 Pro first, as you did on your Pixel 7: the new rule from /run/udev/rules.d, then udevadm test on hci0 and on a connection. Nothing for you to do there.

Thanks for spotting this from the smoke reports and fixing it for every phone at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants