This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Tx Power using SoftDevices S140 nrf52840

Hi,

I am using SD calls to start an advertisement of BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED :

          sd_ble_gap_adv_start(m_adv_handle, APP_BLE_CONN_CFG_TAG);

The call to set TX power:

err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV ,  m_adv_handle, POS_08dBm);

m_adv_handle is BLE_GAP_ADV_SET_HANDLE_NOT_SET,

It seems that tx power is set not.

Questions:

1.  how to create a valid handle of m_adv_handle for the call through S140 SD?

2. If NULL handle, can be used, how to set tx power correctly?

Thank You,

David Zhou

Related