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

Constant Tx radio power mode

As I understand it, like most modern PHYs the central and the peripheral are exchanging symbols to maintain link integrity and adjust Tx power to maximize battery life.

But is there a way to command the nRF51822 SoftDevice to lock its Tx power to a fixed value? I saw some #defines in the .h file that addresses the memory mapped peripheral that is the radio hardware but I'm sure routines in the SD adjust this often enough that my writes would be overridden.

I need to turn off the usual AGC-based varying Tx power behavior to perform some attenuation tests with my peripheral.

Thank you, Dan

  • The softdevice will not adjust TX power automatically while running. You can set the TX power level used by calling the function sd_ble_gap_tx_power_set(), or get the current level with the corresponding sd_ble_gap_tx_power_get() function. These functions can be called at any time as long as the softdevice is enabled.

    Just for reference, the recommended way to do radio measurements is however to use a constant carrier. This can be set up with either the radio_test_example, for custom UART control, or with ble_app_dtm and a Bluetooth tester of some kind (you can also use nRFgo Studio for this). Both of these give control over the radio in such way so that it's easy to tune the matching network and antenna.

    Edit: Clearly state that the functions can be called at any time.

  • Oh wow. That's not what I expected at all. OK, when exactly should I call this set Tx power function? Prior to sd_ble_gap_adv_start() or when I receive a BLE_GAP_EVT_CONNECTED stack event?

    Thanks for the fast reply, Ole. Dan

  • These functions can be called at any time, either before you've started advertising, while advertising or while in a connection.

    May I ask why you expected differently, and what exactly you did expect?

Related