Channel sounding - 2 antennas configuration

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.

Parents
  • Hi, 

    There's no need to change CONFIG_BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE for this.

    Based on the error code they got it looks like the controller returned BT_HCI_ERR_INSUFFICIENT_RESOURCES (0xD). This happens because the parameters aren't supported:

     

    7.8.140 LE CS Set Procedure Parameters command

     

    If the Host issues this command with parameters that exceed the CS capabilities or
    any coexistence constraints, then the Controller shall return the error code Connection
    Rejected Due to Limited Resources (0x0D).

     

    I suspect the problem is CONFIG_BT_CTLR_SDC_CS_MAX_ANTENNA_PATHS=2 was set only on the initiator side and not the reflector

    Regards,
    Amanda H.

Reply
  • Hi, 

    There's no need to change CONFIG_BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE for this.

    Based on the error code they got it looks like the controller returned BT_HCI_ERR_INSUFFICIENT_RESOURCES (0xD). This happens because the parameters aren't supported:

     

    7.8.140 LE CS Set Procedure Parameters command

     

    If the Host issues this command with parameters that exceed the CS capabilities or
    any coexistence constraints, then the Controller shall return the error code Connection
    Rejected Due to Limited Resources (0x0D).

     

    I suspect the problem is CONFIG_BT_CTLR_SDC_CS_MAX_ANTENNA_PATHS=2 was set only on the initiator side and not the reflector

    Regards,
    Amanda H.

Children
No Data
Related