Skip to content

Commit

Permalink
monitor: Add support for decoding RSI
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
Vudentz committed Dec 22, 2022
1 parent 051ccb1 commit 7a32f29
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions monitor/packet.c
Expand Up @@ -3123,6 +3123,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

Expand Down Expand Up @@ -4017,6 +4018,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;
Expand Down

0 comments on commit 7a32f29

Please sign in to comment.