Bluetooth Triangulation: Implementing a Positioning System using Bluetooth Signals and GPS, Study Guides, Projects, Research of Electrical and Electronics Engineering

A project that aims to determine the position of a bluetooth device by triangulating its signal strength using multiple bluetooth devices and gps coordinates. The authors explain the concept of bluetooth triangulation, the equipment used, and the software programming involved. They also discuss the challenges encountered and the solutions implemented.

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 07/31/2009

koofers-user-j30
koofers-user-j30 🇺🇸

9 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Bluetooth Triangulation
Bluetooth Triangulation
Authors:Authors:
AndreiAndrei
TrungTrung
JonathanJonathan
Bluetooth
Bluetooth
uShort range (10 m), low power consumption, 2.45 GHz ISM
uVoice and data transmission, approx. 1 Mbit/s gross data
rate, including system overhead
uTwo Bluetooth devices within 10m of each other can share
up to 720 kbps of capacity
uUniversal radio interface for ad-hoc wireless connectivity
uDesigned to operate with up to 8 devices communicating in
a small network called piconet
uInterconnecting computer and peripherals, handheld
devices, PDAs, cell phones replacement of IrDA
uEmbedded in other devices, such as audio headsets,
speakers, printers, digital cameras
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Bluetooth Triangulation: Implementing a Positioning System using Bluetooth Signals and GPS and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

Bluetooth Triangulation Bluetooth Triangulation

Authors:Authors:

AndreiAndrei

TrungTrung

JonathanJonathan

BluetoothBluetooth

u Short range (10 m), low power consumption, 2.45 GHz ISM

u Voice and data transmission, approx. 1 Mbit/s gross data

rate, including system overhead

u Two Bluetooth devices within 10m of each other can share

up to 720 kbps of capacity

u Universal radio interface for ad-hoc wireless connectivity

u Designed to operate with up to 8 devices communicating in

a small network called piconet

u Interconnecting computer and peripherals, handheld

devices, PDAs, cell phones – replacement of IrDA

u Embedded in other devices, such as audio headsets,

speakers, printers, digital cameras

Idea Idea

Ant Ant

Ant

Device

Antenna
1.Scan for Bluetooth device
2.RedFang can brute force MAC
address if needed
3.Determine signal strength
4.Get location via GPS device
5.Send packets to a server
containing location and signal
strength
6.Map signal strength to a
distance and find difference in
GPS location in meters.
7.Triangulate to find the
position of the Device.
Server
Bluetooth device
data relayed to
small computer to
calculate
triangulation.

EquipmentEquipment

uu 2.4 GHz ISM Band2.4 GHz ISM Band

uu IEEE 802.11b and 802.11g Wireless LANIEEE 802.11b and 802.11g Wireless LAN

uu Directional and multipoint applicationsDirectional and multipoint applications

uu Bluetooth®Bluetooth®

uu Public Wireless HotspotPublic Wireless Hotspot

uu WiFiWiFi

uu Light weightLight weight

uu All weather operationAll weather operation

uu UVUV--stable, UL flame ratedstable, UL flame rated radomeradome

2.4 GHz 14.5 dBi Radome Enclosed Wireless LAN Yagi Antenna

How did we get the Signal?How did we get the Signal?

uu BlueZBlueZ -- An implementation of theAn implementation of the

Bluetooth™ wireless standardsBluetooth™ wireless standards

specifications for Linuxspecifications for Linux

uu BluezBluez is included in every kernelis included in every kernel

from 2.4, we compiled our ownfrom 2.4, we compiled our own

distribution ofdistribution of BlueZBlueZ to tie our sourceto tie our source

code into the system callcode into the system call

How did we get GPS coordinates? How did we get GPS coordinates?

uu GPSTK is a GPS toolkit for LinuxGPSTK is a GPS toolkit for Linux

uu 110 if (110 if (raimSolver.isValidraimSolver.isValid())())

