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

Set tx power based on scanned rssi

Hey, I would love some guidance on this:

1. I have one NRF52840 advertising constantly at 8dbm, this device is connected to power so it's hard coded to the maximum transfer power.

2. I have another battery powered NRF52840  that will occasionally scan for the device above. I want this device to be able to set its tx power to the minimum necessary to have a good link, based on the measured rssi of the advertising device, as to save battery.

I'm already scanning and logging the rssi values in BLE_GAP_EVT_ADV_REPORT, and can call sd_ble_gap_tx_power_set to set the power level. I would just love some guidance on what power level to set for what rssi range, hopefully there's some physics math involved here that I can't seem to find in google that I can mostly follow?

  • If I am not reading this wrong, you are setting the tx_power of the scanner which is inversely proportional to the incoming signal strength of the ADV packet? I do not think that there is any complex math needed for this, and the inverse relation holds good. I guess what you are looking for is the numbers to map the incoming RSSI to scanner tx_power. There is no correct answer for this, since this is you as a designer who decides this as to how reliable transmission you need from the scanner and if the system could still survive if the advertiser missed to get response from the scanner.

Related