I am working on a Bluetooth Low Indoor Positioning System and have been using the https://github.com/inthepocket/ibeacon-scanner-android repository to calculate RSSI values between my mobile device and multiple BLE beacons.
I was looking through the "ibeacon-scanner-android" repository to understand exactly how RSSI was calculated since different papers point to different versions of the log-normal model when calculating the RSSI value. Perusing the source code, it appears that the team is using the android.bluetooth.le package.
However, I could not find the "method" that contains the code for calculating the "rssi" values in the android. bluetooth.le package. I would like to see what equation the authors of android. bluetooth.le used to compute the RSSI value and what constants did they consider.
Where or how do I find the exact "method" that calculates the RSSI value in the android.bluetooth.le package?
As both M. Kotzjan and Emil mentioned, this comes directly from the hardware. From the Bluetooth Specification, v5.2, Vol 4, Part E, Section 7.7.65.2 (LE Advertising Report Event):-
The advertising report above comes directly from the Bluetooth chip (hardware) and as can be seen, it includes the RSSI, the address, the data, in addition to other parameters. The Android Bluetooth stack (Fluoride) then reads this data from the hardware and exposes it to the Android OS. How this data is read on the hardware level depends on the hardware used and is not public information.