Search code examples
androidgeolocationbluetooth-lowenergy

How does ReadRemoteRssi() works


I am using BLE beacons for indoor geolocalization puropses. As we all know, RSSI values are never accurate, but still I am trying to enhance my application. So, what i would like to know is how does Android calculate the RSSI? and how often?

I found this article but im not sure if it is what is used or not.. and how accurate it is.


Solution

  • First, Android doesn't calculate RSSI, it receives the values from the BLE chipset. Everytime an (advertising) packet is received the chipset provides an estimation of the signalstrength as RSSI value. How often you can obtain a value depends.

    If you scan for advertising packets that provide RSSI, the advertising interval of the device is the main factor. Probably this is the case as beacons are often only broadcasters.

    The method readRemoteRssi() is used if you are connected to a device. How often you call this method basically determines the update speed of your RSSI readings, but there are also device connection parameters involved. For example, the connection interval specifies the data exchange interval between central and peripheral before going back to idle state to save power. This setting might have a value between 7.5ms and 4s.