Hi,all. i want to set tx power use interface "ble_tps_tx_power_level_set",and read back tx power level used tps servoce on my phone.how to do that ?Thanks for your reply!
Hi,all. i want to set tx power use interface "ble_tps_tx_power_level_set",and read back tx power level used tps servoce on my phone.how to do that ?Thanks for your reply!
Hi,
It is not possible to read TX power of the transmitter from the receiver side, you can however estimate it with an RSSI measurement.
If you want to send your power level as information over the air you can do something like this pseudocode:
uint32_t tx_power = 0;
uint32_t err_code = NRF_SUCCESS;
err_code = ble_tps_tx_power_level_set(ble_tps_t* p_tps, int8_t tx_power_level)
APP_ERROR_CHECK(err_code)
if(err_code == NRF_SUCCESS)
{
tx_power = xxx; //Some number
}
Then you can send that value over BLE.
Best regards,
Øyvind
i want to do this: first,change tx power from -4db to 0db use ble_tps_tx_power_level_set on my BLE device.And then,how to notify my phone? it should display 0db not -4db.
i want to do this: first,change tx power from -4db to 0db use ble_tps_tx_power_level_set on my BLE device.And then,how to notify my phone? it should display 0db not -4db.