Bluetooth Device Tracking with Trilateration

Overview

This project focuses on developing a system that will allow Bluetooth device tracking in a prepared area. We intend to create a set of small, portable units that can be placed in a building to quickly set up a network to monitor Bluetooth signals and calculate a position for said devices.

Device Overview

The units described above will consist of a computer and Bluetooth adapter. Using this setup we can gather information about each device in order to locate it. Our current design for each unit is a set of three devices arranged in the shape of a right triangle. The device on the right angle of the triangle is the master unit, where the positioning calculations are performed and where the two secondary units send their own data. It is also this master unit that will report the calculations to the user. At the time of this blog post we are using laptops running Kali Linux with an attached Ubertooth One. The laptops provide us with an abundance of processing power and the convenience of a built in battery. In a more practical implementation, each laptop could be substituted with a micro-computer like a Raspberry Pi and a battery bank.

Ubertooth

The Ubertooth One is a small USB device developed by Great Scott Gadgets that serves as a platform for Project Ubertooth. Project Ubertooth is an open source wireless development program that allows for Bluetooth experimentation when used with any Ubertooth device. Ubertooth devices stand out because of their small size and cost in comparison to other Class 1 Bluetooth devices. Still, if you don’t want to drop $100 on one, the design is all open source! A post on the creator’s blog provides a guide on how to go about building your own. For our project, we are utilizing the basic Ubertooth tools in tandem with a program by Pwnie Express called Blue Hydra.

Blue Hydra

Blue Hydra is the name of the tool we are using to gather information about the devices around us through Bluetooth. The program is written in Python and Ruby. While running, Blue Hydra retrieves information about the device’s name, type, manufacturer, Bluetooth Address, Bluetooth version, and RSSI values. It then formats all of the discovered data into a database file that can be opened and viewed at any time. When combined with an Ubertooth device, Blue Hydra can even capture data from undiscoverable devices, or devices which are already connected to one another.

Bluetooth Device Tracking

Trilateration VS. Triangulation

One of the first decisions we had to make was exactly how to calculate a position for detected devices. The first impression was that triangulation would work fine, and we began looking at various methods of doing so. However, we discovered that the values we would need for triangulation were not easily obtainable from the information gathered by our hardware. In the process of researching these calculations, however, we found another method of calculation called trilateration. The difference between triangulation and trilateration is in what they measure: triangulation calculates positions based on the angles of a triangle, and trilateration measures the distances between a known point and an unknown point.

Although the difference may seem arbitrary, it is actually a critical factor to our project’s success. Since trilateration allows a distance calculation for an unknown point, it means that trilateration technically calculates range as a circle around the known point. By calculating the distance to an unknown point from three known points, where these circles intersect is the area in which our unknown device is located. This is shown in the image below:

Conclusion

Our team is making significant progress towards being able to track Bluetooth devices through a building. In future blog posts we will be covering the nuts and bolts of how our system works, and providing more detailed examples. We are also working on a full guide on setting up an Ubertooth device and interfacing with Blue Hydra software. Out plan is to provide our own code for the trilateration of Bluetooth devices later this semester. Stay tuned for more updates and breakthroughs in the coming weeks!

We welcome all feedback! Feel free to comment here or email us at lcdi@champlain.edu. You can also follow us on Facebook or Twitter for the most recent updates on projects, such as App Analysis, VPN Proxy Chain, and more!