The txPower field is supposed to be the expected signal strength in dBm at 1 meter. Every Android phone model has a slightly different BLE transmitter output power, typically measuring from -50 dBm to -70 dBm at 1 meter.
Unfortunately there is no good way to get the proper value to use for a specific Android device model unless you measure this yourself. Android has no built-in APIs to get this, and I have never seen any published specs from phone manufacturers.
There has been renewed interest in this subject as teams develop contact tracing apps. I actually went out in a field last weekend to measure the transmitter output power of a number of devices I had handy. The Google Pixel 3a, for example, I measured -60 dBm.
If you want to take your own measurements to help in this effort, I suggest this procedure:
- Go to an open area several meters away from any obstructions, particularly metal ones.
- Elevate the phone transmitter on a non-metal object at least one meter off the ground. The phone should be placed on end so the screen is perpindicular to the ground. (I used a camera tripod.)
- Run an app that transmits a beacon at full power on the phone on the tripod.
- Hold a reference phone (preferably an iPhone SE 1st Generation or old iPhone 4-5s) on meter away so that both screens are facing the same direction.
- Do a "calibration" in a beacon app like Locate Beacon to get the average RSSI over ~30 seconds.
- If the phone used to do the measurement is not one of the above reference models, you will need to adjust for that phone's receiver sensitivity. The spreadsheet I shared has an example of how to do that for the Pixel 3a measuring the iPhone SE. This part can be tricky as you need one other phone with a known sensitivity or transmitter power output.
Here's my spreadsheet with the calculations: https://docs.google.com/spreadsheets/d/1-voNJAeHz78AarZmfds8WiplNhUDzeYrsW0YzKfrExU/edit?usp=sharing
I also wrote a blog post that touches on the problem of the lack of a good data set, and tells you more than you ever wanted to know about beacon ranging.