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

how to read tx power level after reconfig it?

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!

Parents
  • 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

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

Children
Related