iBeacon Indoor Localization

Master's research project focused on using Bluetooth iBeacons for indoor localization.

iBeacon Indoor Localization

Indoor localization faces many challenges from physical to logistical. Our research team is focused on trying to improve this technology and enable low-cost yet scalable and effective indoor tracking. Our hope is that our solution focused on Bluetooth Low-Energy iBeacons will be the answer.


# About The iBeacon Indoor Localization Project is a research project that has emerged from a research team at NC State University. It has evolved significantly over the years. The team is led by Dr. Michael Devetsikiotis and funded by IBM. Currently, there are two main members of the team: myself and Mahdi Inaya, a Master's student in ECE at NC State. We work together to lead the research effort. Indoor localization has been a hot topic in recent years (see below for some potential applications). However, there are many issues with implementing it. The cheapest solution has tended to be using existing Wi-Fi access points and networks to approximate distance. However, the issue with this is that you require a large number of access points to be effective, especially if you hope for the solution to be scalable. More expensive solutions involve low frequency waves, but this is more costly. Currently, we are investigating the use of Bluetooth Low-Energy iBeacons with indoor localization. The devices can communicate with a Bluetooth scanning device with their identifying information (i.e., a UUID). When the communications are received by the device, it can use the received signal strength indicator (rssi) value as input to an equation to approximate distance.

The Gimbal Beacon that is used as an iBeacon for location tracking

Raspberry Pi nodes are attached to the walls throughout EB II

# Solution Our solution is to use **Bluetooth Low-Energy (BLE) iBeacons** with **Raspberry Pi** nodes. The Pis, running **asynchronous Node.js** software, are able to detect these beacons and report their sightings to a server via an **Mosquitto MQTT** broker. A **multi-threaded Python client** runs on the server that retrieves this data from the MQTT broker and then stores it into a **MariaDB SQL database**. In addition to this, we also have some supporting infrastructure. I established a **Flask web server** that enables the creation of **REST API endpoints** and a **website** via a **Python backend**. The API endpoints are used to quickly access information from the database. The website is used to display information about the health of our system and to notify us via email if something goes wrong. The website heavily relies on the use of **Bootstrap** and **jQuery** and utilizes **AJAX** queries to communicate with the backend. ### Scalability This solution is intended to be highly scalable. Whether you are tracking a few iBeacons or hundreds, this system will remain resilient. The Node.js code on the Raspberry Pi's exhibit a high degree of asynchronous execution, and the use of the MQTT broker allows for the multi-threaded Python client to quickly and efficiently load-balance and handle the data, even in periods of extremely high activity. In addition, adding more Raspberry Pi's (to allow for more accurate tracking or tracking in new locations) is simply a matter of powering up a new Pi with an SD card loaded with our image.
Raspberry Pi Status Page

Our website shows the status of each Raspberry Pi using a heartbeat protocol

# Applications With just one device, you are able to estimate how far an iBeacon is from the device. This will enable a large number of technologies in the future. For example, consider the application in smart buildings, where proximity can be used to determine what rooms people are in and thus adjust the lights. Or, perhaps a museum wishes to establish interactive exhibits where displays will show certain information depending on what path the person has taken through the museum. Even consider the application where a supermarket integrates this technology and can provide targeted advertising to people based on what aisle they are in or what aisles they will future soon. # Publication Our team was able to publish a paper on this project that was presented at the IEEE Infocom Workshop on Smart Cities in April 2017. The paper, "A Real-Subject Evaluation Trial for Location-Aware Smart Buildings," can be found [at this link](https://www.researchgate.net/publication/316910790_A_Real-Subject_Evaluation_Trial_for_Location-Aware_Smart_Buildings) ([PDF direct download](/assets/publications/Meli_iBeacons_IEEEINFOCOMWorkshop17.pdf)).