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

How to set tx_power using sd_ble_gap_tx_power_set() on nrf52832?

Hi everyone,

I want to set TX_POWER using sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV,m_adv_handle,RADIO_TXPOWER_TXPOWER_Pos4dBm);

  m_adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET;

m_adv_handle parameter is wrong passed to the function.

I am refering this link https://devzone.nordicsemi.com/f/nordic-q-a/72412/how-to-set-tx_power-using-sd_ble_gap_tx_power_set-on-nrf52832,

but still problem not solved.

Parents Reply
  • A scanner does not have any way of knowing the exact TX output power used by the broadcaster, unless the broadcaster is including this TX power setting value in its advertising data. 

    You would need dedicated test equipment such as spectrum analyzer if you were to measure the actual output power.

    please tell me exact way to set that properly.

    It will be set correctly if you use the code you posted earlier .

    advertising_init();
    err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_adv_handle,RADIO_TXPOWER_TXPOWER_Pos4dBm);
    APP_ERROR_CHECK(err_code);
    advertising_start();

Children
Related