WiFi Indoor Location Device (WILD) software

From fit-PC wiki
Jump to: navigation, search


The Wi-Fi location technology is based on a protocol specified in 802.11mc-FTM (IEEE 802.11mc-2016 technical Specification) which defines the Fine-Timing-Measurement (FTM) procedure between a mobile device (FTM initiator) and a network infrastructure device (FTM responder / FTMR)
The protocol allows:

  • Initiator to exchange FTM packets without the need to be associated with a Wi-Fi Access Point.
  • Co-existance of SoftAP functionality and FTM ranging in both initiator and responder.

Hardware platform

WILD is based on Compulab fitlet2 with Intel AC8260 WiFi module

Getting started


CopmpuLab provides a raw image that can be deployed onto the following bootable media.

  • SD-Card
  • USB flash disk
  • Internal SATA SSD / HDD (not covered by this man page)
  • Internal eMMC (not covered by this man page)

CompuLab installation procedure must be invoked in order to deploy the image onto a removable media.

  1. Download the latest WILD image - see WILD revision notes and consult associated readme.
  2. To deploy on a desktop PC:
OS How To


  • Make sure that the removable device was recognized by the host. Issue:
udevadm monitor --subsystem-match=block --kernel
  • Insert the device, wait for the udevadm report:
udevadm monitor --subsystem-match=block
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[37893.873104] add      /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host3/target3:0:0/3:0:0:0/block/sdc (block)
KERNEL[37893.873136] add      /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host3/target3:0:0/3:0:0:0/block/sdc/sdc1 (block)
KERNEL[37893.873161] add      /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host3/target3:0:0/3:0:0:0/block/sdc/sdc2 (block)
  • The device was recognized as /dev/sdc.
  • Terminate the udevadm session; press Ctrl-C; continue to the next step.
  • Issue this command:

The dd command will destroy all data stored on the /dev/sdc.

xz -dc /path/to/4G-wild.img.xz | sudo dd of=/dev/sdc bs=1M status=progress

The device name in the command above is just an example. Take a real device name from the udevadm report on your desktop.


Make use of Rufus. Refer to the vendor site for details: https://rufus.akeo.ie/


  • Allow the device to boot from the bootable FTM media.
  • Login with one of the default users:
User Name Password



  • To acquire root credentials:
sudo -i


  • Intro

ftm-services is a set of the CompuLab scripts for managing FTM devices.

  • History
WILD Version Description

< 0.70

Delivered as a set of services installed onto the rootfs, but w/out being registered as a deb package in the Debian package manager.

>= 0.70

Starting from the 0.70 version these services come as a deb package with the same name.

  • Install/Update procedure
cd /tmp
wget https://www.fit-iot.com/files/download/wild/0.7.2/ftm-services_0.7.2.deb
sudo dpkg -i /tmp/ftm-services_0.7.2.deb



This is an FTM management command. Refer to the command man page for details. wild command is available in WILD version 0.7 and later.

man wild

Get WILD version

wild -v

Set WILD to initiator mode

wild -mi

Set WILD to responder mode

wild -mr

Set WILD to off mode

wild -mo

Neither initiator or responder commands are available in this mode.

ftm-role (depreciated)

See WILD depreciated commands


When in client mode, scan responders and enable / disable specific responders for ranging requests



  • Client: show the results of ranging request.
  • Responder: show the FTM requests statistics.

FTMR (FTM Responder)

Configuration files

hostapd configuration file

  • /etc/hostapd.conf

Used for setting FTMR properties e.g.

  1. SSID - to brodcast when in responder mode
  2. Channel and bandwidth

Change channel bandwidth

80MHz 40MHz 20MHz




Change band

2.4GHz 5.0GHz



For more information about the hostapd.conf parameters refer to: https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf

Configuration Manual

For more information refer to: FTMr configuration

FTMR Network Configuration

  • Interfaces

The device network configuration described by /etc/network/interfaces
Below is an configuration example that configures the br0 at the boot time.

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

# closest to the edge
# a spare network interface (can be disconnected)
# Roles:
# 1: a generic network interface
auto enp2s0
allow-hotplug enp2s0
iface enp2s0 inet manual

# closest to the power plug
# Roles:
# 1: a part of bridge
# 2: a generic network interface
auto enp3s0
allow-hotplug enp3s0
iface enp3s0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual

# Bridge Setup
# This is a bridge interface
# gets turned on when device is a responder
# auto br0
iface br0 inet dhcp
bridge_ports wlan0 enp3s0
  • Bridge configuration

Make use of the brctl for details.

brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.0001c01fd60c       no              enp3s0

FTMR Backhaul

All FTM device has two wired interfaces.
The wired interfaces configured as auto & dhcp must be connected to the LAN at the boot time.
Otherwise the device will experience a boot delay.


Intel 8260 can work as an FTMR & a SoftAP simultaneously.

SoftAP services

There are two services that must be configured & run in order to provide the SoftAP functionality:

  • bridge

FTM bridge service is in charge of configuring a bridge between wlp1s0 (i8260) and enp3s0 interfaces.
It allows all wireless interface requests to get forwarded to the enp3s0.
The enp3s0 interface must be connected to the LAN.
FTM bridge service starts automatically while in responder mode. In order to control it manually: start/stop/status/disable, issue:

systemctl start/stop/status/disable ftm-br
  • hostapd

The hostapd daemon turns the device into a SoftAP while in a responder mode.

How to get connected to the SoftAP wireless network:

  1. Scan wireless networks;
  2. Try to get connected to a network with name COMPULAB_WILD password indoorlocation.
  3. In case that the bridge service is up and running the wireless clients will get connected to the LAN.

SoftAP know issues:

  1. The backhaul interface enp3s0 is down. Wireless clients can't get connected to the SoftAP. The client software reports on Connecting state.
  2. ftm-br service is stopped. Wireless clients can't get connected to the SoftAP. The client software reports on Connecting state.

FTMI (FTM Initiator)

FTM services configuration file (initiator/client mode)

  • /opt/compulab/service/ftm-common
Field Description


List of the AP SSIDs to scan & send range requests when in client mode.

Match condition 'FTM_SSID[x] ~ discovered_ssid'.
For instance the hostapd.conf file SSID="COMPULAB-"+serial_number, then the FTM_SSID must be FTM_SSID="COMPULAB-".
The match condition turns 'true' and client takes this responder into account.

BW=80; TOF="bw=${BW} cf=5240 cf1=5210 spb=2 asap"

Template of a TOF string. The ftm-range service makes use of this when in client mode.

BW=80 works for both 40 MHz & 80 MHz bandwidth modes.
BW=40 does not work at all. The client receives empty replies from the responders if BW=40.

Transmit from FTMI list of scanned FTMRs and ranging results

  • Configuration file: /opt/compulab/service/ftm-common

Contains the SERVERS list to send the scan results file :/opt/compulab/www/results.all

SERVERS=(http://localhost/cpl/curl.php http://wild-server/hard/curl.php)
  • FTM ranged service: /opt/compulab/service/ftm-range.main

The service walks through the SERVERSs' list and send the scan results to each one:

for SERVER in ${SERVERS[@]};do
curl -d @${iw_scan}/results.all ${SERVER} &>/dev/null

See Also