* [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name
@ 2025-04-21 21:06 Luiz Augusto von Dentz
2025-04-21 21:06 ` [PATCH BlueZ v1 2/2] eir: Use Broadcast Name as Device.Name Luiz Augusto von Dentz
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2025-04-21 21:06 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds support for decoding Broadcast Name:
> HCI Event: LE Meta Event (0x3e) plen 57
LE Extended Advertising Report (0x0d)
Num reports: 1
Entry 0
Event type: 0x0000
Props: 0x0000
Data status: Complete
Address type: Random (0x01)
Address: XX:XX:XX:XX:XX:XX (Non-Resolvable)
Primary PHY: LE 1M
Secondary PHY: LE 2M
SID: 0x02
TX power: 127 dBm
RSSI: -67 dBm (0xbd)
Periodic advertising interval: 180.00 msec (0x0090)
Direct address type: Public (0x00)
Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
Data length: 0x1f
06 16 52 18 2f 92 f3 05 16 56 18 04 00 11 30 4c ..R./....V....0L
75 69 7a 27 73 20 53 32 33 20 55 6c 74 72 61 uiz's S23 Ultra
Service Data: Broadcast Audio Announcement (0x1852)
Broadcast ID: 15962671 (0xf3922f)
Service Data: Public Broadcast Announcement (0x1856)
Data[2]: 0400
Broadcast Name: Luiz's S23 Ultra
---
monitor/packet.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/monitor/packet.c b/monitor/packet.c
index 15f741c61489..ebd095ab9056 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -3213,6 +3213,7 @@ static void print_fec(uint8_t fec)
#define BT_EIR_MESH_DATA 0x2a
#define BT_EIR_MESH_BEACON 0x2b
#define BT_EIR_CSIP_RSI 0x2e
+#define BT_EIR_BC_NAME 0x30
#define BT_EIR_3D_INFO_DATA 0x3d
#define BT_EIR_MANUFACTURER_DATA 0xff
@@ -4058,6 +4059,12 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
print_field(" Random: 0x%6x", get_le24(data + 3));
break;
+ case BT_EIR_BC_NAME:
+ memset(name, 0, sizeof(name));
+ memcpy(name, data, data_len);
+ print_field("Broadcast Name: %s", name);
+ break;
+
case BT_EIR_MANUFACTURER_DATA:
if (data_len < 2)
break;
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH BlueZ v1 2/2] eir: Use Broadcast Name as Device.Name
2025-04-21 21:06 [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name Luiz Augusto von Dentz
@ 2025-04-21 21:06 ` Luiz Augusto von Dentz
2025-04-22 13:40 ` [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name patchwork-bot+bluetooth
2025-04-24 15:45 ` [BlueZ,v1,1/2] " bluez.test.bot
2 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2025-04-21 21:06 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes use of Broadcast Name advertising data field as device name
so it can be identified by upper layer.
---
src/eir.c | 3 ++-
src/eir.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/eir.c b/src/eir.c
index 3e3ee2863058..28b09653cbae 100644
--- a/src/eir.c
+++ b/src/eir.c
@@ -293,6 +293,7 @@ void eir_parse(struct eir_data *eir, const uint8_t *eir_data, uint8_t eir_len)
case EIR_NAME_SHORT:
case EIR_NAME_COMPLETE:
+ case EIR_BC_NAME:
/* Some vendors put a NUL byte terminator into
* the name */
while (data_len > 0 && data[data_len - 1] == '\0')
@@ -301,7 +302,7 @@ void eir_parse(struct eir_data *eir, const uint8_t *eir_data, uint8_t eir_len)
g_free(eir->name);
eir->name = name2utf8(data, data_len);
- eir->name_complete = eir_data[1] == EIR_NAME_COMPLETE;
+ eir->name_complete = eir_data[1] != EIR_NAME_SHORT;
break;
case EIR_TX_POWER:
diff --git a/src/eir.h b/src/eir.h
index f34291952823..2fe8cddf783d 100644
--- a/src/eir.h
+++ b/src/eir.h
@@ -39,6 +39,7 @@
#define EIR_SVC_DATA128 0x21 /* LE: Service data, 128-bit UUID */
#define EIR_TRANSPORT_DISCOVERY 0x26 /* Transport Discovery Service */
#define EIR_CSIP_RSI 0x2e /* Resolvable Set Identifier */
+#define EIR_BC_NAME 0x30 /* Broadcast Name */
#define EIR_MANUFACTURER_DATA 0xFF /* Manufacturer Specific Data */
/* Flags Descriptions */
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name
2025-04-21 21:06 [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name Luiz Augusto von Dentz
2025-04-21 21:06 ` [PATCH BlueZ v1 2/2] eir: Use Broadcast Name as Device.Name Luiz Augusto von Dentz
@ 2025-04-22 13:40 ` patchwork-bot+bluetooth
2025-04-24 15:45 ` [BlueZ,v1,1/2] " bluez.test.bot
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2025-04-22 13:40 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 21 Apr 2025 17:06:01 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This adds support for decoding Broadcast Name:
>
> > HCI Event: LE Meta Event (0x3e) plen 57
> LE Extended Advertising Report (0x0d)
> Num reports: 1
> Entry 0
> Event type: 0x0000
> Props: 0x0000
> Data status: Complete
> Address type: Random (0x01)
> Address: XX:XX:XX:XX:XX:XX (Non-Resolvable)
> Primary PHY: LE 1M
> Secondary PHY: LE 2M
> SID: 0x02
> TX power: 127 dBm
> RSSI: -67 dBm (0xbd)
> Periodic advertising interval: 180.00 msec (0x0090)
> Direct address type: Public (0x00)
> Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
> Data length: 0x1f
> 06 16 52 18 2f 92 f3 05 16 56 18 04 00 11 30 4c ..R./....V....0L
> 75 69 7a 27 73 20 53 32 33 20 55 6c 74 72 61 uiz's S23 Ultra
> Service Data: Broadcast Audio Announcement (0x1852)
> Broadcast ID: 15962671 (0xf3922f)
> Service Data: Public Broadcast Announcement (0x1856)
> Data[2]: 0400
> Broadcast Name: Luiz's S23 Ultra
>
> [...]
Here is the summary with links:
- [BlueZ,v1,1/2] btmon: Decode Broadcast Name
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=99deeea86f15
- [BlueZ,v1,2/2] eir: Use Broadcast Name as Device.Name
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e4c1d03ef73c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [BlueZ,v1,1/2] btmon: Decode Broadcast Name
2025-04-21 21:06 [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name Luiz Augusto von Dentz
2025-04-21 21:06 ` [PATCH BlueZ v1 2/2] eir: Use Broadcast Name as Device.Name Luiz Augusto von Dentz
2025-04-22 13:40 ` [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name patchwork-bot+bluetooth
@ 2025-04-24 15:45 ` bluez.test.bot
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-04-24 15:45 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 535 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: monitor/packet.c:3213
error: monitor/packet.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-24 15:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21 21:06 [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name Luiz Augusto von Dentz
2025-04-21 21:06 ` [PATCH BlueZ v1 2/2] eir: Use Broadcast Name as Device.Name Luiz Augusto von Dentz
2025-04-22 13:40 ` [PATCH BlueZ v1 1/2] btmon: Decode Broadcast Name patchwork-bot+bluetooth
2025-04-24 15:45 ` [BlueZ,v1,1/2] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox