Last modified on 6 August 2019, at 15:40

Difference between revisions of "Compulab indoor positioning"

(Created page with "= FTM Responder setup = tbd = FTM initiator setup = tbd")   (change visibility)
 
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
#REDIRECT [[WiFi Indoor Location Device (WILD) software]]
 +
= Intro =
 +
 +
The Wi-Fi location technology based on a protocol specified in 802.11REVmc-FTM (IEEE 802.11mc-2016 technical Specification) define the Fine Timing Measurement procedure between the Mobile device (STA) and Network infrastructure device (AP).
 +
<br><br>
 +
The 11mcFTM protocol allow the mobile device exchange FTM packets without the need to be associated to the Wi-Fi Access Point (AKA:Unassociated mode), the protocol also support FTM packet exchange also if the Mobile device is associated (connected) to the Access Point and have data packets
 +
simultaneously with FTM Packets. The Mobile can generate location in one of the modes (Associated or Unassociated to an Access Point).
 +
<br><br>
 +
In order to provide 11mcFTM coverage in the venue allowing certified mobile devices supporting 11mcFTM to perform ranging measurements, you need to install Devices such as access Points, routers or IoT Gateways that supporting 802.11mcFTM AP Mode. Intel solution consist of a low cost edge compute device called “FTM Responder”.
 +
 +
== End to End Network Topology ==
 +
Intel Solution based on FTM Responder enables the FTM Responder (With Single AC8260 Wi-Fi chip on the FTM Responder) to provide 3 functions simultaneously by a single FTM Responder devices:
 +
# (Mandatory) Wi-Fi Location AP Mode (Respond to 11mcFTM Range measurement Request sent from the mobile device)
 +
# (Optional)  Wi-Fi SoftAP (Mobile device can associate and transfer data over Wi-Fi)
 +
# (Optional)  Backhauling (FTM Responder backhaul (data) over Wi-Fi or Ethernet)
 +
== High Level Architecture (Ethernet Backhauling) ==
 +
[[File:Ftmr00.png]]
 +
 
= FTM Responder setup =
 
= FTM Responder setup =
tbd
+
== Overview ==
 +
FTM Responder device (AKA: FTMR) enable deployment of low cost WiFi Location coverage solution in venues to allow mobile devices perform accurate FTM Ranging measurements and generate Accurate positioning (AKA: Accurate indoor location).
 +
<br><br>
 +
Intel’s FTM Responder device based on Intel dual based wireless chipset such as AC8260 dual band 2.4Ghz / 5Ghz 2x2 MIMO 802.11n/11ac that designed to support 802.11mcFTM. Intel Wi-Fi Chipset must run a dedicated software driver in order to perform FTM Responder functionality.
 +
 
 +
== Out of the Box Configuration ==
 +
=== FTM Responder software ===
 +
# Yocto BSP for Intel E3900
 +
# Pre compiled with Intel AC8260 WIFI driver supporting 11mcFTM Responder mode
 +
# Bluetooth driver for AC8260 and set of network services to enable out of the box operation
 +
 
 +
* Requires no setup or configurations steps.
 +
* All the required software is already configured and starts at the device boot automatically.
 +
 
 +
=== How To Start ===
 +
* Plug in the device into the power.
 +
* Turn on the device.
 +
 
 +
== FTM Responder Functions ==
 +
=== Wi-Fi Location AP ===
 +
FTM Responder device is a Wi-Fi Location AP.<br>
 +
The '''hostapd''' is in charge of providing the AP services and turn the Wi-Fi interface into the AP-MODE.<br>
 +
The '''hostapd''' starts automatically with the system boot.
 +
hostapd configuration file is at '''/etc/hostapd/hostapd.conf'''
 +
 
 
= FTM initiator setup =
 
= FTM initiator setup =
tbd
+
== Overview ==
 +
FTM Initiator device (AKA: FTMI) enable deployment of low cost WiFi Location coverage solution in venues to allow mobile devices perform accurate FTM Ranging measurements and generate Accurate positioning (AKA: Accurate indoor location).
 +
 
 +
== Out of the Box Configuration ==
 +
=== FTM Initiator software ===
 +
# Ubuntu 16.04 LTS
 +
# Intel Wi-Fi driver for Intel Wireless AC8260 M.2 supporting WiFi Location Initiator (STA) protocol (802.11mcFTM) with offloaded ranging engine.
 +
 
 +
* Requires no setup or configurations steps.<br>
 +
* All the required software is already configured and starts at the device boot automatically.
 +
 
 +
=== How To Start ===
 +
* Plug in the device into the power.
 +
* Turn on the device.
 +
* Unity Window Manage shows up and a demo range script starts running in the terminal window.
 +
 
 +
=== Demo Range Script ===
 +
* /home/tester/Desktop/Ranging/FTM_Range.sh
 +
#!/bin/bash
 +
 +
if [ ! $( id -u ) -eq 0 ]; then
 +
echo $(basename $0): "root permittions required"
 +
exit
 +
fi
 +
 +
#set -x
 +
 +
USER=$(ls /home | head -1)
 +
mkdir -p /home/$USER/ranging/logs
 +
LOG=/home/$USER/ranging/logs/$(date "+%Y.%m.%d-%H.%M").log
 +
 +
# "Intel Corporation Wireless 8260 [8086:24f3] (rev 3a)"
 +
