diff --git a/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52820.conf b/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52820.conf index 8e43e75c27498..d82ed5bbba53d 100644 --- a/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52820.conf +++ b/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52820.conf @@ -8,3 +8,8 @@ CONFIG_BT_CTLR_ADV_PERIODIC=y CONFIG_BT_CTLR_DF=y CONFIG_BT_CTLR_DF_ANT_SWITCH_RX=n CONFIG_BT_CTLR_DF_SCAN_CTE_RX=n + +# Enable chaining of multiple CTEs in periodic advertising +CONFIG_BT_CTLR_ADVANCED_FEATURES=y +CONFIG_BT_CTLR_ADV_SYNC_PDU_BACK2BACK=y +CONFIG_BT_CTLR_DF_PER_ADV_CTE_NUM_MAX=16 diff --git a/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52833.conf b/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52833.conf index 8e43e75c27498..d82ed5bbba53d 100644 --- a/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52833.conf +++ b/samples/bluetooth/direction_finding_connectionless_tx/boards/nrf52833dk_nrf52833.conf @@ -8,3 +8,8 @@ CONFIG_BT_CTLR_ADV_PERIODIC=y CONFIG_BT_CTLR_DF=y CONFIG_BT_CTLR_DF_ANT_SWITCH_RX=n CONFIG_BT_CTLR_DF_SCAN_CTE_RX=n + +# Enable chaining of multiple CTEs in periodic advertising +CONFIG_BT_CTLR_ADVANCED_FEATURES=y +CONFIG_BT_CTLR_ADV_SYNC_PDU_BACK2BACK=y +CONFIG_BT_CTLR_DF_PER_ADV_CTE_NUM_MAX=16 diff --git a/samples/bluetooth/direction_finding_connectionless_tx/prj.conf b/samples/bluetooth/direction_finding_connectionless_tx/prj.conf index 82563cc149d3e..a006af0993f28 100644 --- a/samples/bluetooth/direction_finding_connectionless_tx/prj.conf +++ b/samples/bluetooth/direction_finding_connectionless_tx/prj.conf @@ -3,6 +3,7 @@ CONFIG_BT_DEVICE_NAME="DF Connectionless Beacon App" CONFIG_BT_EXT_ADV=y CONFIG_BT_PER_ADV=y +CONFIG_BT_BROADCASTER=y # Enable Direction Finding Feature including AoA and AoD CONFIG_BT_DF=y diff --git a/samples/bluetooth/direction_finding_connectionless_tx/src/main.c b/samples/bluetooth/direction_finding_connectionless_tx/src/main.c index 756334b624ca8..f0a174f48f74e 100644 --- a/samples/bluetooth/direction_finding_connectionless_tx/src/main.c +++ b/samples/bluetooth/direction_finding_connectionless_tx/src/main.c @@ -18,6 +18,8 @@ /* Length of CTE in unit of 8[us] */ #define CTE_LEN (0x14U) +/* Number of CTE send in single periodic advertising train */ +#define PER_ADV_EVENT_CTE_COUNT 5 static void adv_sent_cb(struct bt_le_ext_adv *adv, struct bt_le_ext_adv_sent_info *info); @@ -50,19 +52,18 @@ static struct bt_le_per_adv_param per_adv_param = { static uint8_t ant_patterns[] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA }; #endif /* CONFIG_BT_CTLR_DF_ANT_SWITCH_TX */ -struct bt_df_adv_cte_tx_param cte_params = { - .cte_len = CTE_LEN, - .cte_count = 1, +struct bt_df_adv_cte_tx_param cte_params = { .cte_len = CTE_LEN, + .cte_count = PER_ADV_EVENT_CTE_COUNT, #if defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_TX) - .cte_type = BT_HCI_LE_AOD_CTE_2US, - .num_ant_ids = ARRAY_SIZE(ant_patterns), - .ant_ids = ant_patterns + .cte_type = BT_HCI_LE_AOD_CTE_2US, + .num_ant_ids = ARRAY_SIZE(ant_patterns), + .ant_ids = ant_patterns #else - .cte_type = BT_HCI_LE_AOA_CTE, - .num_ant_ids = 0, - .ant_ids = NULL + .cte_type = BT_HCI_LE_AOA_CTE, + .num_ant_ids = 0, + .ant_ids = NULL #endif /* CONFIG_BT_CTLR_DF_ANT_SWITCH_TX */ - }; +}; static void adv_sent_cb(struct bt_le_ext_adv *adv, struct bt_le_ext_adv_sent_info *info)