Pre-Lab 1.4: Indoor Localization

What are Estimote Beacons?

Estimote Beacons and Stickers are small wireless sensors that you can attach to any location or object. They broadcast tiny radio signals which your smartphone can receive and interpret, unlocking micro-location and contextual awareness. Apps installed on smartphone can respond either with a notification or another action depending on the application requirements.

Estimote Beacons and Stickers are like tiny computers. They have a powerful ARM processor, memory, Bluetooth Smart module, and temperature and motion sensors. Powered by a coin battery, they broadcast radio signals through built-in antennas.


Important Features of Estimote Beacons

  1. Broadcasting range and proximity: You can think about the beacon as a small lighthouse tower that’s installed in a fixed location and broadcasts its presence to all the ships (smartphones) around. They could be as little as 2 inches and as far as 230 feet (approx. 70 metres) away. The exact maximum range depends on the environment of course. Bluetooth is using the same type of radiowaves as 2.4Ghz WiFi routers. The signal can be diffracted, interferred or absorbed by water (including the human body).
    Phones or other smart devices in the range can pickup the Bluetooth radio signal (without previous pairing) and estimate their distance to the beacon by measuring the received signal strength (RSSI). The closer you are to the beacon, the stronger the signal is. Depending on implemention, devices could probe the signal every second (1 Hz) or 10 times a second (10 Hz). The more often it’s done, the more stable signal and the more responsive application is, and the better customer experience can be achieved.
  2. Unique Identifiers:  Smartphone can pick up signal from more than one beacon at the same time. If there are three or more beacons within range, your phone can calculate the distance to each beacon and use this data to estimate its relative location. This technique is something that sailors had used for ages. They were navigating thanks to unique fixed markers like lighthouses or stars. Estimote Beacons can be uniquely identified as well since each beacon broadcasts its own ID.
    Every ID is 20 bytes long and is divided into three sections: proximityUUID (16 bytes) + major number (2 bytes) + minor number (2 bytes). Here is an ID example: c2d360a002a601315add1040f3913c300102 – think about it as an IP number of each device.
  3. Context and micro-location: Once you get an ID and the distance (RSSI) to the beacon you get micro-location and context. You could now take detected ID and depending on the distance display different actions on user’s phone.
  4. Geofencing: Apps can also subscribe in the operating system (both iOS and Android) to constantly listen for particular identifiers. When the phone comes into the range of a beacon, the app is notified about this, even if the phone is locked or the app is not currently running.
  5. Monitoring distance and triggering events: Additionally the smartphone is continuously monitoring the strength of the signal (or RSSI), which is compared to three predefined ranges that divide the area around a beacon into three zones – far, near and immediate. The application is also notified which zone the phone is currently in. Whenever the user enters a zone, their context may change, so the OS notifies the application about this event as well.

Estimote SDK

You will need Estimote SDK for this lab. The Estimote SDK for Android is a library that allows interaction with Estimote beacons. The SDK system requirements are Android 4.3 or above and Bluetooth Low Energy.

It allows for:

  • beacon ranging (scans beacons and optionally filters them by their properties)
  • beacon monitoring (monitors regions for those devices that have entered/exited a region)
  • beacon characteristic reading and writing (proximity UUID, major & minor values, broadcasting power, advertising interval), see BeaconConnection class and demos in the SDK

Additional Reading (Optional)

What is ranging?

Ranging allows apps to know the relative distance between a device and beacons. This can be very valuable – consider for example an indoor location app of a department store. The app can determine which department (such as footwear, clothing, accessories etc) you’re closest by. Information about this proximity can be used within the app to show fitting guides or offer discounts.

As Bluetooth Low Energy ranging depends on detecting radio signals, results will vary depending on the placement of Estimote beacons and whether a user’s mobile device is in-hand, in a bag or a pocket. Clear line of sight between a mobile device and a beacon will yield better results so it is recommended that Estimote beacons not be hidden between shelves.

To enjoy consistent ranging it is good practice to use the app in the foreground while the user is holding the device in-hand (which means the app is on and running).

Apps can use the startRanging method of the BeaconManager class to determine relative proximity of beacons in the region and can be updated when this distance changes. Ranging updates come every second to listeners registered with the setRangingListener method of the BeaconManager class. Ranging updates contain a list of currently found beacons. If a beacon goes out of range it will not be presented on this list.

Ranging is designed to be used for apps running in the foreground.

What is monitoring?

Region monitoring is a term used to describe a Bluetooth device’s usage and detect when a user is in the vicinity of beacons. You can use this functionality to show alerts or provide contextually aware information as a user enters or exits a beacon region. Beacon regions are defined by the following beacon properties:

proximity UUID: 128-bit unique identifier,
major: 16-bit unsigned integer to differentiate between beacons within the same proximity UUID,
minor: 16-bit unsigned integer to differentiate between beacons with the same proximity UUID and major value.
Note that all of these values are optional, meaning that a single region can encompass multiple beacons — which creates interesting use cases. Consider for example a department store that is identified by a particular proximity UUID and major value. Different sections of the store are differentiated further by a different minor value. An app can monitor region defined by their proximity UUID and major value to provide location-relevant information by distinguishing minor values.

Apps can use the startMonitoring method of the BeaconManager class to start monitoring regions. Monitoring updates come to listeners registered with the setMonitoringListener method of the BeaconsManager class.

Monitoring is designed to perform periodic scans in the background. By default it scans for 5 seconds and sleeps for 25 seconds. This means that it can take by default up to 30 seconds to detect entering or exiting a region. Default behaviour can be changed via BeaconManager#setBackgroundScanPeriod.