You provide the positions of three or more Wi-Fi access points (APs) and it will dynamically indicate — by way of a red blob on a floorplan — where it thinks you are.
Note that only the locations of the Wi-Fi APs are needed (no “learning”, “training” or “fingerprinting”).
Above screenshots:
(a) Small house (8 m x 12 m);
(b) Large house (3 APs);
(c) Big box store (82 m x 108 m) (20 APs);
(d) Large condo complex (illustrating outdoor use).
The
FTMRTT
app can be used whether the Wi-Fi APs advertize support
for the FTM RTT protocol in their Wi-Fi beacon frames or not.
Further, the FTMRTT app can be used
even with uncooperative APs (those not supporting the protocol)
using one-sided RTT measurements (although with somewhat reduced accuracy).
For more details about the IEEE 802.11-2016
(a.k.a. IEEE 802.11mc or FTM RTT or WiFi RTT)
Wi-Fi protocol for “Fine Time Measurement” (FTM) “Round Trip
Time” (RTT)
see
“Indoor positioning using time of flight with respect to WiFi access points".
Check out
sample videos of FTMRTT in action
and read
papers reporting on research done with
FTMRTT.
Many Wi-Fi access points and phones provide support for FTM RTT range finding
— e.g. Google Wi-Fi APs and Google Pixel phones.
See AP FTM RTT support
for a list of APs that support two-sided FTM-RTT. See
phone FTM RTT support for a list of phones,
as well as retail, warehousing and distribution center devices that support two-sided FTM-RTT.
Recently "enterprise level" access points have started to
support FTM RTT as well (when enabled in the system).
See e.g.
HPE / Aruba "Self-Locating Wireless Access Points"
and
CISCO / Meraki
"Set Up Access Point Auto Location".
By the way, it is possible for APs to provide location information
themselves, but few do so.
Presently, Compulab
Wi-Fi Indoor Location Device (WILD) can do this
using -lci=... and -civic=... lines in the hostapd.conf file.
Recently, Aruba's Open Locate initiative has made location
information available in their latest APs. See
Self-locating Wireless Access Points.
So, at some point, it won't be necessary to provide this information in the responders file.
Setting up FTMRTT - inputs
FTMRTT reads three files (two of which are optional):
Sample responders.json file:
{ "APS" : [
{ "BSSID" : "a8:bd:27:28:5d:d0", "cartesian" : [11.2, 3.6, 2.5] },
{ "BSSID" : "a8:bd:27:29:c9:10", "cartesian" : [16.1, 14.1, 2.5] },
{ "BSSID" : "20:a6:cd:23:2d:50", "cartesian" : [5.5, 2.7, 2.5] }
]
}
An elaborate example (for many more APs) may be found at
responders.json
.
(Note: The sample file makes use of some convenient extensions,
such as C-style comments, supported by the Android JSON parser).
Sample boundingbox.json file:
{ "bbox" : [-4.7, -2.7, 18.6, 15.1 ],
"floorheight" : [ 0, 2.6 ]
}
A more detailed example may be found at
boundingbox.json
.
(By the way, the lower left corner of the bounding box need not be at [ 0, 0 ] and coordinates need not be positive).
Output (on screen)
The on-screen output shows a red “heat map” of the
probabilities of the user being in various positions
(see samples above).
The reddest spot is the most likely position,
while the centroid of the red blob is the expected value of the position.
If a floorplan is provided, this will be shown as background.
The locations of the access points are shown as well — color coded:
an AP providing ranging information is green,
an AP being interrogated but currently not providing ranging information is magenta.
Optionally some additional information (RTT distance, st dev,
signal level, last few digits of the BSSID)
can be shown next to the graphic indicating an AP
(see first two sample screenshots above).
Optionally, for each AP, the annulus of currently most likely
positions for the user equipment (UE) can be overlaid (see menu features below):
The advantage of the file picker is that files can be anywhere,
and have any name (just remember the sequence in which they are
requested: floorplans, boundingbox, responders).
One disadvantage of the file picker is that one has to interact
with it every time the app is launched.
For this to work, certain permissions and default settings may be needed:
On the phone, in “Settings > System > Advanced” select
“Developer Options”.
Then, under “Debugging”, enable “USB debugging”.
Further, under “Networking”, click “Default USB
configuration” and select “File transfer / Android Auto”
(Exact details depend on which version of Android is installed on the phone);
Another subfolder called “crash” is where, should the app crash, a dump is written in plain text format.
Both “log” and “crash” files can be useful for tracking down bugs.
These files can be accesses via USB link, as above, or via ADB.
For example:
File locations (input)
The files can be specified interactively using a “file picker”.
Alternatively, the input file(s) can reside in a fixed location, and
be read automatically when starting.
The “File Picker” check box in the
“more menu” (⋮) controls whether the file picker is used or not.
(
"<your...PC>\<your...phone>\Internal shared
storage\Android\data\com.welwitschia.ftmrtt\files".
Alternatively, one can use the Android Debug Bridge (ADB), e.g.
adb push responders.json
/sdcard/Android/data/com.welwitschia.ftmrtt/files
Note: ADB comes with AndroidStudio, but can be installed separately.
Files (output)
The FTMRTT app folder on the phone may have subfolders.
One subfolder, called “log”, contains log files (plain text format)
that optionally can be written by the app continuously recording its state
(basically a record of what is normally sent to
“logcat
”).
Log file recording can be toggled on and off using the
blue double up arrow
in the action bar.
adb pull /sdcard/Android/data/com.welwitschia.ftmrtt/files/log
Trouble Shooting
Sadly, it is easy to produce a JSON file that can not be understood
by the built-in parser (e.g. an extra comma and the end of a JSON array).
FTMRTT catches and fixes a few of the more obvious problems automatically.
Some other errors result in on-screen messages
(“toasts”).
More subtle problems, that may or may not affect the overall operation,
are noted in the “log” files described above.
Prior Information
The Bayesian grid update method can exploit some prior information provided about the area of interest.
The floor plan may show walls (which are considered impenetrable by the Bayesian update rule).
Walls should be black (or an optional color specified in the bounding
box file).
One-sided RTT
The best results are obtained when the access points and the phone support
the IEEE 802.11-2016 protocol (i.e. two-sided FTM RTT).
Google Wi-Fi APs and various Google Pixel phones do.
See AP FTM RTT support
for a list of APs that support two-sided FTM-RTT.
See
phone FTM RTT support for a list of phones,
and retail, warehousing and distribution center devices
that support two-sided FTM-RTT.
By the way, quite a few APs support the protocol,
but do not advertize this in their Wi-Fi beacon frames.
In addition it is possible to work with uncooperative APs in
one-sided RTT mode.
In this case the responder definition should include a
"offset-one-sided"
field which specifies the amount
(always negative) to add to the returned one-sided RTT value.
For example:
"offset-one-sided" : -2573,
These
offsets depend on the type of AP and can be determined
using the
WifiRttScanX
app (see below).
Note: Parts of the menu are still evolving so may look different from what is shown here.
Use File Picker
- interact with user to locate the input files
Two Sided RTT
- use two-sided RTT (otherwise one-sided)
Ignore 2.4 GHz
- ignores APs operating in 2.4 GHz band
Ignore 5 GHz
- ignores APs operating in 5 GHz band
Ignore DFS
- ignores APs operating in DFS part of 5 GHz band
Ignore 6 GHz
- ignores APs operating in 6 GHz band
Ignore Unadvertized
- ignores APs not advertising support for IEEE 802.11mc
Force 802.11mc
- request two-sided RTT with APs not advertising support for IEEE 802.11mc
Show Floorplan
- use floorplan image as background
Show AP Info
- show current information next to AP
Use Wi-Fi scanning
- use Wi-Fi scanning to determine properties of APs
Use Range Probes
- alternate method for determining properties of APs
Sort on Last Seen
- range to recently seen APs
Sort on RSSI
- range to APs with strong signal
Sort on Distance
- range to nearby APs
Note: FTMRTT has uses other than indoor localization, so several of the menu settings will not be used here (and some combinations will not make sense).
Fortunatey, since Android 10, overriding this has
become easy:
just disable “Wi-Fi scan throttling” from the
“Developer Options” menu
(assuming you have
enabled Developer Options).
When you first open the installed app you will get a
“Permission Activity Screen”
since Wi-Fi RTT Ranging requires “Fine Location” permission.
(You may also need to turn on “Location” in “Settings”)
If you already have one version of the app installed, then it may
happen that a new version cannot be installed on top of it
(perhaps because of a change in name or file “signature”).
In that case, simply uninstall the old version first.
Details: if you are downloading in some browser, like FireFox or
Chrome, you have to give it permission to install. From
Settings > Apps > Special app access > Install unknown apps.
Then click on the browser you use, and, finally, slide the
Allow from this source slider.
Alternatively, if you have AndroidStudio (or just its command-line tools) you can
use the Android Debug Bridge (ADB) with your phone connected via
USB cable:
adb install FTMRTT.apk
You may need to use the -t and -r command line flags:
adb install -t -r FTMRTT.apk
(or even adb install -r -t -d -g FTMRTT.apk).