WiFi Indoor Location Device (WILD) software

From fit-PC wiki
Jump to: navigation, search

Overview

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

Deployment

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

  • SD-Card
  • USB flash disk
  • Internal SATA SSD / HDD
  • Internal eMMC

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

  1. Download the latest CompuLab WILD Image.
  2. To deploy on a desktop PC:
OS How To

Linux

  • 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.
  • Issue this command:
xz -dc /path/to/4G-wild.img.xz | sudo dd of=/dev/sdc bs=1M status=progress

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

Windows

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

Boot

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

support

support

compulab

compulab

Important: the compulab login can be not available in all WILD image revisions.

  • To acquire root credentials:
sudo -i

Utilities

ftm-role

Select WILD mode (initiator / responder)

ftm-role
  • Client: set WILD to initiator mode
  • Responder: set WILD to responder mode (default)
  • Dumb: silent mode with no FTM activity

ftm-options

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

ftm-options

ftm-show

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

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

ieee80211ac=1
vht_oper_chwidth=1

ieee80211ac=0
vht_oper_chwidth=0

ieee80211ac=0
vht_oper_chwidth=0
ht_capab=[SORT-GI-20]
require_ht=0

Change band

2.4GHz 5.0GHz

hw_mode=g
ieee80211n=1

hw_mode=a
ieee80211n=1
ieee80211ac=1

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
                                                        wlan0

FTMR Backhaul

All FTM device has two wired interfaces.
Important:
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.

FTMR SoftAP

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 DO_NOT_CONNECT password responders.
  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

FTM_SSID

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.

See Also