This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problem with Direction Finding (CTE) for 1 µs sample slots

Hi

I have tested direction finding examples successfully., by default parameters. Theses projects are used as "TX" and "RX" in AoA mode:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direction_finding_connectionless_tx/README.html

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direction_finding_connectionless_rx/README.html

I tried to change the default sample slot, from 2us to 1us, by changing this line at receiver side (found at main.c of the application):

static void enable_cte_rx(void)
{
    ....
	const struct bt_df_per_adv_sync_cte_rx_param cte_rx_params = {
		.max_cte_count = 10,
#if defined(CONFIG_BT_CTLR_DF_ANT_SWITCH_RX)
		.cte_type = BT_DF_CTE_TYPE_AOA,
		.slot_durations = 0x2,
		.num_ant_ids = ARRAY_SIZE(ant_patterns),
		.ant_ids = ant_patterns,
#else
		.cte_type = BT_DF_CTE_TYPE_AOD_1US | BT_DF_CTE_TYPE_AOD_2US,
#endif /* CONFIG_BT_CTLR_DF_ANT_SWITCH_RX */
	};
	....
}

As you can see in the above code, ".slot_durations = 0x2," to ".slot_durations = 0x1," will change the slot duration. But by modifying this line, it will stuck when it try to validate the parameters at "ncs/zephyr/subsys/bluetooth/host/direction.c":

static int validate_cte_rx_params(const struct bt_df_per_adv_sync_cte_rx_param *params)
{
    ...
		if (!(params->slot_durations == BT_HCI_LE_ANTENNA_SWITCHING_SLOT_2US ||
		      (params->slot_durations == BT_HCI_LE_ANTENNA_SWITCHING_SLOT_1US &&
		       DF_AOA_RX_1US_SUPPORT(df_ant_info.switch_sample_rates)))) {
			return -EINVAL;
		}
    ...
}

this line "DF_AOA_RX_1US_SUPPORT(df_ant_info.switch_sample_rates)" returns false. Also I have enabled "CONFIG_BT_CTLR_DF_CTE_RX_SAMPLE_1US" in the configuration but it didn't help. How can I solve the problem and enable switching slots of 1us?

I am using nRF52833-DK boards and nRF SDK v1.6.0

Regards,

Saleh 

Parents Reply Children
No Data
Related