All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.