diff --git a/monitor/bt.h b/monitor/bt.h
index f646458..7bb82e7 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
uint8_t number[8];
} __attribute__ ((packed));
+#define BT_HCI_CMD_LE_START_ENCRYPT 0x2019
+struct bt_hci_cmd_le_start_encrypt {
+ uint16_t handle;
+ uint8_t number[8];
+ uint16_t diversifier;
+ uint8_t ltk[16];
+} __attribute__ ((packed));
+
#define BT_HCI_CMD_LE_READ_SUPPORTED_STATES 0x201c
struct bt_hci_rsp_le_read_supported_states {
uint8_t status;
diff --git a/monitor/packet.c b/monitor/packet.c
index c50d2da..f5d1c17 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
print_random_number(rsp->number);
}
+static void le_start_encrypt(const void *data, uint8_t size)
+{
+ const struct bt_hci_cmd_le_start_encrypt *cmd = data;
+
+ print_handle(cmd->handle);
+ print_random_number(cmd->number);
+ print_field("Encryption diversifier: 0x%4.4x",
+ btohs(cmd->diversifier));
+ print_key("Long term key", cmd->ltk);
+
+}
+
static void le_read_supported_states_rsp(const void *data, uint8_t size)
{
const struct bt_hci_rsp_le_read_supported_states *rsp = data;
{ 0x2018, "LE Rand",
null_cmd, 0, true,
le_rand_rsp, 9, true },
- { 0x2019, "LE Start Encryption" },
+ { 0x2019, "LE Start Encryption",
+ le_start_encrypt, 28, true },
{ 0x201a, "LE Long Term Key Request Reply" },
{ 0x201b, "LE Long Term Key Request Neg Reply" },
{ 0x201c, "LE Read Supported States",