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

Set TX power on an NRF52833

Hi,

I try to set the TX power of the NRF52833 to the maximum possible power level, but somehow nothing seems to affect it.

I first tried to change it in the sdk_config.h from 0dBm to +4dBm, but it seems not to affect it. Then I discovered, that the default

signal strength from radio_config.h is RADIO_POWER_NRF_0DBM, so I replaced it everywhere with RADIO_POWER_NRF_POS8DBM,

but also this did not affect the power level when measured with a mobile phone. 

I have two questions now:

  • How can I properly adjust the power level to constant maximum power?
  • How it comes the NRF52833 has +8dBm, but this seems not adjustable from the sdk_config.h?

Kind Regards,

Sebastian

  • Hi Sebastian

    To set the TX power level, you have to call the function "sd_ble_gap_tx_power_set(), which is defined in ble_gap.h. If you're using SoftDevice S140, there should not be any issues setting the TX power to 8dBm here. You can check out the ble_app_proximity example to see how it is used in a main.c file.

    Best regards,

    Simon

  • Hi Simon,

    Thank you for your response. Im using S113, which is used for the example for the nRF52833. How can I switch the examples to the S140? Just replace the core files?

    Further, sd_ble_gap_tx_power_set() has a handle for Advertising and Connection. For Advertising I could achieve the tx power level switch, but I don't see where I should adjust the connection, since I dont have a connection handle except in mesh_gatt.c, but this handle comes only from an event.

  • Am I right with the assumption, that when I set the advertiser TX power level "sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_adv_handle, power_level)", it will automatically set the power level also for connection, since in ble_gap.h is a note: @note When a connection is created it will inherit the transmit power from the initiator or advertiser leading to the connection.

  • Hi Sebastian

    You can check out the verified answer in this case, where it's explained how to set the TX power after a connection. When a connection is created, the advertiser (peripheral) will inherit the TX power used when advertising. so if you always want to use 8dBm for example, you only have to set this when advertising, so yes, you're correct!

    Best regards,

    Simon

Related