WLAN=$(awk -F "/" '/8086:24F3/&&($0=FILENAME)&&($0=$5)' /sys/class/net/*/device/uevent)
 +
 +
ifconfig $WLAN up
 +
 +
RESPONDER_SSID="DO_NOT_CONNECT"
 +
OPTIONS="bw=80 cf=5240 cf1=5210 spb=2 asap"
 +
 +
function ftmrs_macs_scan() {
 +
local macs=$(iw dev $WLAN scan | grep "BSS\|SSID" | grep "$RESPONDER_SSID" -B 1 | grep BSS | cut -d " " -f 2 | cut -d "(" -f 1)
 +
echo $macs
 +
}
 +
 +
function ftmrs_iw_measurement() {
 +
while true; do
 +
FTMRs_MACS=$(ftmrs_macs_scan)
 +
if [ -z "$FTMRs_MACS" ]; then
 +
echo "no responders found" | tee -a $LOG
 +
echo "" | tee -a $LOG
 +
sleep 5
 +
continue
 +
fi
 +
echo "SSID: $RESPONDER_SSID, responder(s): $(echo $FTMRs_MACS | wc -w)" | tee -a $LOG
 +
echo "----------------------------------------------------------------" | tee -a $LOG
 +
 +
cfg=/tmp/cfg
 +
rm -f $cfg
 +
for mac in $FTMRs_MACS; do
 +
echo $mac $OPTIONS >> $cfg
 +
done
 +
 +
for i in $(seq 60); do
 +
res=$(iw $WLAN measurement ftm_request $cfg  | awk '{ print tolower($0) }' | grep -o "target: [0-9a-f:]*\|distance: [0-9]* cm")
 +
res=$(echo $res | sed s/"target:\|distance:"/""/g)
 +
 +
null=$(echo $res | grep -o "[0-9a-f:]* 0 cm")
 +
if [ "$null" ]; then
 +
echo "re-scan... ($null)" | tee -a $LOG
 +
sleep 1
 +
break
 +
fi
 +
 +
echo $res | tee -a $LOG
 +
sleep 1
 +
done
 +
 +
echo "" | tee -a $LOG
 +
done
 +
}
 +
 +
ftmrs_iw_measurement
 +
 
 +
= 1st time usage =
 +
# Make sure that the Mobile device (initiator) is not close to much to the FTMR device (it shall be far enough to enable Range measurement correctly . e.g. for out of the box initial test , place the devices in Line of sight with a distance of ~2-3 meters (minimum) between the mobile device and FTM Responder device.
 +
# Ensure the FTMR is power up and wait ~ 3 minutes that all boot sequence accomplished automatically on the FTM Responder side. Once the FTMR device accomplish boot you can do Wi-Fi scan to see if the FTMR SSID is available (by Default each FTMR SSID is " DO_NOT_CONNECT").
 +
# Only after the FTMR is ready. Power on the mobile device to do range measurement (we RECOMAND to do manually Range measurement to the designated MAC Address of the specific FTMR device that powered on and accomplished boot sequence as described in step b above.
 +
'''Notes:'''
 +
It may happen that from time to time the range will be 0cm or different as this is a dynamic over the air measurement. This is a normal behavior. In 90% of the cases you shall get a range between 1-3 meters.
 +
= See also =
 +
* [[Indoor positioning application notes]]
 +
 
 +
[[Category:fitlet2]]
 +
[[Category:Indoor Positioning]]

Latest revision as of 15:40, 6 August 2019

Intro

The Wi-Fi location technology based on a protocol specified in 802.11REVmc-FTM (IEEE 802.11mc-2016 technical Specification) define the Fine Timing Measurement procedure between the Mobile device (STA) and Network infrastructure device (AP).

The 11mcFTM protocol allow the mobile device exchange FTM packets without the need to be associated to the Wi-Fi Access Point (AKA:Unassociated mode), the protocol also support FTM packet exchange also if the Mobile device is associated (connected) to the Access Point and have data packets simultaneously with FTM Packets. The Mobile can generate location in one of the modes (Associated or Unassociated to an Access Point).

In order to provide 11mcFTM coverage in the venue allowing certified mobile devices supporting 11mcFTM to perform ranging measurements, you need to install Devices such as access Points, routers or IoT Gateways that supporting 802.11mcFTM AP Mode. Intel solution consist of a low cost edge compute device called “FTM Responder”.

End to End Network Topology

Intel Solution based on FTM Responder enables the FTM Responder (With Single AC8260 Wi-Fi chip on the FTM Responder) to provide 3 functions simultaneously by a single FTM Responder devices:

  1. (Mandatory) Wi-Fi Location AP Mode (Respond to 11mcFTM Range measurement Request sent from the mobile device)
  2. (Optional) Wi-Fi SoftAP (Mobile device can associate and transfer data over Wi-Fi)
  3. (Optional) Backhauling (FTM Responder backhaul (data) over Wi-Fi or Ethernet)

High Level Architecture (Ethernet Backhauling)

Ftmr00.png

FTM Responder setup

Overview

FTM Responder device (AKA: FTMR) enable deployment of low cost WiFi Location coverage solution in venues to allow mobile devices perform accurate FTM Ranging measurements and generate Accurate positioning (AKA: Accurate indoor location).

Intel’s FTM Responder device based on Intel dual based wireless chipset such as AC8260 dual band 2.4Ghz / 5Ghz 2x2 MIMO 802.11n/11ac that designed to support 802.11mcFTM. Intel Wi-Fi Chipset must run a dedicated software driver in order to perform FTM Responder functionality.

Out of the Box Configuration

FTM Responder software

  1. Yocto BSP for Intel E3900
  2. Pre compiled with Intel AC8260 WIFI driver supporting 11mcFTM Responder mode
  3. Bluetooth driver for AC8260 and set of network services to enable out of the box operation
  • Requires no setup or configurations steps.
  • All the required software is already configured and starts at the device boot automatically.

How To Start

  • Plug in the device into the power.
  • Turn on the device.

FTM Responder Functions

Wi-Fi Location AP

FTM Responder device is a Wi-Fi Location AP.
The hostapd is in charge of providing the AP services and turn the Wi-Fi interface into the AP-MODE.
The hostapd starts automatically with the system boot.

hostapd configuration file is at /etc/hostapd/hostapd.conf

FTM initiator setup

Overview

FTM Initiator device (AKA: FTMI) enable deployment of low cost WiFi Location coverage solution in venues to allow mobile devices perform accurate FTM Ranging measurements and generate Accurate positioning (AKA: Accurate indoor location).

Out of the Box Configuration

FTM Initiator software

  1. Ubuntu 16.04 LTS
  2. Intel Wi-Fi driver for Intel Wireless AC8260 M.2 supporting WiFi Location Initiator (STA) protocol (802.11mcFTM) with offloaded ranging engine.
  • Requires no setup or configurations steps.
  • All the required software is already configured and starts at the device boot automatically.

How To Start

  • Plug in the device into the power.
  • Turn on the device.
  • Unity Window Manage shows up and a demo range script starts running in the terminal window.

Demo Range Script

  • /home/tester/Desktop/Ranging/FTM_Range.sh
#!/bin/bash

if [ ! $( id -u ) -eq 0 ]; then
	echo $(basename $0): "root permittions required"
	exit
fi

#set -x

USER=$(ls /home | head -1)
mkdir -p /home/$USER/ranging/logs
LOG=/home/$USER/ranging/logs/$(date "+%Y.%m.%d-%H.%M").log

# "Intel Corporation Wireless 8260 [8086:24f3] (rev 3a)"
WLAN=$(awk -F "/" '/8086:24F3/&&($0=FILENAME)&&($0=$5)' /sys/class/net/*/device/uevent)

