Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Just Set Tx Power?

I just want to globally set the power level, and forget about it.

I have seen this post, and it still seems unclear how to do this - or if it's even possible.

Is there a way that I can simply set this once at startup, and then it will never change - whether advertising, or connected, or whatever?

If so, how?

Peripheral and Central.

Not Mesh.

nRF52 SDK 15.0.0 SoftDevices S112 (Peripheral) and S132 (Central).

Parents
  • Hi,

    The sd_ble_gap_tx_power_set() function was updated in version 6.0.0 of the SoftDevices, and now allows you to set the TX power per connection. This does not mean that you have to set it per connection, though.

    As a peripheral, any connection inherits the TX power that was set for the advertising role (BLE_GAP_TX_POWER_ROLE_ADV), so you only need to set it once before the first connection is made to get the same behavior as before. For the central it is the same, you only need to set it once with the scanner/initiator role (BLE_GAP_TX_POWER_ROLE_SCAN_INIT), and then this is used for the connection as well unless you make a new call to sd_ble_gap_tx_power_set() with the BLE_GAP_TX_POWER_ROLE_CONN and a connection handle.

Reply
  • Hi,

    The sd_ble_gap_tx_power_set() function was updated in version 6.0.0 of the SoftDevices, and now allows you to set the TX power per connection. This does not mean that you have to set it per connection, though.

    As a peripheral, any connection inherits the TX power that was set for the advertising role (BLE_GAP_TX_POWER_ROLE_ADV), so you only need to set it once before the first connection is made to get the same behavior as before. For the central it is the same, you only need to set it once with the scanner/initiator role (BLE_GAP_TX_POWER_ROLE_SCAN_INIT), and then this is used for the connection as well unless you make a new call to sd_ble_gap_tx_power_set() with the BLE_GAP_TX_POWER_ROLE_CONN and a connection handle.

Children
Related