Diff between 1bbc54e1f3f4c11eb40ed8d0257f65e331dbbb89 and 66ac7a5af542e4a87a7c75a37a9655104b8fe2d7

Changed Files

File Additions Deletions Status
monitor/bt.h +5 -0 modified
monitor/packet.c +29 -1 modified

Full Patch

diff --git a/monitor/bt.h b/monitor/bt.h
index 2245ab3..0ae0fc4 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -1107,6 +1107,11 @@ struct bt_hci_rsp_write_remote_amp_assoc {
 
 #define BT_HCI_CMD_ENABLE_DUT_MODE		0x1803
 
+#define BT_HCI_CMD_WRITE_SSP_DEBUG_MODE		0x1804
+struct bt_hci_cmd_write_ssp_debug_mode {
+	uint8_t  mode;
+} __attribute__ ((packed));
+
 #define BT_HCI_CMD_LE_SET_EVENT_MASK		0x2001
 struct bt_hci_cmd_le_set_event_mask {
 	uint8_t  mask[8];
diff --git a/monitor/packet.c b/monitor/packet.c
index 55c9f0f..025d2ee 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -924,6 +924,25 @@ static void print_simple_pairing_mode(uint8_t mode)
 	print_field("Mode: %s (0x%2.2x)", str, mode);
 }
 
+static void print_ssp_debug_mode(uint8_t mode)
+{
+	const char *str;
+
+	switch (mode) {
+	case 0x00:
+		str = "Disabled";
+		break;
+	case 0x01:
+		str = "Enabled";
+		break;
+	default:
+		str = "Reserved";
+		break;
+	}
+
+	print_field("Debug mode: %s (0x%2.2x)", str, mode);
+}
+
 static void print_pscan_rep_mode(uint8_t pscan_rep_mode)
 {
 	const char *str;
@@ -4226,6 +4245,13 @@ static void write_remote_amp_assoc_rsp(const void *data, uint8_t size)
 	print_phy_handle(rsp->phy_handle);
 }
 
+static void write_ssp_debug_mode_cmd(const void *data, uint8_t size)
+{
+	const struct bt_hci_cmd_write_ssp_debug_mode *cmd = data;
+
+	print_ssp_debug_mode(cmd->mode);
+}
+
 static void le_set_event_mask_cmd(const void *data, uint8_t size)
 {
 	const struct bt_hci_cmd_le_set_event_mask *cmd = data;
@@ -5126,7 +5152,9 @@ static const struct opcode_data opcode_table[] = {
 	{ 0x1803, 130, "Enable Device Under Test Mode",
 				null_cmd, 0, true,
 				status_rsp, 1, true },
-	{ 0x1804, 157, "Write Simple Pairing Debug Mode" },
+	{ 0x1804, 157, "Write Simple Pairing Debug Mode",
+				write_ssp_debug_mode_cmd, 1, true,
+				status_rsp, 1, true },
 	{ 0x1807, 189, "Enable AMP Receiver Reports" },
 	{ 0x1808, 190, "AMP Test End" },
 	{ 0x1809, 191, "AMP Test" },