[nRF Connect SDK](Urgent) How to fix Tx power?

Target nRF52832(nrf52dk_nrf52832)
SDK NCS v2.0.0
My project base: \nrf\samples\bluetooth\peripheral_hids_keyboard

Hello.
I want to increase Tx power for test. I already review sample(zephyr/samples/bluetooth/hci_pwr_ctrl) and I found it looks working in log.
I try to put changes into my project; however, it works at first time only.
I disconnect and connect again; I lose my pairing. I could connect again until BLE power off and on.
Can I fix my Tx power using CONFIX_XXX? Or how can fix it?

// main.c
static void set_tx_power(uint8_t handle_type, uint16_t handle, int8_t tx_pwr_lvl)
{
...
}

static void connected(struct bt_conn *conn, uint8_t err)
{
...
set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_CONN, default_conn_handle, 4);
}


Prj.conf
#Tx
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_CONN_RSSI=y
CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y


Parents Reply Children
No Data
Related