Hi, I have a question about Channel Sounding. For my design, I want to use 2 antennas on the initiator and 1 antenna on the reflector. My initiator hardware has an RF switch uPG2214TB, where ANT1 is selected when gpio03 is LOW and gpio02 is HIGH, and ANT2 is selected with exactly the opposite control logic.
So, I changed the DTS like this:
cs_antenna_switch: cs-antenna-config { status = "okay"; compatible = "nordic,bt-cs-antenna-switch"; ant-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>, <&gpio0 2 GPIO_ACTIVE_HIGH>; multiplexing-mode = <0>; };
I also set the number of RF paths in prj:
CONFIG_BT_RAS_MAX_ANTENNA_PATHS=2 CONFIG_BT_CTLR_SDC_CS_MAX_ANTENNA_PATHS=2 CONFIG_BT_CTLR_SDC_CS_NUM_ANTENNAS=2
And in the initiator settings for two antennas I have this:
const struct bt_le_cs_set_procedure_parameters_param procedure_params = { .config_id = CS_CONFIG_ID, .max_procedure_len = 600, //N*0.625 ms = 375 ms - time to .min_procedure_interval = 100, .max_procedure_interval = 100, .max_procedure_count = 0, .min_subevent_len = 6000, // length of a single subevent in microseconds (6 ms) .max_subevent_len = 8000, .tone_antenna_config_selection = BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A2_B1, .phy = BT_LE_CS_PROCEDURE_PHY_1M, .tx_power_delta = 0x80, .preferred_peer_antenna = BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_2, };
The problem is that when I call
err = bt_le_cs_set_procedure_parameters(connection, &procedure_params);
I get this: (err -12)
I guess this means there is not enough memory available? So, I increased CONFIG_BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE=5600 to the maximum, but it did not help.
How should I correctly configure 2 antennas on the initiator, please?
Thank you.