You are on page 1of 72

,

WiFi

:
...

, 2011

WiFi

:
...

14 2011

, 2011
3


.
...

Copyright . , 2011
. All rights reserved.
, ,
, . ,
, ,
.

.


.



Cisco Systems.

.

.

.
.
, ,
. ,

(RF)
Cisco
. ,


,
, . ,

.


, , , , , GPS, WLAN, WiFi,
Location Appliance, WCS, WLC, RTLS, 802.11, Cisco, MSE, RSSI

Abstract
The purpose of this thesis is to explore the possibilities of the client location tracking system
Cisco Systems offers for their wireless networks. The system utilizes the infrastructure of
existing wireless networks to estimate clients location in the area covered. The application
was installed at the new building of the Electrical and Computer Engineering school in the
campus of the National Technical University of Athens, and tests were ran to check
performance in that particular environment. Next, we proceeded to explore settings and
options provided by the application for adaptation to the deployment environment in order
to increase the accuracy of reported location information. The conclusions and know-how
acquired in the process are detailed in this paper.
First, we reference the two major technological domains involved, namely wireless networks
and location tracking systems. Then, various techniques developed and used in the purpose
of RF location tracking are extensively presented, and operation of Ciscos location tracking
system, as used in our case, is discussed in detail. Next, we attempt to familiarize the
administrator to the application and thoroughly describe the steps required to correctly
setup the system for the first time, and show how to check that the system is functioning as
it should, also presenting the procedure to adapt it to the deployment environment, so as to
increase performance, taking various findings obtained during our deployment into
consideration. Finally, we describe some examples of how such systems can be used in
practice and what benefits are expected to rise from these.

Keywords
Wireless network, location tracking, access point, position, client, GPS, WLAN, WiFi, Location
Appliance, WCS, WLC, RTLS, 802.11, Cisco, MSE, RSSI



.
.


1 ...................................................................................................... 11
2 ......................................................... 14
2.1 (cell of origin)........................................................... 14
2.2 (Time of Arrival ToA) ........................................................ 15
2.3 (Time Difference of Arrival TDoA) .................... 17
2.4 (Received Signal Strength RSS) ......................... 18
2.5 (Angle of Arrival AoA) ....................................................... 20
2.6 (Location Patterning) .................................... 21
3 ........................................................................... 24
3.1 .......................................................................... 24
3.2 location appliance ................................................................................. 26
3.3 ............................................................................ 27
3.4 ............................................................................................. 30
3.5 ....................................................... 30
4 ............. 32
4.1 ........................................................................................ 32
4.2 (APs)..................................................... 33
4.3 Map editor APs ................................................................... 37
4.4 Location Appliance WCS ............................................................ 40
5 , ............................ 47
5.1 ........................................................................... 47
5.2 ............................................................................................... 50
5.3 (RF Calibration Model) ................... 51
6 , ........................................................ 56
6.1 APs ........................................................................................................ 56
6.2 .................................................................................................. 56
6.3 ....................................................................................................................... 58
6.4 ................................................................................................... 58
6.5 Bugs .......................................................................................................................... 64
7 WLAN
.................................................................................................................. 66
7.1 ................................................................ 66
7.2 ................................................... 67
7.3 ........................................................................................................ 68
9


1.1: . ______________________________________________________ 11
1.2: GPS.
. (Wikimedia Commons) __________________________________________ 13
2.1: ________________________________________________________ 14
2.2:
- (tri-lateration) ______________________________________________________ 16
2.3: ..
( ) . (d < d
& dK > d), , (P1 & P2) ,
d2 - d1 = k. ______________________________________________________________ 17
2.4: TDoA 2 . _____________ 18
2.5: (AoA) _____________________________________ 20
2.6: 10x10 4
__________________________________________________________________________________ 21
3.1: . _______________ 24
3.2: (UWN) Cisco . ____ 25
3.3: . _________________ 26
3.4: WCS Base + Location, LA. _____________ 27
3.5: MMSE .
n (path loss exponent). __________ 29
4.1: . ____________________________________________________ 32
4.2: APs
. __________________________________________________________________________ 34
4.3: APs,
VoIP.______________________________________________________________________________ 34
4.4: "location ready"
(70ft=21m)_________________________________________________________________________ 35
4.5: Planning mode - APs. _______________________________________________ 36
4.6: . __________ 37
4.7: "Add Access Points" APs . ____________ 39
4.8: .
omni. _________________________________________________________ 39
4.9: LA WCS. __________________________________________________ 40
4.10: WLC LA. __________________________ 41
4.11: WCS LA. ________________________ 42
5.1: floor view. ______________________________ 47
5.2: Floor Settings floor view. _________________________ 48
5.3: . _________________________________ 53
5.4: . ________ 54
5.5: . ____________ 54
6.1: . _______________________ 57
6.2: Calibration Model . _______________________ 59
6.3: RF Calibration
Model. ____________________________________________________________________________ 64

10

,
.
.

, .
,
(Wireless Local Area Networks WLANs),
,
,
internet. .

1.1: .

access point .
internet ADSL modem,
( Ethernet) switch
(access point),
802.11,
(router).
,
access point,
. ,
APs
, .
:

.
AP .
,
11

AP ,
.
.
,
.
, mac filtering
- .


802.11,
.

802.11a
802.11b
802.11g
802.11n

5 GHz
2.4 GHz
2.4 GHz
2.4 / 5 GHz

19
13
13
1/5

OFDM
DSSS
DSSS, OFDM
OFDM


[Mbps]
54
11
54
600 (4xMIMO)

,
,

. ,
.
,
internet .

, , ,
.
, 802.11n
600Mbps,
. ,
, WiMAX, HSDPA LTE,
.

GPS (Global Positioning System). ,
,
GPS.
,
, .
GPS
.
,
.
.
12

1.2: GPS.
. (Wikimedia Commons)

GPS ,
,
,
.
:

.
, GPS , ,
GPS .
, GPS ,
. GPS
,
, ,
phasors .
,
,
,
, .
,
Cisco Systems.
(Unified Wireless Network UWN)
Location Appliance ( 2700) Mobility
Services Engine (MSE) 3300. 2710
Location Appliance Access Points


.

13

RF-
,
.

, (WLANs) ..
access point (AP), (base station)
.

2.1 (cell of origin)



.
,
.
(cell),
,
, ,
.

2.1:

(
), ,
.

. ,
0.5-35km,
,
0.8-3800km2. ,
14

( ),
.
(microcells, picocells, femtocells),
.
,
. ,

. ,
,
.

.
,
,
, .

(handover)
.
,
,
. ,
,
( )
. ,
,
(Received Signal Strength Indication RSSI)
.

2.2 (Time of Arrival ToA)



(lateration),
, ,
, .

, .

15

2.2: (tri-lateration)

,
,
(
  3  10 / ) . t0
. , ,
t, t t , :
    
    
    
,
, .
,
.
,

. ,
. ,
,

.
. ,

( t0),
. ,
.

(1   300 ),
.

16

,
.
,
,
,
,
.
- (multipath propagation),
,
.

(Global Positioning System GPS), 24
,
/
, - , ,

4km/sec, 10m.

2.3 (Time Difference of Arrival TDoA)


. ,
, t, t t .
, .
, |   |
,
, ,
.

2.3: ..
( ) . (d < d & dK > d ),
, (P1 & P2) , d2 - d1 = k.


, ,
.
17

,
,
.
( ) ,
.

2.4: TDoA 2 .

, TDoA
,
.
,

.
LORAN (LOng RAnge Navigation),
GPS,
OMEGA,
Alpha, DECCA,
. ,
.

2.4 (Received Signal Strength RSS)


ToA ,
,
. (lateration)

.
,
. ,
:
    10 log !" # 

18

:
 (Path Loss) dB ,
 dB 1m,
! ,
$ (path loss exponent),
dB
.
(PL)
, , ,
.
, .
2 , 3.5
, 3.7 4 ,
4.5. s

