channel sounding

Dear Technical Support Team,
I have recently been developing with the nRF54L15-DK development board, using the official channel_sounding/cs_test example provided by Nordic.
Normal communication works only when I configure Main_mode = mode_2 and Sub_mode = mode_1.
All other mode combinations result in errors, as listed below:
  • Configuring Main_mode = mode_2, Sub_mode = none → returns err-22 (EINVAL)
  • Configuring Main_mode = mode_1, Sub_mode = none → returns err-22 (EINVAL)
  • Configuring Main_mode = mode_3, Sub_mode = none → returns err-22 (EINVAL)
  • Configuring Main_mode = mode_2, Sub_mode = mode_3 → returns err-5 (EIO)
  • Configuring Main_mode = mode_3, Sub_mode = mode_2 → returns err-5 (EIO)
Parents
  • Hi,

    One issue might be setting BT_CONN_LE_CS_SUB_MODE_UNUSED in combination with also setting the override_config bit of 2, and the controller rejecting that. Please try not setting the bit 2. (params.override_config = BIT(5);)

    Another issue might be if you try to use step mode 3 (e.g. params.main_mode = BT_CONN_LE_CS_MAIN_MODE_3) without having enabled the necessary controller support (If so, fix that by enabling support in the controller with CONFIG_BT_CTLR_SDC_CS_STEP_MODE3=y).

    Also, what version of nRF Connect SDK are you using?

    Regards,
    Terje

  • Hi Terje

    Thank you for your help. My version is: *** Booting nRF Connect SDK v3.0.2- ****** Using

        struct bt_le_cs_test_param params;
    
    	params.role = role;
    	params.main_mode = BT_CONN_LE_CS_MAIN_MODE_1;
    	params.sub_mode = BT_CONN_LE_CS_SUB_MODE_UNUSED;
    	params.main_mode_repetition = 1;
    	params.mode_0_steps = 3;
    	params.rtt_type = BT_CONN_LE_CS_RTT_TYPE_32_BIT_SOUNDING;
    	params.cs_sync_phy = BT_CONN_LE_CS_SYNC_1M_PHY;
    	params.cs_sync_antenna_selection = BT_LE_CS_TEST_CS_SYNC_ANTENNA_SELECTION_ONE;
    	params.subevent_len = 5000;
    	params.subevent_interval = 0;
    	params.max_num_subevents = 1;
    	params.transmit_power_level = BT_HCI_OP_LE_CS_TEST_MAXIMIZE_TX_POWER;
    	params.t_ip1_time = 145;
    	params.t_ip2_time = 145;
    	params.t_fcs_time = 150;
    	params.t_pm_time = 40;
    	params.t_sw_time = 0;
    	params.tone_antenna_config_selection = BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A1_B1;
    	params.initiator_snr_control = BT_LE_CS_SNR_CONTROL_NOT_USED;
    	params.reflector_snr_control = BT_LE_CS_SNR_CONTROL_NOT_USED;
    	params.drbg_nonce = 0x1234;
    
    	params.override_config = BIT(5) | BIT(6) | BIT(7);
    	params.override_config_0.channel_map_repetition = 1;
    
    	memset(params.override_config_0.not_set.channel_map, 0, 10);
    	for (uint8_t i = 40; i < 75; i++) {
    		BT_LE_CS_CHANNEL_BIT_SET_VAL(params.override_config_0.not_set.channel_map, i, 1);
    	}
    
    	params.override_config_0.not_set.channel_selection_type = BT_CONN_LE_CS_CHSEL_TYPE_3B;
    	params.override_config_0.not_set.ch3c_shape = BT_CONN_LE_CS_CH3C_SHAPE_HAT;
    	params.override_config_0.not_set.ch3c_jump = 2;
    	params.override_config_5.cs_sync_aa_initiator = INITIATOR_ACCESS_ADDRESS;
    	params.override_config_5.cs_sync_aa_reflector = REFLECTOR_ACCESS_ADDRESS;
    	params.override_config_6.ss_marker1_position = 12;
    	params.override_config_7.ss_marker_value = 3;
    
    	return params;
    Zephyr OS v4.0.99- ***
    The issue has been successfully resolved. However, I have encountered a new problem. Regarding the CS_SYNC frame format for Mode-1 or Mode-3, an error occurs when I attempt to set BT_CONN_LE_CS_RTT_TYPE_32_BIT_SOUNDING and BT_CONN_LE_CS_RTT_TYPE_96_BIT_SOUNDING, returns err-22 (EINVAL). In contrast, communication works normally when configuring other RTT types, including AA_ONLY, 32_BIT_RANDOM, 64_BIT_RANDOM, 96_BIT_RANDOM, and 128_BIT_RANDOM.