ifconfig $WLAN up

RESPONDER_SSID="DO_NOT_CONNECT"
OPTIONS="bw=80 cf=5240 cf1=5210 spb=2 asap"

function ftmrs_macs_scan() {
	local macs=$(iw dev $WLAN scan | grep "BSS\|SSID" | grep "$RESPONDER_SSID" -B 1 | grep BSS | cut -d " " -f 2 | cut -d "(" -f 1)
	echo $macs
}

function ftmrs_iw_measurement() {
	while true; do
		FTMRs_MACS=$(ftmrs_macs_scan)
		if [ -z "$FTMRs_MACS" ]; then
			echo "no responders found" | tee -a $LOG
			echo "" | tee -a $LOG
			sleep 5
			continue
		fi
		echo "SSID: $RESPONDER_SSID, responder(s): $(echo $FTMRs_MACS | wc -w)" | tee -a $LOG
		echo "----------------------------------------------------------------" | tee -a $LOG

		cfg=/tmp/cfg
		rm -f $cfg
		for mac in $FTMRs_MACS; do
			echo $mac $OPTIONS >> $cfg
		done

		for i in $(seq 60); do
			res=$(iw $WLAN measurement ftm_request $cfg  | awk '{ print tolower($0) }' | grep -o "target: [0-9a-f:]*\|distance: [0-9]* cm")
			res=$(echo $res | sed s/"target:\|distance:"/""/g)

			null=$(echo $res | grep -o "[0-9a-f:]* 0 cm")
			if [ "$null" ]; then
				echo "re-scan... ($null)" | tee -a $LOG
				sleep 1
				break
			fi

			echo $res | tee -a $LOG
			sleep 1
		done

		echo "" | tee -a $LOG
	done
}

ftmrs_iw_measurement

1st time usage

  1. Make sure that the Mobile device (initiator) is not close to much to the FTMR device (it shall be far enough to enable Range measurement correctly . e.g. for out of the box initial test , place the devices in Line of sight with a distance of ~2-3 meters (minimum) between the mobile device and FTM Responder device.
  2. Ensure the FTMR is power up and wait ~ 3 minutes that all boot sequence accomplished automatically on the FTM Responder side. Once the FTMR device accomplish boot you can do Wi-Fi scan to see if the FTMR SSID is available (by Default each FTMR SSID is " DO_NOT_CONNECT").
  3. Only after the FTMR is ready. Power on the mobile device to do range measurement (we RECOMAND to do manually Range measurement to the designated MAC Address of the specific FTMR device that powered on and accomplished boot sequence as described in step b above.
Notes:
It may happen that from time to time the range will be 0cm or different as this is a dynamic over the air measurement. This is a normal behavior. In 90% of the cases you shall get a range between 1-3 meters.

See also