3

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?

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
  • 2
    I always assumed the RSSI to come from the hardware. I looked through the source code at https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/le and could only find 4 files that contain a mention of RSSI: PeriodicAdvertisingReport, ScanRecord, ScanResult and ScanSettings. None of these contain a calculation of the RSSI. Both ScanResult and PeriodicAdvertisingReport read the RSSI from a received parcel (https://developer.android.com/reference/android/os/Parcel) – Michael Kotzjan Apr 26 '21 at 05:00
  • 4
    It's a raw value coming directly from the radio hardware, measured in dBm. – Emil Apr 26 '21 at 08:02
  • Thank you very much M.Kotzjan and Emil. – Azmyin Md. Kamal Apr 29 '21 at 14:35

1 Answers1

2

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):-

enter image description here

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.

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
  • Thank you very much, @Youssif Saeed, I was afraid of this possibility. I will refer to this documentation in my report as a potential drawback of Android-based BLE Indoor Positioning System. – Azmyin Md. Kamal Apr 29 '21 at 14:32