Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ CONFIG_BT_CTLR_DF=y
# Disable Direction Finding RX mode
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ CONFIG_BT_CTLR_DF=y
# Disable Direction Finding RX mode
CONFIG_BT_CTLR_DF_SCAN_CTE_RX=n
CONFIG_BT_CTLR_DF_ANT_SWITCH_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
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ CONFIG_BT_CTLR_DF_CTE_RX=n

# Limit number of possible connection to decrease memory usage
CONFIG_BT_MAX_CONN=1

# 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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,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
22 changes: 11 additions & 11 deletions samples/bluetooth/direction_finding_connectionless_tx/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
#include <sys/printk.h>

#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/direction.h>
#include <sys/byteorder.h>
#include <sys/util.h>

/* 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);
Expand Down Expand Up @@ -54,19 +55,18 @@ static uint8_t ant_patterns[] = {0x2, 0x0, 0x5, 0x6, 0x1, 0x4, 0xC, 0x9, 0xE,
0xD, 0x8, 0xA};
#endif /* CONFIG_BT_DF_CTE_TX_AOD */

const 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_DF_CTE_TX_AOD)
.cte_type = BT_DF_CTE_TYPE_AOD_2US,
.num_ant_ids = ARRAY_SIZE(ant_patterns),
.ant_ids = ant_patterns
.cte_type = BT_DF_CTE_TYPE_AOD_2US,
.num_ant_ids = ARRAY_SIZE(ant_patterns),
.ant_ids = ant_patterns
#else
.cte_type = BT_DF_CTE_TYPE_AOA,
.num_ant_ids = 0,
.ant_ids = NULL
.cte_type = BT_DF_CTE_TYPE_AOA,
.num_ant_ids = 0,
.ant_ids = NULL
#endif /* CONFIG_BT_DF_CTE_TX_AOD */
};
};

static void adv_sent_cb(struct bt_le_ext_adv *adv,
struct bt_le_ext_adv_sent_info *info)
Expand Down