This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to change transmitting power ?

Hello, I am using pca10028 dk. I want to know how can I change the transmitting power of ble? My application needs that user should be able to change the transmitting power through app. So how should I proceed? I am using sdk 12.2.2 and I am referring code ble_app_gls.

Screen shots are Screenshot_20170301-115100.png

Screenshot_20170301-115123.png

Screenshot_20170301-115113.png

Screenshot_20170301-115602.png

Screenshot_20170301-115358.png

Thanks, Shailav

Parents Reply
  • If you take a look at the Tx power service at BLE SIG, you can see that by default only read is supported, this is also how it's implemented in the SDK. So in order to set the Tx-power from the app, you will have to set the write permission on the Tx-power characteristic, and implement the desired behavior in ble_tps.c. Set-up the characteristic to support write in the function tx_power_level_char_add(), add the case BLE_GATTS_EVT_WRITE in ble_tps_on_ble_evt(), where you call the function on_write(p_tps, p_ble_evt). Implement the desired behavior in your on_write() function(e.g. set the tx power with sd_ble_gap_tx_power_set()).

Children
No Data
Related