








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 14
This page cannot be seen from the preview
Don't miss anything!









BluetoothBluetooth
Idea Idea
Ant Ant
Ant
Device
EquipmentEquipment
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?
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
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^
AA –– B:B: aPx + baPx + bPyPy = e= e BB –– C: cPx + dC: cPx + dPyPy = f= f
R2_x, R2_y
R0_x, R0_y
R1_x, R1_y
Solving the Linear Equations Solving the Linear Equations
Code SegmentCode Segment
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