111 { 112111 { 112 coutcout << setprecision(12) <<<< setprecision(12) <<

raimSolver.Solution[0] << " " ;raimSolver.Solution[0] << " " ;

113 113 coutcout << raimSolver.Solution[1] << " ";<< raimSolver.Solution[1] << " ";

114 114 coutcout << raimSolver.Solution[2];<< raimSolver.Solution[2];

115 115 coutcout <<<< endlendl ;;

The above code merely writes the positionThe above code merely writes the position

calculation to standard output in Degreescalculation to standard output in Degrees

minutes.minutes.

Software we programmed Software we programmed

uu ClientClient –– reused sample text chatreused sample text chat

client from 152B. Converted it toclient from 152B. Converted it to

send signal datasend signal data

uu ServerServer –– reused sample text chatreused sample text chat

server from 152B. Converted it to doserver from 152B. Converted it to do

parsing and triangulationparsing and triangulation

uu GUIGUI

Limiting Factor in Project Limiting Factor in Project

uu Need accurate signal to distanceNeed accurate signal to distance

ratio in order to triangulate.ratio in order to triangulate.

Measurements Measurements

uu How: At first we checked the signal at everyHow: At first we checked the signal at every

meter from the antenna.meter from the antenna.

uu Bad idea.Bad idea. Took too long and wasn’t efficientTook too long and wasn’t efficient

(signal didn’t change much over a given distance)(signal didn’t change much over a given distance)

uu Better idea:Better idea: we used the GPS device to get ourwe used the GPS device to get our

distance relative to the antenna.distance relative to the antenna. Then, weThen, we

measured the signal strength at various points.measured the signal strength at various points.

Performed multiple tests at same distance andPerformed multiple tests at same distance and

averaged results.averaged results. Planned on using linearPlanned on using linear

regression to derive an equation for our signal toregression to derive an equation for our signal to

distance ratios.distance ratios. We could then use the equationWe could then use the equation

to approximate the distance of the antennato approximate the distance of the antenna relative to the device.relative to the device.

Triangulation Calculation Triangulation Calculation

uu By using the distance formula, we canBy using the distance formula, we can
come up with three equations:come up with three equations:

A: (PxA: (Px –– R0_x)^2 + (R0_x)^2 + (P yP y –– R0_y)^2 = D0^2R0_y)^2 = D0^ B: (PxB: (Px –– R1_x)^2 + (R1_x)^2 + (P yP y –– R1_y)^2 = D1^2R1_y)^2 = D1^ C: (PxC: (Px –– R2_x)^2 + (R2_x)^2 + (PyPy –– R2_y)^2 = D2^2R2_y)^2 = D2^

And we reduce them to 2 equations inAnd we reduce them to 2 equations in
the form of:the form of:

AA –– B:B: aPx + baPx + bPyPy = e= e BB –– C: cPx + dC: cPx + dPyPy = f= f

Where a, b, c, d, e, f are just someWhere a, b, c, d, e, f are just some
constants.constants.
D
D
D

R2_x, R2_y

R0_x, R0_y

R1_x, R1_y

Px, Py

Solving the Linear Equations Solving the Linear Equations

uu aPx + baPx + bPyPy = e= e

uu cPx + dcPx + dPyPy = f= f

These two equations can be solved by using the Cramer’sThese two equations can be solved by using the Cramer’s

RuleRule

DetDet(( )) DetDet(( ))

Px =Px = PyPy ==

DetDet(( )) DetDet(( ))

e b
f c
a b
c d
a e
c f
a b
c d

Code SegmentCode Segment

uu Actual code used to figure out the location of theActual code used to figure out the location of the BlueToothBlueTooth devicedevice

public static Point2D.Doublepublic static Point2D.Double computeGPS(doublecomputeGPS(double a1, double b1, double d1, double a2, double b2, doublea1, double b1, double d1, double a2, double b2, double d2, double a3, double b3, double d3){d2, double a3, double b3, double d3){ double A, B, C, D, E, F, X, Y,double A, B, C, D, E, F, X, Y, DetXDetX,, DetYDetY,, DetDet;; A =A = --2a1 + 2a2;2a1 + 2a2; B =B = --2b1 + 2b2;2b1 + 2b2; C =C = --2a2 + 2a3;2a2 + 2a3; D =D = --2b2 + 2b3;2b2 + 2b3; E = Math.pow(d1, 2)E = Math.pow(d1, 2) -- Math.pow(d2, 2)Math.pow(d2, 2) --Math.pow(a1, 2) + Math.pow(a2, 2)Math.pow(a1, 2) + Math.pow(a2, 2) -- Math.pow(b1, 2) +Math.pow(b1, 2) + Math.pow(b2, 2);Math.pow(b2, 2); F = Math.pow(d2, 2)F = Math.pow(d2, 2) -- Math.pow(d3, 2)Math.pow(d3, 2) --Math.pow(a2, 2) + Math.pow(a3, 2)Math.pow(a2, 2) + Math.pow(a3, 2) -- Math.pow(b2, 2) +Math.pow(b2, 2) + Math.pow(b3, 2);Math.pow(b3, 2);

//Using Cramer’s Rule//Using Cramer’s Rule DetDet = AD= AD -- BC;BC; DetXDetX = ED= ED -- BF;BF; DetYDetY = AF= AF -- EC;EC;

return new Point2D.Double(DetX/Det,return new Point2D.Double(DetX/Det, DetY/DetDetY/Det);); }}

Blame the equipment!!! Blame the equipment!!!

Better yet, blame the guy that Better yet, blame the guy that

suggested this lame projectsuggested this lame project

Possible ProblemsPossible Problems

uu Connection QualityConnection Quality-- BluezBluez could havecould have

been operating based on a thresholdbeen operating based on a threshold

for the minimum connection qualityfor the minimum connection quality

necessary to transmit data (i.e. a file)necessary to transmit data (i.e. a file)

uu Signal strength didn’t go below 200Signal strength didn’t go below 200

(on a scale from 1 to 255) and others(on a scale from 1 to 255) and others

have detected a signal at approx. ahave detected a signal at approx. a

km with the same antenna.km with the same antenna.

Possible solutionsPossible solutions

uu Hardware scanner thatHardware scanner that syncronizessyncronizes

withwith bluetoothbluetooth spreadspread--spectrumspectrum

hopping and returns any active SNR,hopping and returns any active SNR,

not just usable link SNR.not just usable link SNR.

Milling the stock Milling the stock

Constructing the enclosure Constructing the enclosure

Painting and fitting Painting and fitting

The end.The end.

uu Demo the scanner and GUIDemo the scanner and GUI