Describe the bug
On kernel 6.18.34+rpt-rpi-2712 (Pi 5, BCM43455, BlueZ 5.82), registering a BLE advertisement through bluetoothd fails: the Add Extended Advertising Data management command (0x0055) is rejected with Invalid Parameters (0x0d) for a payload that is well within limits — 18 bytes of advertising data (one complete 128-bit service UUID) plus a 17-byte scan response (complete local name), against a reported 28/31 bytes available. bluetoothd logs Failed to add advertisement: Invalid Parameters (0x0d) and nothing goes on air. The identical userspace (BlueZ 5.82, same application) works on 6.12.47+rpt-rpi-2712.
Two additional observations pointing at length-accounting in the new mgmt path:
- The legacy
Add Advertising (0x003e) path still works on 6.18.34 — btmgmt add-adv with the same UUID payload advertises fine.
- On that legacy path, requesting local-name-in-scan-response truncates a 15-character name to 10 characters (
Name (short)) despite ample space in the 31-byte scan response; supplying the complete-name AD structure as explicit scan-response data works.
Steps to reproduce the behaviour
- Register any GATT peripheral with an advertisement via the BlueZ D-Bus LEAdvertisingManager1 API (one 128-bit service UUID + local name) on 6.18.34+rpt.
- Observe the mgmt failure in btmon and Failed to add advertisement from bluetoothd.
- Same registration succeeds on 6.12.47+rpt.
Device (s)
Raspberry Pi 5
System
https://pastebin.com/Y3gBAEbr
Logs
Trace 1: the failing registration
= Note: Linux version 6.18.34+rpt-rpi-2712 (aarch64)
= Note: Bluetooth subsystem version 2.22
= Index Info: 88:A2:9E:98:19:92 (Cypress Semiconductor)
bluetoothd: @ MGMT Command: Add Extended Advertising Parameters (0x0054) plen 18
Instance: 1
Flags: 0x00010003
Switch into Connectable mode
Advertise as Discoverable
Contain Scan Response Data
Duration: 0
Timeout: 0
Min advertising interval: 0.000 msec (0x0000)
Max advertising interval: 0.000 msec (0x0000)
TX power: 0 dbm (0x00)
@ MGMT Event: Command Complete (0x0001) plen 7
Add Extended Advertising Parameters (0x0054) plen 4
Status: Success (0x00)
Instance: 1
TX power: 127 dbm (0x7f)
Available adv data len: 28
Available scan rsp data len: 31
bluetoothd: @ MGMT Command: Add Extended Advertising Data (0x0055) plen 46
Instance: 1
Advertising data length: 18
128-bit Service UUIDs (complete): 1 entry
Vendor specific
Scan response length: 17
Name (complete): ************* [REDACTED]
@ MGMT Event: Command Status (0x0002) plen 3
Add Extended Advertising Data (0x0055)
Status: Invalid Parameters (0x0d)
bluetoothd: = src/advertising.c:add_client_complete() Failed to add advertisement: Invalid Parameters (0x0d)
Trace 2: legacy op suceeding
btmgmt: @ MGMT Command: Add Advertising (0x003e) plen 29
Instance: 2
Flags: 0x00000043
Switch into Connectable mode
Advertise as Discoverable
Add Local Name in Scan Response
Duration: 0
Timeout: 0
Advertising data length: 18
128-bit Service UUIDs (complete): 1 entry
Vendor specific
Scan response length: 0
@ MGMT Event: Advertising Added (0x0023) plen 1
Instance: 2
@ MGMT Event: Command Complete (0x0001) plen 4
Add Advertising (0x003e) plen 1
Status: Success (0x00)
Instance: 2
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
Length: 21
Flags: 0x02
LE General Discoverable Mode
128-bit Service UUIDs (complete): 1 entry
Vendor specific
> HCI Event: Command Complete (0x0e) plen 4
LE Set Advertising Data (0x08|0x0008) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32
Length: 12
Name (short): ********* [REDACTED]
> HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Response Data (0x08|0x0009) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
Advertising: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4
LE Set Advertise Enable (0x08|0x000a) ncmd 1
Status: Success (0x00)
Additional context
No response
Describe the bug
On kernel
6.18.34+rpt-rpi-2712(Pi 5, BCM43455, BlueZ 5.82), registering a BLE advertisement through bluetoothd fails: theAdd Extended Advertising Datamanagement command (0x0055) is rejected withInvalid Parameters (0x0d)for a payload that is well within limits — 18 bytes of advertising data (one complete 128-bit service UUID) plus a 17-byte scan response (complete local name), against a reported 28/31 bytes available. bluetoothd logsFailed to add advertisement: Invalid Parameters (0x0d)and nothing goes on air. The identical userspace (BlueZ 5.82, same application) works on6.12.47+rpt-rpi-2712.Two additional observations pointing at length-accounting in the new mgmt path:
Add Advertising(0x003e) path still works on 6.18.34 —btmgmt add-advwith the same UUID payload advertises fine.Name (short)) despite ample space in the 31-byte scan response; supplying the complete-name AD structure as explicit scan-response data works.Steps to reproduce the behaviour
Device (s)
Raspberry Pi 5
System
https://pastebin.com/Y3gBAEbr
Logs
Trace 1: the failing registration
Trace 2: legacy op suceeding
Additional context
No response