Reply
  • Hi Terje

    Thank you for your help. My version is: *** Booting nRF Connect SDK v3.0.2- ****** Using

        struct bt_le_cs_test_param params;
    
    	params.role = role;
    	params.main_mode = BT_CONN_LE_CS_MAIN_MODE_1;
    	params.sub_mode = BT_CONN_LE_CS_SUB_MODE_UNUSED;
    	params.main_mode_repetition = 1;
    	params.mode_0_steps = 3;
    	params.rtt_type = BT_CONN_LE_CS_RTT_TYPE_32_BIT_SOUNDING;
    	params.cs_sync_phy = BT_CONN_LE_CS_SYNC_1M_PHY;
    	params.cs_sync_antenna_selection = BT_LE_CS_TEST_CS_SYNC_ANTENNA_SELECTION_ONE;
    	params.subevent_len = 5000;
    	params.subevent_interval = 0;
    	params.max_num_subevents = 1;
    	params.transmit_power_level = BT_HCI_OP_LE_CS_TEST_MAXIMIZE_TX_POWER;
    	params.t_ip1_time = 145;
    	params.t_ip2_time = 145;
    	params.t_fcs_time = 150;
    	params.t_pm_time = 40;
    	params.t_sw_time = 0;
    	params.tone_antenna_config_selection = BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A1_B1;
    	params.initiator_snr_control = BT_LE_CS_SNR_CONTROL_NOT_USED;
    	params.reflector_snr_control = BT_LE_CS_SNR_CONTROL_NOT_USED;
    	params.drbg_nonce = 0x1234;
    
    	params.override_config = BIT(5) | BIT(6) | BIT(7);
    	params.override_config_0.channel_map_repetition = 1;
    
    	memset(params.override_config_0.not_set.channel_map, 0, 10);
    	for (uint8_t i = 40; i < 75; i++) {
    		BT_LE_CS_CHANNEL_BIT_SET_VAL(params.override_config_0.not_set.channel_map, i, 1);
    	}
    
    	params.override_config_0.not_set.channel_selection_type = BT_CONN_LE_CS_CHSEL_TYPE_3B;
    	params.override_config_0.not_set.ch3c_shape = BT_CONN_LE_CS_CH3C_SHAPE_HAT;
    	params.override_config_0.not_set.ch3c_jump = 2;
    	params.override_config_5.cs_sync_aa_initiator = INITIATOR_ACCESS_ADDRESS;
    	params.override_config_5.cs_sync_aa_reflector = REFLECTOR_ACCESS_ADDRESS;
    	params.override_config_6.ss_marker1_position = 12;
    	params.override_config_7.ss_marker_value = 3;
    
    	return params;
    Zephyr OS v4.0.99- ***
    The issue has been successfully resolved. However, I have encountered a new problem. Regarding the CS_SYNC frame format for Mode-1 or Mode-3, an error occurs when I attempt to set BT_CONN_LE_CS_RTT_TYPE_32_BIT_SOUNDING and BT_CONN_LE_CS_RTT_TYPE_96_BIT_SOUNDING, returns err-22 (EINVAL). In contrast, communication works normally when configuring other RTT types, including AA_ONLY, 32_BIT_RANDOM, 64_BIT_RANDOM, 96_BIT_RANDOM, and 128_BIT_RANDOM.

Children
  • Hi,

    In general, EINVAL means invalid parameters, which means the parameter combination that you use is not supported. It may be not supported by the stack, or you may lack the proper configuration of the stack for supporting it, or it may not be valid from the specification point of view.

    In this case, RTT with Sounding Sequence is not supported by our stack.

    For future experimentation, please see Supported capabilities for what is supported and not, and try only the settings for which we claim support.

    If something returns error which we claim to support, then please check if you find a kconfig for any functionality involved, through use of the Kconfig search.

    Regards,
    Terje

Related