,
,
, ,
.
(diversity antennas)
,
.
,
dB:
%&  '&  '&  ('&,*"'    (%&,*"'  %&
'& , '& %&
(, ), ('&,*"' (%&,*"'
 . :
!  10

+,- .+/- .0,- 12,-,34, .+056 1712/-,34, .0/- #


98"

,
,
.

,
.
.

,
(WLANs). ,
,
.
19

2.5 (Angle of Arrival AoA)


, ,
(lateration), ,
,
.

2.5: (AoA)

,
,
.
,
,
. ,

, TDoA. ,
/2,
, 180
.

, RSS. ,
,
. ,
,
.
,
(Line of Sight LoS) .
VOR (VHF Omnidirectional Range),
DME (Distance Measuring Equipment)
, SONAR ,
,
.

20

2.6 (Location Patterning)



(multipath propagation).

. ,
:
1. ,
RF (RF signature).
2.
.
, , ,
RF ,
(. ). RF
(RSS) ,
.

2.6: 10x10 4

(calibration phase),

. ,
21

RF .
, ,
.
data points ,
( )
.
(operational phase),
RSS ,
,
(pattern recognition) RF
.
RF.
: )
,
RF , )
,
, )

, .

hardware,
,
software, RSS

. ,
,
.
,
,
,
. ,
,
,
. ,

,
. ,
,
,
(2) , ,
, , .
,

. ,
,
6 ,
22

,
.

23

3.1

3.1: .

(Access Points AP)


(Wireless LAN Controller WLC)
(Wireless Control System WCS)
(Location Appliance LA)

access points . ,
access points,

. access points
, WLC,
access points ,
. WCS
, . ,
WLC, WCS
. , WCS
, -

. WCS
. ,
location appliance, SNMP WLC,
24

.
LA WCS.
cisco (Unified
Wireless Network UWN) .

3.2: (UWN) Cisco .

- ,
, Wi-Fi, ,
Wi-Fi .
access points, WLC LWAPP
(LightWeight Access Point Protocol). WCS server WLC SNMP
(Simple Network Management Protocol). access points RSS
WLC ,

. WLC
, Location Appliance
( rogue clients)
LOCP (LOcation Control Protocol), .
, LA
. WCS
SOAP/XML SNMP, SOAP/XML.
25


: WCS Plus
100 access points , WLC
4402 25 access points, Location
Appliance 2710 2500 , 24 access
points (3 , 6 1 , 2 (PClab)
, 7 2 6 3 ). APs
1131(a/b/g), 1231(a/b/g), 1242(a/b/g) 1252(a/b/g/n).

SSID, WLC
( access point) interface,
VLAN . WLC
access points AP-manager
VLAN, ID 225, LWAPP.

CNLab .

3.3: .

3.2 location appliance


, LA ,

. LA, WCS
WLC,
, web
interface, (on demand)
, 2500 , LA.

interface location-aware .
LA ,
(
26

, )
email, syslog, SNMP traps SOAP/XML
.
WCS Base + Location,
LA, :

.
Wi-Fi tags (.
).
chokepoints.
SOAP/XML API
,
.
.
WCS (on demand) .

WCS, on-demand
. heatmap
,
.
heatmap, heatmap
RSS,
.

3.4: WCS Base + Location, LA.

LA, WCS
Base, RF
fingerprinting, (highest RSS).
AP
, .
, LA location-aware
.

3.3
Cisco RF Fingerprinting
RSS location patterning.
27


, location patterning
RSS ,

.
,
.
2.4,
:
    10 log !" # 
(RF propagation
model)  , $ ,
!, 
AP. ,
RSS
.
RSS
,
2.4GHz 5GHz 802.11b/g 802.11a .
,
(minimum mean square error
MMSE)  , $ ,

. ,
Cisco.

28

3.5: MMSE .
n (path loss exponent).


location patterning.
:
1. Cisco APs,
( location appliance), .
.
Wi-Fi tags
chokepoints.
2. (network side),
hardware software .
Wi-Fi hardware drivers
. ,
, Wi-Fi VoIP ,
APs, PDAs, Wi-Fi RFID tags .
3.
,
,
.
4.
location patterning.
RF Fingerprinting,
Cisco,
29


.
.

3.4
(accuracy)
, :
:  ; <%  <= #>  ?%  ?= #>
(precision)
.
,
. ,
. ,
cisco
, , 10
90% 5 50% .
Wi-Fi tags,
chokepoints ,
.
APs, ,
,
Location Planning (), Location Readiness () Location
Accuracy ().
APs
(, ),
.
,
,
.

3.5
APs
.

(probe requests), RSS
.
(active scanning),
APs.

30

,
.
,
(passive scanning), probe
requests, AP
(beacon) AP
probe request. , probe requests ,
. ,
probe
requests .
, S36 Radio
Measurement Requests Cisco Compatible Extensions
(CCX) Cisco . CCXv2
AP ,
probe request .
CCX, .
, CCX
. CCX
Calibration Models,
4.

31

4



. ,

. ,
.

.

4.1
Cisco Network Design WCS
access points . campus,
, network design.
network design .
MonitorMaps.
,
campus. , WCS Configuration
Guide Cisco WCS . New Building
Go. .
Number of Floors ,
, 2 1 Number
of Floors Number of Basements . WCS
, New Floor
Area .

4.1: .

Floor Area Name: Ground Floor.


Contact: . ()
Floor: . (1=, B=Basement)
32

Floor Type (RF Model):


. Cubes and walled offices
(cubicles) . Drywall office only
, Outdoor open space .
,
RF Model ,
.
Floor Height: ,
.
Image or CAD File: CAD
. CAD ,
PNG ,
,
. ,
(Horizontal/Vertical Span),
aspect ratio,
CAD .

Next,
,
CAD, , OK.
.

4.2 (APs)
,
APs
APs,
, .

,
.
APs
-75dBm. ,
APs ,
.
,
.
:
1. APs ,
. APs
AP
, .

33

2. APs ,
.
,
.
3. VoIP, APs
, .
APs monitor only
,
, APs monitoring
.
.

4.2: APs .

4.3: APs, VoIP.

APs
Inspect Location Readiness WCS,

cisco.
Location-Ready, :

34

4 APs .
1 AP .
3 1 AP
70ft (21m) .

4.4: "location ready" (70ft=21m)

location ready
,
. ,
21 -75dBm.
location ready
cisco,
.
APs Location
Planning Mode,
APs,
, .
Planning Mode .
Add APs,
.

35

4.5: Planning mode - APs.

,
(/), APs,
( ),
, (, ,
). Calculate,
APs,
Apply, access points.
APs ,
heatmaps ,
, APs, .
,
access points, ,
Generate Proposal
heatmaps .

36

4.6: .

4.3 Map editor APs


(map editor)
.
heatmap
. (RF Prediction),
map editor
.
map editor, MonitorMaps[]
Map Editor,
.

37

: To resize based on available


browser space click here. flash applet
, ,
. Firefox 3.5 & 4
,
.
!

. Draw obstacles
, -
.
.

Thick Wall
Light Wall
Heavy Door
Light Door
Cubicle
Glass

13 dB
2 dB
15 dB
4 dB
1 dB
1,5 dB

(, )

( )

(, )


SNAP ORTHO Draw.

, .
, map editor
- ,
. Location Exclusion Region
.
, ,
,
.
.
Location Exclusion
Location Inclusion .
, CommandSave Recompute
Prediction, heatmap.
.
access points .
MonitorMaps[] Add
Access Points. access points,
. APs
,
access points.
38

4.7: "Add Access Points" APs .

,
. access point,
,
AP. Antenna Orientation
(elevation) .
, , 0
, 90 , 180
.
0 .

4.8: .
omni.

39

,

,
, .

.

4.4 Location Appliance WCS


Location Appliance web interface,
WCS , Location Appliance
web interface, . WCS,
ServicesMobility Services
Add Location Server. ,
.

4.9: LA WCS.

Device Name: . hostname


.
IP Address: IP LA.
Contact Name: LA. ()
Username/Password: LA.
admin/admin. username password
script LA,
.
.
Port: LA HTTP/HTTPS .
human-readable .
8001.
40

HTTPS: WCS LA HTTPS,


. ,
LA
HTTP.

, Save WCS LA,


.
LA WLC.

, . LA WLC,
ServicesSynchronize Services . Controllers
LA , Assign
WLCs .
( ,
) OK. Synchronize
. ,
.

4.10: WLC LA.

WLC LA
,
. UTC (Universal Time Code)
NTP (Network Time Protocol).
WLC .
, (
APs) WCS, LA WCS,
. ServicesSynchronize Services
Network Designs, LA, Assign.
Network Design
. ,
Synchronize.

41

,

. AdministrationBackground Tasks,
tickbox Mobility Service Synchronization Other background
tasks hotlink .
Out of sync alerts Auto Synchronization Submit.

4.11: WCS LA.

LA WCS, ServicesMobility Services


.
LA,
.
. Configuration Guide LA.

NMSP Parameters. NMSP (Network Mobility Services Protocol)


LA WLC.

Echo Interval

LA ping WLC.
,
42

Neighbor Dead
Interval
Response Timeout
Retransmit Interval
Maximum
Retransmits

Advanced Parameters & Commands.

Advanced Debug

No of Days to keep
Events
Session Timeout
Reboot Hardware
Shutdown Hardware

Clear Database

Defragment Database


WLC.
LA ping response
WLC .
Echo Interval.
LA
timeout.
LA timeout
.

.


.

Location Accuracy Tool.

. 2.
WCS
timeout. 30.
.
.
(
Wake On Lan
.)
LA,
.
. Synchronize
.

.

Accounts. ,
LA. ,
.

43

,
.
Alarms/Events/Notification.
.
, Configuration
Guide LA .
Context Aware ServiceAdministrationTracking Parameters.
.

Wireless Clients

Rogue Clients and


Access Points
Exclude Ad-Hoc Rogues
Active RFID Tags

Enable
.
Enable Limiting

( 2500).
Enable
APs .
Enable Limiting .

point-to-point .
Enable
RFID tags.
Enable Limiting .

WLC 4.1
LA 3.0 :

SNMP Retry Count


SNMP.
SNMP Timeout

SNMP timed-out.
Client Stations
Enable client stations
.
Active RFID tags
Enable RFID
tags .
Rogue Clients and
Enable
APs
APs
.
Statistics
Enable
.

Filtering Parameters.
, MAC
.
History Parameters. .

Archive for

.
Prune data starting at

.
44

and also every


Enable history logging
of Location transitions
for Client Stations,
Asset Tags and Rogue
Clients and APs

.
(0 99900000 mins)
Location transitions
( 10m )
.

Presence Parameters.
, ,

LA.
CCXv5 .
, LA WCS.
AdvancedLocation Parameters.

Enable calculation time

Enable OW Location
Relative discard RSSI time

Absolute discard RSSI time


.
cisco,
.

(Outer Walls) .

RSS
, .

.
3
.

, ,
.
45

RSSI cutoff

Enable location filtering

Chokepoint usage
Use chokepoints for
interfloor conflicts
Chokepoint out of range
timeout

Absent data cleanup


interval

60.
RSS dBm,
.
,

,
, .
cisco,
.


.
chokepoints
RFID tags.
chokepoints (Never)
(Always) (Floor
Ambiguity) RFID tags.

RFID tag chokepoint,

RSS.
,

, .

Notification Parameters. Northbound Parameters


aes-config.xml LA . manual.
Advanced
, :

Rate Limit
( ms) LA.
(0= ). northbound
.
Queue Limit
.
.
Retry Limit
LA
Refresh Time.
Refresh Time


.
Notifications

Dropped

LA.

46


,

.

5.1
, .
WCS,
, location
appliance SOAP/XML API .
.

, MonitorMaps
. Floor view (
) , access points
heatmap ,
.
.
.
, . Zoom In/Out,
zoom, ,
heatmap, access points, access points,
access points , chokepoints, WiFi TDoA ( tags),
,
, Planning Mode, Map editor,
.

5.1: floor view.

Maps Tree View, Floor Settings


Load Status.
campus,
MonitorMaps. Floor Settings
.

47

5.2: Floor Settings floor view.

checkboxes,
,
. , :

Access Points. APs .


:
AP
AP, ( )
heatmap, APs

heatmap.

AP heatmaps. / heatmap
APs .
Clients. /
. :
( ),
( Display Label),
, .

48

802.11 Tags. Clients, RFID Tags.


Clients.
Rogue APs. / access points
.
Rogue Adhocs. /
point-to-point .
Rogue Clients. /
Rogue APs.
Coverage Areas/Location Regions/Rails/Markers. /
, map editor.
Chokepoints/WiFi TDoA Receivers. /
RFID Tags.

Display MSE data within last


LA .
250 clients. Save Settings
, .
Load Status
, Load ,
.

.
, MAC , IP, ,
, . access point
Access Point Details WCS
AP, . ,
, Client Details
, ,
. Location History ,
,
LA, .

49

5.2
,

,
.
Location Accuracy Tool
WCS.
, .
,
Advanced Debug Mode LA.
LA WCS . MonitorMaps Properties
.
Advanced Debug Mode.
, ToolsLocation Accuracy Tool.
:

Scheduled (), -
,

,
On-demand ( ),
,
.

test,
New Scheduled Accuracy Test Go.
test, ,
, mail
( SMTP settings WCS).
Position Test Points

. ,
, MAC
Add.
.
drag-n-drop actual location
.
Save, test
Status Scheduled.
on-demand test, New
On-Demand Accuracy Test, test / Position
Test Points .
.
.
50

,
, 1 ,
APs , Start
. 2 ,
, Stop,
, , 1
. , Analyze
Results ,
( 90%
<10m),
.
test
test Location Accuracy Tool. ,
,
Scheduled Test, (tags clients)
, On-demand
Test, 4 .
30 ,
30 ( 10 ),
2 .
.

5.3 (RF Calibration Model)


Location Accuracy Tool
(2 )
,
custom ,
.
(calibration) location patterning,

RSS ,
,
.

51

,
50
150.

.
,
.

, .
RF ,
,
2.4GHz 5GHz.
, 802.11b/g
802.11a, .

, . cisco
open caveat ( CSCsh88795),
CCX
,
. .
,
,
.
,
. ,
access points
.
Dynamic Power Assignment WLC Disable.
.
, manuals cisco

Cisco Client eXtensions (CCX) 2 ,
. CCX
, chipsets WLAN Intel 3945 4965
. ,
.
CCX,
PC card ExpressCard CB21AG cisco
USB.
RF Calibration Model,
MonitorMaps RF Calibration Models .
cisco Calibration Models (Cubes and Walled Offices,
Drywall Office Only & Outdoor Open Space), .
Create New Model
52

( Testing)
OK,
Not yet calibrated.

,
. Add Data Points
Go.
MAC laptop
. laptop
. Next

.

5.3: .


. APs.
,

. :

53

(Point),
,
(Linear),

.

,
APs
, GO.
, 100%
.
Stop,
.

,
.

5.4: .

,
, , GO
,
DONE .


.

5.5: .

,
APs,
54

.
Choose either Point or Linear calibration method and follow the instructions
specified here .

, .
(data points)
. Delete
,
resize Ctrl+drag , Delete. 150 data points
50 , Done
, Calibration Model.
,
.
,
Calibrate. ,
. ,
MonitorMaps,
Floor View Edit Floor Area . Floor
Type (RF Model) OK.
,
, Inspect Location Quality
Calibration Model, Calibrated.

. ,

,
(

), . ,
,
.
(
data center),
.
,

. , Location
Accuracy Tool
.
,
WLAN Tags, clients (rogue ) rogue APs.

55

6.1 APs

,
7 access points.
7 access points ,
,
location-ready . , 3 access points
,

. ,
APs, , AP
.
location-ready
, ,
.
, access points
,

. , 3 6 access points
3 , locationready . 3
, . ,
3-4
, . 1 ,
1 AP , ,
3 . PClab,
2 APs,
, . ,

location-ready ,
, 2 APs,
, .

6.2
, Location Readiness Tool
2 ,

location-ready .
21m
3 APs,
AP. ,
56


access points,
.

6.1: .

, access points
RSS , , access points

,
. manuals cisco,

cubicles,
. ,
access points, location-ready
, Calibration
Model ,
.

.
,
.
,
MMSE
,
. ,
,
,

.

57

6.3

.

access point,
. location-aware ,
, 3
,
(APs, switches, ). ,
access points
,
Location Appliance
.
,
. ,
,
(
15x7.5m) 4 access points, .
( ),
location-aware 30 APs (4 , 1
3-4 ),

.
Location Appliance
MSE (Mobility Services Engine), hardware software,
. ,
WLAN RFID Tags, access points,
Chokepoints TDoA Receivers,
,
laptops, smartphones ,
.

6.4
, access points
, ,
location-ready
, 10m 90%
5m 50% . Inspect Location
Quality Calibration Model
. , location-ready ,
.

58

6.2: Calibration Model .

,
,
,
Cisco,
10m/90% 5m/50%.

.
, ,
(. ),

, !
Location Exclusion Region
, .
Location Exclusion
Regions, ,
, !


,
59

.

, .
manuals Cisco,
.
, Location Accuracy Tool
. ,
,
Failed to run report Unable to parse Accuracy logs.
,
LA (log)
Download Logs ,
.
C windows,
.
parse.c
#include
#include
#include
#include
#include

<stdio.h>
<stdlib.h>
<string.h>
<math.h>
<errno.h>

#define BUFFER_SIZE 512


#define TABLE_SIZE 256
typedef struct pnt {
double x;
double y;
} point;
typedef struct gram {
point actual;
point estim;
double err;
} line;
int find_line(FILE *fp, char *buff)
{
if (fgets(buff, BUFFER_SIZE, fp) == NULL)
return 1; //ERROR or EOF
while (strstr(buff, "TP#") == NULL) {
if (fgets(buff, BUFFER_SIZE, fp) == NULL)
return 1;
}
return 0; //next line is measurement line
}
int parse_line(char *buff, line *ret)
{
int i,j,fl;
strtok(buff, ","); //date
strtok(NULL, ","); //TP#
printf("MAC => %s , ", strtok(NULL, ","));
fl = atoi(strtok(NULL, ",")); //ActualFloorID

60

j = sscanf(strtok(NULL, ","), "%lf", &(ret->actual.x));


if ((j == EOF) || (j == 0)) {
printf("Parse failed.\n");
return(1);
}
j = sscanf(strtok(NULL, ","), "%lf", &(ret->actual.y));
if ((j == EOF) || (j == 0)) {
printf("Parse failed.\n");
return(1);
}

//ActualX

//ActualY

if (fl != atoi(strtok(NULL, ","))) //CalculatedFloorID


return(2); //Floor mismatch
for (j=0; j<4; j++)
strtok(NULL, ","); //RawX,RawY,FilteredX,FilteredY
j = sscanf(strtok(NULL, ","), "%lf", &(ret->estim.x)); //FinalX
if ((j == EOF) || (j == 0)) {
printf("Parse failed.\n");
return(1);
}
j = sscanf(strtok(NULL, ","), "%lf", &(ret->estim.y)); //FinalY
if ((j == EOF) || (j == 0)) {
printf("Parse failed.\n");
return(1);
}
strtok(NULL, ","); //#OrigAPCount
strtok(NULL, ","); //#PrunedDetectingAPs
if (atoi(strtok(NULL, ",")) > 1) {
//status must be 1 for useful
measurement
printf("Not enough valid datapoints.\n");
return(3);
}
ret->err = 0.3048*sqrt( pow(ret->actual.x - ret->estim.x, 2.0) +
pow(ret->actual.y - ret->estim.y, 2.0) );
printf("ERR = %0.2lfm\n", ret->err);
return(0);
}
int main(int argc, char *argv[])
{
int i, j, k;
int wrong_fl = 0;
int accuracy[4]; //10, 5, 3, 1 m
char buffer[BUFFER_SIZE];
line table[TABLE_SIZE];
line *ln;
FILE *fp;
if (argc < 2) {
printf("Syntax: ./%s <file>\n", argv[0]);
return 1;
}
printf("Table size is %d.\n", TABLE_SIZE);
fp = fopen(argv[1], "r");
if (fp == NULL) {
perror("fopen() failed: ");
return 2;
}
i = 0;

61

j = find_line(fp, buffer);
ln = (line *)malloc(sizeof(line));
while ((j == 0) && (i < TABLE_SIZE)) {
if (fgets(buffer, BUFFER_SIZE, fp) == NULL) {
printf("ERROR: Measurement line found but could not be
read.\n");
return 1;
}
k = parse_line(buffer, ln);
if (k == 2) {
printf("Wrong floor!\n");
wrong_fl++;
}
else if (k == 0) {
table[i].actual = ln->actual;
table[i].estim = ln->estim;
table[i].err = ln->err;
i++;
}
j = find_line(fp, buffer);
}
if (j == 0)
printf("Table full. Ignoring rest of file.\n");
printf("Found %d entries.\n", i);
for (j=0; j<4; j++)
accuracy[j] = 0;
for (j=0; j<i; j++) {
if (table[j].err <= 10.0)
accuracy[0]++;
if (table[j].err <= 5.0)
accuracy[1]++;
if (table[j].err <= 3.0)
accuracy[2]++;
if (table[j].err <= 1.0)
accuracy[3]++;
}
printf("\n--- Accuracy results ---\n");
printf("%.1lf%% < 10m\n", 100.0*accuracy[0]/i);
printf("%.1lf%% < 5m\n", 100.0*accuracy[1]/i);
printf("%.1lf%% < 3m\n", 100.0*accuracy[2]/i);
printf("%.1lf%% < 1m\n", 100.0*accuracy[3]/i);
printf("%d (%.1lf%%) on the wrong floor\n", wrong_fl,
100.0*wrong_fl/i);
printf("\nDone!\n");
fclose(fp);
return 0;
}

,
logfile, . ,
.
logfile, :
Timestamp,TP#,MacAddress,ActualFloorId,ActualX,ActualY,FloorId,RawX,RawY
,FilteredX,FilteredY,FinalX,FinalY,#OrigAPCount,#PrunedDetectingAPs,stat
us,LS_IP

62


. timestamp, MAC
, ,
, ,
, RSSI cutoff (.
Location Parameters 4.4), (
RF Fingerprinting), ,
RSSI cutoff, (1
) ip hostname location appliance. :
Mon Jan 17 12:00:50 EET
2011,1,00:19:d2:5c:95:8b,4,90.2231,116.7979,4,94.278114,112.752785,100.7
6248,118.95229,100.76248,118.95229,25,7,1,la.ntua.gr

,
( actual final )
,
5m.
.

logfile
Calibration Model .
, . ,
10 ,
. , Calibration
Model , ,
, ,
,
.

63

6.3: RF Calibration Model.

RFID tags,
chokepoints TDoA receivers. chokepoint ( exciter)
MAC , RFID tags
. tag beacon
access points , MAC
chokepoint . location appliance,
APs chokepoint,
. TDoA
(Time Difference of Arrival), ,
tags.
3 TDoA receivers tag location appliance,
,
RSS.

6.5 Bugs
bugs.
, ,
resize map editor
, ,
Mozilla 3.5 4 Windows XP.
,
,
64

, .
.
bug
.

,
! , ,
, 1ft = 30cm
1m = 3.3ft.
.

65

7

WLAN

.
,
,
,
,
.
Location-Based Services (LBS),
WLAN.

7.1
GPS ,

, GPS

. GPS
,
.
,
.
:

.
, 10
GPS
. Wi-Fi
2 ,
. ,
,
(RTLS RealTime Location
System),
.
.
APs ,

APs.
, , APs
,
.

66

(network-side),
,
(client-side),
APs. ,
laptop, PDA smartphone, web
. ,

GPS, ,
.
,
GPS
APs
, ,
.
.

, , ,

. ,


. ,

.

7.2
,
. ,
, ,

.


. ,
( ,
) (
), .
,
,
,
.

67

7.3
, ,
,
. (laptops,
smartphones ) campus.
,
, MAC .

, .
, MAC
,
.
, Voice-over-IP
(VoIP),
. ,
Wi-Fi VoIP,
.
E911
,
Wi-Fi VoIP.
,
,

.
, .
,
,
.

68

:
C:\Dev-Cpp\proj>accuracy_parser.exe rf-00-19-d2-5c-95-8b.log
Table size is 256.
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b

,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,

Not
ERR
ERR
ERR
ERR
Not
Not
ERR
ERR
ERR
Not
Not
ERR
ERR
ERR
ERR
ERR
Not
Not
ERR
ERR
ERR
ERR
Not
Not
ERR
ERR
ERR
ERR
ERR
ERR
ERR
ERR
ERR
ERR
ERR
Not
Not
ERR
ERR
ERR
ERR
ERR
ERR
Not
Not
ERR
ERR
ERR
ERR
ERR
Not
Not
ERR
ERR
ERR

enough valid
= 3.28m
= 2.14m
= 0.62m
= 0.59m
enough valid
enough valid
= 4.64m
= 1.93m
= 2.04m
enough valid
enough valid
= 6.84m
= 4.85m
= 6.94m
= 7.44m
= 4.57m
enough valid
enough valid
= 4.14m
= 8.82m
= 4.72m
= 4.23m
enough valid
enough valid
= 21.78m
= 8.53m
= 4.64m
= 6.19m
= 4.70m
= 4.05m
= 4.33m
= 4.51m
= 4.68m
= 4.66m
= 4.64m
enough valid
enough valid
= 2.87m
= 5.05m
= 5.39m
= 5.20m
= 5.23m
= 7.16m
enough valid
enough valid
= 11.71m
= 5.01m
= 5.93m
= 2.01m
= 3.09m
enough valid
enough valid
= 8.33m
= 7.23m
= 7.40m

69

datapoints.

datapoints.
datapoints.

datapoints.
datapoints.

datapoints.
datapoints.

datapoints.
datapoints.

datapoints.
datapoints.

datapoints.
datapoints.

datapoints.
datapoints.

MAC => 00:19:d2:5c:95:8b


MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
MAC => 00:19:d2:5c:95:8b
Found 45 entries.

,
,
,
,
,

ERR
ERR
ERR
ERR
Not

= 6.93m
= 6.88m
= 6.56m
= 6.70m
enough valid datapoints.

--- Accuracy results --95.6% < 10m


51.1% < 5m
15.6% < 3m
4.4% < 1m
0 (0.0%) on the wrong floor
Done!

( , 21.78m,

.)

70


A locating method for WLAN based location service. Lang, V. and Gu, C. 2005. Beijing : s.n.,
2005. IEEE International Conference on e-Business Engineering 2005.
A.M. Ladd, K.E. Bekris, G. Marceau, A. Rudys, D.S. Wallach, L.E. Kavraki. 2002. RoboticsBased Location Sensing using Wireless Ethernet. MOBICOM 02, Atlanta, Georgia. 2002.
Elliott D. Kaplan, Christopher Hegarty. 2005. Understanding GPS: Principles and Applications.
Second Edition. s.l. : Artech House, 2005.
Ho, K.C. and Chan, Y.T. 1993. Solution and performance analysis of geolocation by TDOA.
IEEE Transactions on Aerospace and Electronic Systems. 1993, Vol. 29, 4.
Hsiuping Lin, Ying Zhang, Martin Griss, Ilya Landa. 2009. WASP: An Enhanced Indoor
Locationing Algorithm for a Congested Wi-Fi Environment. Lecture Notes in Computer
Science: Mobile Entity Localization and Tracking in GPS-less Environnments. 2009, Vol. 5801.
Junglas, Iris A. and Watson, Richard T. 2008. Location-based services. Communications of the
ACM. 2008, Vol. 51, 3.
Marco Porretta, Paolo Nepa, Giuliano Manara, Filippo Giannetti. 2008. Location, Location,
Location. IEEE Vehicular Technology Magazine. June 2008.
Modeling of indoor positioning systems based on location fingerprinting. Kaemarungsi, K.
and Krishnamurthy, P. s.l. : IEEE. INFOCOM 2004. Twenty-third Annual Joint Conference of
the IEEE Computer and Communications Societies.
Performance of a TDOA-AOA hybrid mobile location system. Thomas, N.J., Cruickshank,
D.G.M. and Laurenson, D.I. London, UK : IEEE. Second International Conference on 3G
Mobile Communication Technologies, 2001.
Ping Tao, Algis Rudys, Andrew M. Ladd, an S. Wallach. 2003. Wireless LAN Location-Sensing
for Security Applications. WiSE 03. September 19, 2003.
Preserving location privacy in wireless lans. Jiang, Tao, Wang, Helen J. and Hu, Yih-Chun.
2007. San Juan, Puerto Rico : ACM, 2007. Proceedings of the 5th international conference on
Mobile systems, applications and services.
RADAR: An in-building RF-based user location and tracking system. Bahl, P. and
Padmanabhan, V.N. Tel Aviv, Israel : IEEE. INFOCOM 2000. Nineteenth Annual Joint
Conference of the IEEE Computer and Communications Societies.
Renaudin, Valrie, et al. 2007. Indoor Navigation of Emergency Agents. European Journal of
Navigation. 2007, Vol. 5, 3.
Roos, Teemu, et al. 2002. A Probabilistic Approach to WLAN User Location Estimation.
International Journal of Wireless Information Networks. 2002.

71

Youssef, M.A., Agrawala, A. and Udaya Shankar, A. 2003. WLAN location determination via
clustering and probability distributions. Proceedings of the First IEEE International Conference
on Pervasive Computing and Communications. 2003.

Cisco:
Cisco Context-Aware Service Configuration Guide Release 6.0
Cisco Wireless LAN Controller Configuration Guide Software Release 6.0
Cisco Wireless Control System Configuration Guide Software Release 6.0
Cisco Wi-Fi Location-Based Services 4.1 Design Guide
Cisco 2700 Series Wireless Location Appliance Deployment Guide
Cisco Location Appliance Configuration Guide Release 6.0
Design and Deployment of Location-Based Service for WLANs (Cisco live! Networkers Event
June 2008 Orlando FL)

Wikipedia:
http://en.wikipedia.org/wiki/Real-time_locating_system
http://en.wikipedia.org/wiki/Multilateration

72

You might also like