0

I created a small test android app to do a scan of the surrounding wifi networks.

When I run the app on my galaxy nexus( jellybean) the result returns:

( SSID, BSSID, Capabilities, level, timestamp). 

However when I run the same app on my Nexus 5( KitKat) the result returns:

( SSID, BSSID, Capabilities, level, timestamp, distance (cm), distanceSd(cm) ).

I can't seem to find anything about distance in the android WiFi API documentation. Does anyone know whats going on ???

joao2fast4u
  • 6,868
  • 5
  • 28
  • 42
Sadiq A
  • 36
  • 3

2 Answers2

0

If you check the ScanResult.java source code here, you can verify that in one of the ScanResult constructors, there are int distCm and int distSdCm parameters, for distance (cm) and distanceSd(cm), respectively.

joao2fast4u
  • 6,868
  • 5
  • 28
  • 42
0

Well noticed !

Android is probably already updating its API to a new revision on IEEE 802.11.

There is a new update to provide indoor positioning using TriLateration. This new feature adds a timestamp on the package called Fine Timing Measurement (FTM), providing the capability to estimate the distance from an AP to a receiver.

If you want more info, you should search for IEEE 802.11 REVmc:

http://www.ieee802.org/11/Reports/802.11_Timelines.htm

Eduardo Briguenti Vieira
  • 4,351
  • 3
  • 37
  • 49
  • It seems the values are never populated as they are always "?(cm)" or -1, and the fields are not exposed, so I assume this has not been implemented yet. I'm testing on a Pixel 2. – Jesse Skrivseth Mar 29 '18 at 17:53