@@ -1045,6 +1045,15 @@ struct bt_hci_cp_le_rx_test {
1045
1045
uint8_t rx_ch ;
1046
1046
} __packed ;
1047
1047
1048
+ #define BT_HCI_TEST_PKT_PAYLOAD_PRBS9 0x00
1049
+ #define BT_HCI_TEST_PKT_PAYLOAD_11110000 0x01
1050
+ #define BT_HCI_TEST_PKT_PAYLOAD_10101010 0x02
1051
+ #define BT_HCI_TEST_PKT_PAYLOAD_PRBS15 0x03
1052
+ #define BT_HCI_TEST_PKT_PAYLOAD_11111111 0x04
1053
+ #define BT_HCI_TEST_PKT_PAYLOAD_00000000 0x05
1054
+ #define BT_HCI_TEST_PKT_PAYLOAD_00001111 0x06
1055
+ #define BT_HCI_TEST_PKT_PAYLOAD_01010101 0x07
1056
+
1048
1057
#define BT_HCI_OP_LE_TX_TEST BT_OP(BT_OGF_LE, 0x001e)
1049
1058
struct bt_hci_cp_le_tx_test {
1050
1059
uint8_t tx_ch ;
@@ -1231,14 +1240,19 @@ struct bt_hci_cp_le_set_phy {
1231
1240
#define BT_HCI_LE_MOD_INDEX_STANDARD 0x00
1232
1241
#define BT_HCI_LE_MOD_INDEX_STABLE 0x01
1233
1242
1243
+ #define BT_HCI_LE_RX_PHY_1M 0x01
1244
+ #define BT_HCI_LE_RX_PHY_2M 0x02
1245
+ #define BT_HCI_LE_RX_PHY_CODED 0x03
1246
+
1234
1247
#define BT_HCI_OP_LE_ENH_RX_TEST BT_OP(BT_OGF_LE, 0x0033)
1235
1248
struct bt_hci_cp_le_enh_rx_test {
1236
1249
uint8_t rx_ch ;
1237
1250
uint8_t phy ;
1238
1251
uint8_t mod_index ;
1239
1252
} __packed ;
1240
1253
1241
- /* Extends BT_HCI_LE_PHY */
1254
+ #define BT_HCI_LE_TX_PHY_1M 0x01
1255
+ #define BT_HCI_LE_TX_PHY_2M 0x02
1242
1256
#define BT_HCI_LE_TX_PHY_CODED_S8 0x03
1243
1257
#define BT_HCI_LE_TX_PHY_CODED_S2 0x04
1244
1258
@@ -1518,6 +1532,36 @@ struct bt_hci_cp_le_set_privacy_mode {
1518
1532
uint8_t mode ;
1519
1533
} __packed ;
1520
1534
1535
+ #define BT_HCI_LE_TEST_CTE_DISABLED 0x00
1536
+ #define BT_HCI_LE_TEST_CTE_TYPE_ANY 0x00
1537
+ #define BT_HCI_LE_TEST_SLOT_DURATION_ANY 0x00
1538
+ #define BT_HCI_LE_TEST_SWITCH_PATTERN_LEN_ANY 0x00
1539
+
1540
+ #define BT_HCI_OP_LE_RX_TEST_V3 BT_OP(BT_OGF_LE, 0x004f)
1541
+ struct bt_hci_cp_le_rx_test_v3 {
1542
+ uint8_t rx_ch ;
1543
+ uint8_t phy ;
1544
+ uint8_t mod_index ;
1545
+ uint8_t expected_cte_len ;
1546
+ uint8_t expected_cte_type ;
1547
+ uint8_t slot_durations ;
1548
+ uint8_t switch_pattern_len ;
1549
+ uint8_t ant_ids [0 ];
1550
+ } __packed ;
1551
+
1552
+ #define BT_HCI_OP_LE_TX_TEST_V3 BT_OP(BT_OGF_LE, 0x0050)
1553
+
1554
+ struct bt_hci_cp_le_tx_test_v3 {
1555
+ uint8_t tx_ch ;
1556
+ uint8_t test_data_len ;
1557
+ uint8_t pkt_payload ;
1558
+ uint8_t phy ;
1559
+ uint8_t cte_len ;
1560
+ uint8_t cte_type ;
1561
+ uint8_t switch_pattern_len ;
1562
+ uint8_t ant_ids [0 ];
1563
+ } __packed ;
1564
+
1521
1565
/* Min and max Constant Tone Extension length in 8us units */
1522
1566
#define BT_HCI_LE_CTE_LEN_MIN 0x2
1523
1567
#define BT_HCI_LE_CTE_LEN_MAX 0x14
@@ -2019,6 +2063,33 @@ struct bt_hci_rp_le_read_iso_link_quality {
2019
2063
uint32_t duplicate_packets ;
2020
2064
} __packed ;
2021
2065
2066
+ #define BT_HCI_OP_LE_TX_TEST_V4 BT_OP(BT_OGF_LE, 0x007B)
2067
+
2068
+ struct bt_hci_cp_le_tx_test_v4 {
2069
+ uint8_t tx_ch ;
2070
+ uint8_t test_data_len ;
2071
+ uint8_t pkt_payload ;
2072
+ uint8_t phy ;
2073
+ uint8_t cte_len ;
2074
+ uint8_t cte_type ;
2075
+ uint8_t switch_pattern_len ;
2076
+ uint8_t ant_ids [0 ];
2077
+ } __packed ;
2078
+
2079
+ #define BT_HCI_TX_TEST_POWER_MIN -0x7F
2080
+ #define BT_HCI_TX_TEST_POWER_MAX 0x14
2081
+
2082
+ #define BT_HCI_TX_TEST_POWER_MIN_SET 0x7E
2083
+ #define BT_HCI_TX_TEST_POWER_MAX_SET 0x7F
2084
+
2085
+ /* Helper structure for Tx power parameter in the HCI Tx Test v4 command.
2086
+ * Previous parameter of this command is variable size so having separated structure
2087
+ * for this parameter helps in command parameters unpacking.
2088
+ */
2089
+ struct bt_hci_cp_le_tx_test_v4_tx_power {
2090
+ int8_t tx_power ;
2091
+ } __packed ;
2092
+
2022
2093
/* Event definitions */
2023
2094
2024
2095
#define BT_HCI_EVT_UNKNOWN 0x00
0 commit comments