Max TX power for channel sounding

Hi,

In the example ras_initiator for channel sounding, there is a macro set for maximum TxPower:

const struct bt_le_cs_set_default_settings_param default_settings = {
		.enable_initiator_role = true,
		.enable_reflector_role = false,
		.cs_sync_antenna_selection = BT_LE_CS_ANTENNA_SELECTION_OPT_REPETITIVE,
		.max_tx_power = BT_HCI_OP_LE_CS_MAX_MAX_TX_POWER,
	};

where
#define BT_HCI_OP_LE_CS_MAX_MAX_TX_POWER 20

In the datasheet for nRF54L15, I see that the maximum possible TX power is +8 dBm.

But when I run the example, the log shows TX power: 0 dBm

[00:00:02.301,953] <inf> app_main: CS config creation complete. ID: 0
[00:00:02.501,909] <inf> app_main: CS security enabled.
[00:00:02.752,027] <inf> app_main: CS procedures enabled:
 - config ID: 0
 - antenna configuration index: 0
 - TX power: 0 dbm
 - subevent length: 28198 us
 - subevents per event: 1
 - subevent interval: 0
 - event interval: 2
 - procedure interval: 10
 - procedure count: 0
 - maximum procedure length: 1000

So what is really valid?
What TX power is really used for CS procedures?
How can I set the highest possible TX power for channel sounding on nRF54L15?

Thank you.

