monitor: Add support for decoding RSI
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 22 Dec 2022 21:41:12 +0000 (13:41 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:11:34 +0000 (15:41 +0530)
This adds support for decoding Resolvable Set Identifier[1] advertising
type (0x2e) according to CIS[2] spec:

        Resolvable Set Identifier: 46-BB-DB-26-D8-55
          Hash: 0x26d855
          Random: 0x46bbdb

[1] https://www.bluetooth.com/specifications/assigned-numbers/
[2] https://www.bluetooth.com/specifications/csis-1-0-1/

monitor/packet.c

index f9286c7..7edb532 100755 (executable)
@@ -3122,6 +3122,7 @@ static void print_fec(uint8_t fec)
 #define BT_EIR_MESH_PROV               0x29
 #define BT_EIR_MESH_DATA               0x2a
 #define BT_EIR_MESH_BEACON             0x2b
+#define BT_EIR_CSIP_RSI                        0x2e
 #define BT_EIR_3D_INFO_DATA            0x3d
 #define BT_EIR_MANUFACTURER_DATA       0xff
 
@@ -4016,6 +4017,14 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
                        print_mesh_beacon(data, data_len);
                        break;
 
+               case BT_EIR_CSIP_RSI:
+                       if (data_len < 6)
+                               break;
+                       print_addr("Resolvable Set Identifier", data, 0xff);
+                       print_field("  Hash: 0x%6x", get_le24(data));
+                       print_field("  Random: 0x%6x", get_le24(data + 3));
+                       break;
+
                case BT_EIR_MANUFACTURER_DATA:
                        if (data_len < 2)
                                break;