This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Set "TX Power" of nRF52833, using Zephyr

Hi

As mentioned in this question: https://devzone.nordicsemi.com/f/nordic-q-a/69533/set-tx-power-on-zephyr-device , there is a sample to change the tx power using some HCI commands. But when "extended advertising" has enabled, the approach that has used in the above example doesn't work. For example it is not possible to change the tx power of this example: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direction_finding_connectionless_tx/README.html

I found that on each system tick, the tx power is updated:

zephyr/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_aux.c

static int prepare_cb(struct lll_prepare_param *p)
{
...
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
	radio_tx_power_set(lll->tx_pwr_lvl);
#else
	radio_tx_power_set(RADIO_TXP_DEFAULT);
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */
...
}

But I can't find any method to update the "lll->tx_pwr_lvl" variable outside of this function. Always it uses the default value that has been set by kconfig. Is there any way to update "TX Power" when extended adverting is enabled?

Related