INGICS, supplier of Bluetooth WiFi gateways and sensor beacons, has a new open source example. The BeaconLair code is implemented using Docker to simplify setup. Internally it uses Golang, Eclipse Mosquitto, InfluxDB and Grafana. The platform receives data from INGICS iGS03 BLE gateways and data from iBS sensor beacons.
The dashboard, using Grafana, provides gateways remote control, viewing of beacons and beacon sensor values.
INGICSLair
It can be used to remotely control gateways including device OTA upgrade, changing of the RSSI filters and provides configuration using all supported telnet commands.
Most of the time, beacons transmit and the receiving software such as apps on iOS and Android or applications on single board computers (SBC) only read the advertising data. There’s no connection to the beacon. However, for programmatic setup of beacon parameters or accessing some sensor data, applications might need to connect via what’s known as Bluetooth GATT.
There’s an article on How to Work Properly With BT LE On Android. It provides some useful pointers such as not performing scanning and GATT connection simultaneously, avoiding auto-connect and not blocking GATT callbacks.
GATT can be unreliable on Android. While scanning for advertising data usually works very well, we have found that GATT connections fail all the time on about 5% of devices. This is due to poorly implemented OS Bluetooth software. This means beacon manufacturer-supplied configuration apps sometimes can’t connect. The only solution is to use a different phone (or the iOS version of the app on iPhone).
The primary consideration when siting beacons is the location. Beacons work best when there’s a line of sight. If the beacons are static and received by devices such as smartphones then the best position is higher up where they won’t be blocked. If the beacons are moving, the receiver, for example a gateway, is best placed overhead. When thinking about the location of static beacons, also consider camouflaging them or placing them out of reach so that they don’t become victim to theft.
Attachment
Think about how you will attach the beacons. Many beacons come with a strong double sided 3M-branded tape. While this can work, the glue or underlying surface can fail in the long term due to the affects of heat and moisture. Also, it can be difficult to remove or replace a beacon in the shorter term without damaging the surface decoration.
Since the Covid pandemic, when many organisations needed to determine room occupancy, it has become more acceptable to use beacons for tracking people. For example, health is just one industry where tracking remains vital, for example tracking vulnerable patients and determining the location of care providers.
There’s an increasingly number of scenarios where beacons are being worn. In order to facilitate this we have a wearable category and also stock lanyards.
It’s often mentioned by the press and even some platform providers that beacons can transmit content, for example text, images or other multimedia content to smartphones. People contacting us expect this to happen (without an app) and we end up spending a lot of time explaining how it really works.
Beacons don’t send content to phones and instead they send an id (or URL) that an app uses to get content from a server. This doesn’t work without an app.
This article is more useful than it might first seem. Zephyr isn’t just another Linux operating system (OS) but is the chosen OS for developing Nordic Semiconductor’s latest system on a chip devices (SOCs) that form the basis of the majority of shipping Bluetooth beacons. Previously, Nordic Semiconductor had their own OS delivered through nRF5 SDKs but development is being moved to the Zephyr-based nRF Connect SDK.
iBeacon advertising
The iBeacon article explains how to broadcast an iBeacon advertisement and what to change to alter the various Bluetooth advertising parameters.
Bluetooth beacons advertising iBeacon can be used to perform indoor locating using trilateration. Trilateration is where three receivers are used to measure signal strength (RSSI) to calculate the position.
The implementation uses MQTT to send the data to a React app on a server where it’s displayed on a floorplan.
In practice, you might want to consider creating a more robust solution that uses Bluetooth gateways rather than ESP32 devices. There’s also the Bluetooth AoA Direction Finding standard that’s more accurate than using RSSI.
In most cases beacons ‘just work’ but it’s sometimes the case that beacon detection is erratic. A beacon might be detected but not all the time. Problems can be due to the strength and/or quality of the received signal. The first step is to quantify the signal strength so you can measure it at various distances and beacon positions. The post on Testing if a Beacon is Working explains how to use an app such as nRF Connect to measure signal strength (RSSI) using a smartphone.
nRFConnect detecting beacons
If you are not getting a large enough signal at longer distances then try increasing the transmit power. This is labelled ‘Tx power’ in most setup apps. Make sure it is at least 0dBm and increase it to +4dBm for a longer range. Note that changing from 0dBM to +4dBm will reduce battery life by over a half. Another option is to use a beacon with a longer range.
Minew setup tx power
Another reason for poor detection is blocking of the line of sight. The degree of blocking depends on the blocking material. The post on What Can Block Beacon Signals? provides more information.
If beacon detection is erratic irrespective of the distance you need to look into the relationship between how often the beacon is advertising vs how often the receiver is listening. The post on Why Bluetooth LE Scanning Doesn’t Always See Devices (the First Time) provides a detailed explanation. This kind of problem can often be solved by decreasing the advertising period. This is sometimes labelled ‘Advertising interval’ as in the above example screenshot. Again, reducing this by, for example, a half will halve the battery life. It needs to be 600ms or less if iOS is to reliably detect beacons.
We are seeing more and more customers using beacons in driving-related scenarios. Most are using beacons to trigger when the user gets into or out of a vehicle. For example, driversnote tracks your trips ready for your mileage claim. However, apps such as this are for personal use and there’s a larger market and opportunity in company/fleet management. For example, mileagecount has an automated mileage capture system based on beacons.
The key thing here is that beacons are being used to trigger something, mileage capture in this case. It’s automated, unobtrusive and doesn’t necessarily produce app notifications. There’s a very large number of similar usecases in other industries waiting to be explored.
Aventri is an all-in-one event platform that allows enterprise companies to run engaging in-person, virtual and hybrid events.
Their mobile event app can detect beacons placed at strategic locations across the event, for example, at each booth. The iBeacon can cause the app to show an automated message when a visitor is in range of a booth. It also allows you to silently measure foot traffic at the event.