NCS Mesh: TX Power register value does not change when changing TX Power via HCI

I am trying to control TX Power of Mesh using sample code from here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/bluetooth/hci_pwr_ctrl/README.html

I call set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV, 0(int8_t) 4);

Function does not return with error, however value in TXPOWER register does not change.

Calling get_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV, 0, &tx_power); afterwards, returns expected value of 4.

Chip nRF52832.

prj.conf contains the following settings which might be related to issue:

CONFIG_BT_OBSERVER=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SETTINGS=y
CONFIG_BT_LL_SOFTDEVICE=n
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
CONFIG_BT_EXT_ADV=n
Mesh is also enabled and communication functions properly.

Could you please advice what can be wrong?

Parents Reply
  • Ok, for Mesh seems that both have to be set:

    set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_ADV0(int8_t4);

    set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_SCAN, 0, (int8_t) 4);

    There is no description on these handle types in code, can you please add some comment why both needs to be set?

    And second question is about Extended Advertising, when we enable it will each advertising set use same TX Power or I have to configure each separately, if yes how you would suggest to do it?

    Thanks in advance.

Children
Related