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

How to Modify BLE TX Power for Advertisment (SDK v11.0.0 nRF52832)

Hello,

I'm currently using the nRF52832 chips with SDK11.0.0 and s132. I'm currently trying to modify the TX power level for advertisement. I'm seeing many ways that I could potentially modify the TX power, but would like to know the most straight-forward approach. For instance, do I attempt to call "sd_ble_gap_tx_power_set()" or "ble_tps_tx_power_level_set()"? Perhaps within "advertising_init()", I manually set: 

advdata.p_tx_power_level   = <pointer to some int8_t value>;       ?

Also, are the valid values only: 

"@param[in] tx_power Radio transmit power in dBm (accepted values are -40, -30, -20, -16, -12, -8, -4, 0, and 4 dBm). "   ?

Thanks!

Parents
  • The TPS service is so the central device can read and control Tx power in a connected device. So, not what you want.

    You want sd_ble_gap_tx_power_set which sets the power level of the actual device.  Allowable values are as you stated above and will be reiterated in the API reference manual. Default is 0dBm.

    Just make sure you make the API call after you start the SD. You can call that as often as you wish without having to start/stop advertising.

    As you noted, you should be able to change the default on the init struct, but I haven't had need to do and or look into that.  I've always used the API.

Reply
  • The TPS service is so the central device can read and control Tx power in a connected device. So, not what you want.

    You want sd_ble_gap_tx_power_set which sets the power level of the actual device.  Allowable values are as you stated above and will be reiterated in the API reference manual. Default is 0dBm.

    Just make sure you make the API call after you start the SD. You can call that as often as you wish without having to start/stop advertising.

    As you noted, you should be able to change the default on the init struct, but I haven't had need to do and or look into that.  I've always used the API.

Children
No Data
Related