This is still broken on -30, too: ``` shepherd-dev@shepherd-26:~$ uname -a Linux shepherd-26.04 7.0.0-30-generic #30-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 18:22:54 UTC 2026 x86_64 GNU/Linux shepherd-dev@shepherd-26:~$ H=$(ls /sys/class/bluetooth | head -1); sudo btmgmt --index $H add-adv -c 1; bluetoothctl advertise peripheral; sudo btmgmt --index $H rm-adv 1 Instance added: 1 AdvertisementMonitor path registered Failed to register advertisement: org.bluez.Error.Failed Instance removed: 1 ``` ``` shepherd-dev@shepherd-26:~$ sudo btmon Bluetooth monitor ver 5.85 btmon[13667]: = Note: Linux version 7.0.0-30-generic (x86_64) 0.806056 btmon[13667]: = Note: Bluetooth subsystem version 2.22 0.806057 = New Index: 8C:68:8B:41:02:DC (Primary,USB,hci2) [hci2] 0.806058 = Open Index: 8C:68:8B:41:02:DC [hci2] 0.806058 = Index Info: 8C:68:8B:41:02:DC (Realtek Semiconductor Corporation) [hci2] 0.806059 ... bluetoothd[1307]: @ MGMT Command: Add Extended Advertising Data (0x0055) plen 14 {0x0001} [hci2] 4.874699 Instance: 1 Advertising data length: 3 Flags: 0x06 LE General Discoverable Mode BR/EDR Not Supported Scan response length: 0 @ MGMT Event: Command Status (0x0002) plen 3 {0x0001} [hci2] 4.874703 Add Extended Advertising Data (0x0055) Status: Invalid Parameters (0x0d) bluetoothd[1307]: = src/advertising.c:add_client_complete() Failed to add advertisement: Invalid Parameters (0x0d) 4.874758 ``` Again, this completely breaks usage of an Ubuntu 26.04 device as a BLE GATT peripheral. Is there a plan to fix this in 7.0.0, or have Ubuntu 26.04 use a newer kernel that is not affected? My understanding is that the following contains the patch that resolves the issue: https://lore.kernel.org/linux- bluetooth/20260602204749.210857-1-luiz.dentz@gmail.com/T/#u -- You received this bug notification because you are subscribed to linux in Ubuntu. Matching subscriptions: Bgg, Bmail, Nb https://bugs.launchpad.net/bugs/2161852 Title: linux 7.0.0-28: BLE LE advertising fails — MGMT "Add Extended Advertising Data" returns Invalid Parameters (0x0d) [regression from 7.0.0-27] Status in linux package in Ubuntu: New Bug description: ## Package / target - Package: `linux` (Ubuntu 26.04) - Regression: **works on `7.0.0-27.27`, broken on `7.0.0-28.28`** ## Summary Since `linux-image-7.0.0-28-generic`, registering any BLE LE advertisement through BlueZ (the D-Bus `org.bluez.LEAdvertisingManager1` API) fails. The kernel rejects the MGMT `Add Extended Advertising Data` (0x0055) command with `Invalid Parameters (0x0d)`, even for a minimal, valid 3-byte advertisement that is well within the length limits the controller just reported. Any application that advertises as a BLE peripheral via BlueZ is broken; only the legacy MGMT `Add Advertising` (0x003e) path still works. ## Impact All BlueZ D-Bus peripheral advertising is broken on this kernel — e.g. GATT peripherals, pairing beacons, custom LE services. bluetoothd always uses the extended MGMT path when the kernel exposes it, and there is no configuration to force the legacy path, so affected apps have no userspace workaround. ## Reproduce On an affected machine: # terminal 1 sudo btmon # terminal 2 — legacy MGMT path: SUCCEEDS sudo btmgmt add-adv -c 1 # bluetoothd's D-Bus/extended path: FAILS bluetoothctl advertise peripheral # -> Failed to register advertisement: org.bluez.Error.Failed btmon, failing (extended) path: @ MGMT Command: Add Extended Advertising Parameters (0x0054) plen 18 Instance: 1 Flags: 0x00000001 (Switch into Connectable mode) @ MGMT Event: Command Complete (0x0001) Add Extended Advertising Parameters (0x0054) Status: Success (0x00) Available adv data len: 31 Available scan rsp data len: 31 @ MGMT Command: Add Extended Advertising Data (0x0055) plen 14 Instance: 1 Advertising data length: 3 Flags: 0x06 (LE General Discoverable Mode, BR/EDR Not Supported) Scan response length: 0 @ MGMT Event: Command Status (0x0002) Add Extended Advertising Data (0x0055) Status: Invalid Parameters (0x0d) bluetoothd: src/advertising.c:add_client_complete() Failed to add advertisement: Invalid Parameters (0x0d) btmon, working (legacy) path — same controller: @ MGMT Command: Add Advertising (0x003e) plen 11 Instance: 1 Flags: 0x00000001 (Switch into Connectable mode) < HCI Command: LE Set Advertising Parameters (0x08|0x0006) Own address type: Public (0x00) > HCI Event: Command Complete — LE Set Advertising Parameters — Status: Success (0x00) @ MGMT Event: Command Complete — Add Advertising (0x003e) — Status: Success (0x00) The advertising data is 3 bytes (`02 01 06`, the Flags AD) against the "Available adv data len: 31" reported one line earlier, so it is not a too-long-data case. ## Scope Reproduced on two different machines / controllers, both on 7.0.0-28-generic: - Intel 8265 (Bluetooth 4.2) - an Intel Bluetooth 5 controller (`btmgmt info` SupportedInstances 20) Because it also fails on a genuinely extended-advertising-capable BT5 controller, this is the kernel's MGMT `Add Extended Advertising Data` handler, not a controller/firmware quirk. ## Upstream reference Identical signature reported and fixed as a **mainline 6.18** regression (works on 6.12): https://github.com/raspberrypi/linux/issues/7473 — a length-accounting bug in the `Add Extended Advertising Data` mgmt command path (introduced when "add advertising" was split into two MGMT commands). Please backport the upstream fix to the Ubuntu 26.04 `linux` 7.0.0 kernel. ## Regression bracket (from dpkg install log) 2026-06-27 install linux-image-7.0.0-27-generic 7.0.0-27.27 # advertising works 2026-07-17 install linux-image-7.0.0-28-generic 7.0.0-28.28 # advertising broken Confirmed by booting back into 7.0.0-27: `bluetoothctl advertise peripheral` succeeds again. ## Workaround Pin/boot `7.0.0-27-generic`. ## Generative AI disclosure I discovered the issue manually while developing an unrelated application. I then used Claude Code to both help debug and discover the Raspberry Pi issue and fix mentioned above. I manually tested kernel 7.0.0-27-generic as a valid workaround. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2161852/+subscriptions
Комментариев нет:
Отправить комментарий