Beacon demo for the BLE API using the nRF51822 native mode drivers
Dependencies: BLE_API mbed nRF51822 X_NUCLEO_IDB0XA1
You are viewing an older revision! See the latest version
Homepage
Introduction¶
Bluetooth Low Energy Beacons are a service that allow for highly localized positioning. The Beacon service is particularly useful for indoor positioning, low power positioning and location aware software. A particular use of the Beacon service is iBeacon. The iBeacon standard is a Apple specific implementation of Beacons.
The Basics¶
The Beacon service is a BLE Service that operates in advertising mode only. A Beacon service advertises 3 main things:
- A unique UUID (unique to a retailer)
- A Major number (ex a store number)
- A Minor number (ex a location in the store)
These three pieces of information are all you need for a Beacon service to work. The majority of the heavy lifting is done by the smart phone application that reads these three fields and then uses a web app or a database of some sort to turn these numbers into valuable information about what you are near and how near you are to it.
There is actually a 4th piece of information, the Transmission Strength of the signal that is transmitted as part of every packet, this is compared to the actual strength of the signal received to determine how close the beacon is to the phone. The number used is the signal strength 1 meter from the device. By doing this 1 meter increments can be used to measure distance from the Beacon. The distances usually get broken down into 3 ranges:
- Immediate: Within a few centimeters
- Near: Within a couple of meters
- Far: Greater than 10 meters away
Example : Coffee Shop X¶
For example, if a smartphone app reads a BLE Beacon with UUID = 0x1234546... , Major Number=5, Minor number = 3, it would check that against a database. From that database it would find out that UUID 0x123456... is owned by Coffee Shop X, that Major number 5 belongs to the store on main street and that Minor number 3 belongs to the coffee rack in that store. Then the application could check to see if there are any deals for the Coffee Shop X on Main Street on Coffee today. If there are any deals the phone could then alert the user and display a coupon code.
Example : museum¶
The Beacon service also provides a way for the phone to tell how close it is to the beacon. This can be useful for location aware applications, such as in a museum. For example, the smartphone reads a BLE Beacon with UUID = 0x98765....., Major Number=1, minor number = 0. The smartphone then looks this up in a database and find the UUID is for the Natural Science Museum, Major Number 1 = the Art Gallery room 1, and the minor number 0 = an abstract painting of a duck. If we assume all the paintings are spread out at 10feet each, then the application can sense when you are within 3 feet of the painting (based on signal strength of the Beacon) and give the user information about the painting they are approaching.
Technical Details¶
Technically any UUID can be used for a Beacon. What makes iBeacons special is Apple bought a special UUID and uses it as a preamble ( for reference its 0x 02 01 06 1A FF 4C 00 02 15), under which other companies can license a piece. Using this example program you can either use Apples preamble or you can use your own. Just keep in mind that you may know what the preamble means to you, but no one else will.
For a more depth explanation please see these well done explanations:
- iBeacons – How do they (technically) work? : a great explanation of Beacons and especially iBeacons
- How do iBeacons work? : a great leymans overview of iBeacons and Beacons at large by extension