Parents
  • Hi, 

    Could you share you bt_le_cs_set_procedure_parameters_param values? While the .max_tx_power shows the maximum power possible, it is the combination of  tx_power_delta and phy in the bt_le_cs_set_procedure_parameters_param that decides the tx_power. To get +8 dB, setting the power delta to 0x7F will generally transmit at maximum TX power as long as the PHY value is equal to the current ACL PHY.

    Regards,
    Amanda H.

  • Hi,

    as Patrcik49 wrote... 
    However, if I set tx_power_delta = 0x7F, I get this output:

    [00:00:01.444,976] <inf> app_main: MTU exchange success (498)
    
    [00:00:01.844,982] <inf> app_main: The discovery procedure succeeded
    
    [00:00:02.095,128] <inf> app_main: CS capability exchange completed.
    
    [00:00:02.245,029] <inf> app_main: CS config creation complete. ID: 0
    
    [00:00:02.444,987] <inf> app_main: CS security enabled.
    
    [00:00:02.594,921] <wrn> bt_cs: Procedure Enable failed with status 0x20
    
    [00:00:02.602,175] <wrn> app_main: CS procedures enable failed. (HCI status 0x20)

    <wrn> app_main: CS procedures enable failed. (HCI status 0x20)

    settings:

    struct bt_le_cs_create_config_params config_params = {
            .id = CS_CONFIG_ID,
            .main_mode_type = BT_CONN_LE_CS_MAIN_MODE_2,
            .sub_mode_type = BT_CONN_LE_CS_SUB_MODE_1,
            .min_main_mode_steps = 2,
            .max_main_mode_steps = 5,
            .main_mode_repetition = 0,
            .mode_0_steps = NUM_MODE_0_STEPS,
            .role = BT_CONN_LE_CS_ROLE_INITIATOR,
            .rtt_type = BT_CONN_LE_CS_RTT_TYPE_AA_ONLY,
            .cs_sync_phy = BT_CONN_LE_CS_SYNC_1M_PHY,
            .channel_map_repetition = 3,
            .channel_selection_type = BT_CONN_LE_CS_CHSEL_TYPE_3B,
            .ch3c_shape = BT_CONN_LE_CS_CH3C_SHAPE_HAT,
            .ch3c_jump = 2,
        };
        
        const struct bt_le_cs_set_procedure_parameters_param procedure_params = {
    		.config_id = CS_CONFIG_ID,
    		.max_procedure_len = 1000,
    		.min_procedure_interval = 10,
    		.max_procedure_interval = 10,
    		.max_procedure_count = 0,
    		.min_subevent_len = 60000,
    		.max_subevent_len = 60000,
    		.tone_antenna_config_selection = BT_LE_CS_TONE_ANTENNA_CONFIGURATION_A1_B1,
    		.phy = BT_LE_CS_PROCEDURE_PHY_1M,
    		.tx_power_delta = 0x7F,  
    		.preferred_peer_antenna = BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_1,
    		.snr_control_initiator = BT_LE_CS_SNR_CONTROL_NOT_USED,
    		.snr_control_reflector = BT_LE_CS_SNR_CONTROL_NOT_USED,
    	};

     

    Thank you.

    Jan

  • Hi, 

    Zephyr prefers to use 2M whenever it can, so it carries out the PHY update procedure as soon as a connection is established. You get CS procedures enable failed. (HCI status 0x20) because the link is using 2M PHY, whereas you've tried to control the TX power on 1M PHY. To get it to work, here are some possible solutions:

    • set BT_LE_CS_PROCEDURE_PHY_2M in bt_le_cs_set_procedure_parameters_param 
    • call bt_le_set_phy() to change the connection PHY to 1M when appropriate
    • set CONFIG_BT_AUTO_PHY_UPDATE=n to disable automatic switching to 2M 

    -Amanda H.

  • I am very sorry, but I do not understand how to do this.
    I took the clean code from the example channel_sounding_ras_initiator and changed:

    • .cs_sync_phy = BT_CONN_LE_CS_SYNC_2M_PHY in config_params

    • .phy = BT_LE_CS_PROCEDURE_PHY_2M in procedure_params

    • .tx_power_delta = 0x7f

    It is great that the error CS procedure enable failed no longer happens, but the TX power is still 0 dBm - nothing has changed:

    [00:00:02.755,636] <inf> app_main: CS procedures enabled:
     - config ID: 0
     - antenna configuration index: 0
     - TX power: 0 dBm
     - subevent length: 25282 us
     - subevents per event: 1
     - subevent interval: 0
     - event interval: 2
     - procedure interval: 10
     - procedure count: 0
     - maximum procedure length: 1000


    Also I have tried to call bt_le_set_phy after connecting to change the PHY to 1M with CONFIG_BT_AUTO_PHY_UPDATE=n, but even this did not help.

  • I tried to set Tx power 8 dBm on the reflector and now in the LOG I can see +8 dBm

    <inf> app_main: CS procedures enabled:
     - config ID: 0
     - antenna configuration index: 0
     - TX power: +8 dBm

    This +8 dBm is valid for refelctor and also initiator? 

  • The log indicates the TX power on that device, your reflector.

  • Amanda, I'm even more confused -> I don't think you're right, but please correct me if I'm wrong.

    To clarify, I'm using pure examples of ras_initiator and reflector. You surely know that reflector doesn't have this CS procedure LOG output at all – it outputs something slightly different when running the CS procedure. Basically, the +8dBm listing is logged from the initiator device, and I ask again: is this the power for the CS procedure, meaning that both sides must use this power, or can each side use a different power?

    Another thing is that what you advised me last time regarding the +8 dBm setting did not work. Does it work for you? If so, can you share the code?

    The goal is to have the full power that nrf54L15 supports on both the initiator and the reflector.

Reply
  • Amanda, I'm even more confused -> I don't think you're right, but please correct me if I'm wrong.

    To clarify, I'm using pure examples of ras_initiator and reflector. You surely know that reflector doesn't have this CS procedure LOG output at all – it outputs something slightly different when running the CS procedure. Basically, the +8dBm listing is logged from the initiator device, and I ask again: is this the power for the CS procedure, meaning that both sides must use this power, or can each side use a different power?

    Another thing is that what you advised me last time regarding the +8 dBm setting did not work. Does it work for you? If so, can you share the code?

    The goal is to have the full power that nrf54L15 supports on both the initiator and the reflector.

Children
Related