diff --git a/monitor/bt.h b/monitor/bt.h
index af17c1f..f25646f 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
uint8_t priv_mode;
} __attribute__ ((packed));
+#define BT_HCI_CMD_LE_RECEIVER_TEST_V3 0x204f
+struct bt_hci_cmd_le_receiver_test_v3 {
+ uint8_t rx_chan;
+ uint8_t phy;
+ uint8_t mod_index;
+ uint8_t cte_len;
+ uint8_t cte_type;
+ uint8_t duration;
+ uint8_t num_antenna_id;
+ uint8_t antenna_ids[0];
+} __attribute__ ((packed));
+
#define BT_HCI_EVT_INQUIRY_COMPLETE 0x01
struct bt_hci_evt_inquiry_complete {
uint8_t status;
diff --git a/monitor/packet.c b/monitor/packet.c
index 96cacdd..64cb104 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
print_field("Privacy Mode: %s (0x%2.2x)", str, cmd->priv_mode);
}
+static void le_receiver_test_cmd_v3(const void *data, uint8_t size)
+{
+ const struct bt_hci_cmd_le_receiver_test_v3 *cmd = data;
+ uint8_t i;
+
+ print_field("RX Channel: %u MHz (0x%2.2x)", cmd->rx_chan * 2 + 2402,
+ cmd->rx_chan);
+
+ switch (cmd->phy) {
+ case 0x01:
+ print_field("PHY: LE 1M (0x%2.2x)", cmd->phy);
+ break;
+ case 0x02:
+ print_field("PHY: LE 2M (0x%2.2x)", cmd->phy);
+ break;
+ case 0x03:
+ print_field("PHY: LE Coded (0x%2.2x)", cmd->phy);
+ break;
+ }
+
+ print_field("Modulation Index: %s (0x%2.2x)",
+ cmd->mod_index ? "stable" : "standard", cmd->mod_index);
+ print_field("Expected CTE Length: %u us (0x%2.2x)", cmd->cte_len * 8,
+ cmd->cte_len);
+ print_field("Expected CTE Type: %u us slots (0x%2.2x)", cmd->cte_type,
+ cmd->cte_type);
+ print_field("Slot Duration: %u us (0x%2.2x)", cmd->duration,
+ cmd->duration);
+ print_field("Number of Antenna IDs: %u", cmd->num_antenna_id);
+
+ if (size < sizeof(*cmd) + cmd->num_antenna_id)
+ return;
+
+ for (i = 0; i < cmd->num_antenna_id; i++)
+ print_field(" Antenna ID: %u", cmd->antenna_ids[i]);
+}
+
struct opcode_data {
uint16_t opcode;
int bit;
{ 0x204e, 314, "LE Set Privacy Mode",
le_set_priv_mode_cmd, 8, true,
status_rsp, 1, true },
+ { 0x204f, 315, "LE Receiver Test command [v3]",
+ le_receiver_test_cmd_v3, 7, false,
+ status_rsp, 1, true },
{ }
};