Here’s a question we received from a university student with our answer below.
Q: I am a student at the University of …. in the school of engineering, and I am working on a project involving BLE beacons. Our current idea is to create an app that can scan for the BLE beacons, measure the RSSI, smooth, it and turn it into a distance that can be displayed on a map on the app. It would display the location of the phone on a map similarly to how Google Maps works. My question is, can your BC011 BLE beacons work for this project? In addition to this, would it be possible for you to offer some guidance on this project?
A: You are on the right track, sorta, but need to add some pieces…
Firstly, measuring the live RSSI is correct to get distance. Smoothing the number is correct too (you might need to be creative i.e. simple mathematical smoothing might not be enough; you might also need to throw out or correct “crazy” RSSI measurements which pop up once in a while).
OK, now you have distance, but that is not enough to get location. For location, you need to scanner (the phone) to “see” at least three beacons, then trilaterate to figure out the location of the phone compared to the fixed location of the known beacons.
Google “trilaterating beacons to find location”, and you can find some examples how people accomplish this.
You could also consider looking into HomeAssistant which is a home automation open source thing. Some guy created an “integration” code package to accomplish trilateration. It’s called Bermuda. A different coding language than an app, but it might give you some good ideas: https://github.com/agittins/bermuda
Hint1: For your app, don’t start with “BLE device” coding libraries. A beacon is a BLE device, but a very specific type that does not act the same way as almost all other BLE devices. So try looking for Beacon Scanning code libraries instead.
Hint2: Also remember that the whole point of beacons is to work without a connection. So don’t get confused and try to connect. “Beacons” are like little lighthouses on the seashore (hence the name Beacon). You just “see” them from your boat and know roughly where you are. You don’t try to connect with the lighthouse keeper for a chat. 😂