The Bluetooth SIG has an infographic that depicts eight location-based usecases where Bluetooth can be used to create better visitor experiences and improve operational efficiency. It explains how smartphones are helping to drive rapid adoption of Bluetooth due to their inherent compatibility.
The usecases demonstrate some of the kinds of solutions we create at Beaconzone.
When connecting to Bluetooth devices such as beacons via GATT, APIs are used to connect to specific Bluetooth Services and Bluetooth Characteristics. Services and Characteristics are identified by 128-bit UUID values written as 00000000-0000-1000-0000-000000000000 where each digit is a hexadecimal number. For example, an app might connect to a Service with id D35B1000-E01C-9FAC-BA8D-7CE20BDBA0C6 and then read and write to a Characteristic with id D35B1001-E01C-9FAC-BA8D-7CE20BDBA0C6.
In practice, an interface usually uses similar UUIDs that only change in the xxxx part of the UUID: D35Bxxxx-E01C-9FAC-BA8D-7CE20BDBA0C6. There’s usually a base UUID such as D35B0000-E01C-9FAC-BA8D-7CE20BDBA0C6 and only 16-bits values are provided in the interface documented description.
Here’s an example from the Meeblue beacon documentation:
The Meeblue base UUID is D35B0000-E01C-9FAC-BA8D-7CE20BDBA0C6. When it’s said the UUID is 0x1000, the actual UUID is D35B1000-E01C-9FAC-BA8D-7CE20BDBA0C6.
Most use of Bluetooth LE and beacons only looks at the transmitted advertising containing identification and sensor information. More advanced use requires connection to the device using GATT to write, read and be notified of changes in values (Bluetooth Service Characteristics). The most common use for connecting is to set configurable settings as in the case of device manufacturer smartphone apps.
Some solutions need to manipulate Bluetooth Service Characteristics programmatically. Barry Byford has a new Pyton library BLE-GATT for Linux based devices. It’s based on the BlueZ D-Bus API, features a small number of dependencies and can be easily installed without sudo privileges.
Nordic Semiconductor, the manufacturer of the System on a Chip (SoC) in many beacons, has published the latest online issue of Wireless Quarter Magazine. It showcases the many uses of Nordic SoCs.
The latest issue of the magazine highlights the increasing use of IoT. Nordic Semiconductor has been known for enabling Bluetooth and cellular solutions and with their recent acquisition of Imagination Technologies this now extends to WiFi.
The magazine covers many usecases including:
Bluetooth connected prosthetics
CHIP smart home
There’s also an informative article exploring the usefulness of patents.
Bluetooth devices such as beacons periodically advertise data according to a pre-defined format such as iBeacon or Eddystone. The advertising is very short, of the order of 1ms. Listening devices such as apps or gateways scan for a defined time, the scan window, periodically every scan interval. The scanning scan window is usually less than the scan interval to conserve power because scanning is power intensive.
While scanning nearly always sees a nearby device, there can be times when it isn’t seen due to physical and technical reasons. Radio signals can get blocked and reflected in ways that cause them not to be received. Also, if two Bluetooth devices happen to advertise at the same time then the received radio signal is corrupted. It’s also possible that because scans stop and start, the advertising happens when the scan isn’t running.
In practice the chance of non-detection happening is small. The chances of it happening again, the next scan, are very unlikely. If a beacon isn’t seen on the first scan it’s usually seen on the second (or third) attempt.
Bluetooth has some mitigations to help reduce the occurrence of the above mentioned situations. The advertising and scanning happens on multiple channels (frequencies) 37, 38 and 39 to reduce the affect of interference from other devices. Also, the advertising interval isn’t fixed and varies by a random amount, the advertising delay, for up to 10ms, to prevent two (or more) devices’ advertising continually colliding.
The consequence of scanning possibly not seeing beacons (the first time) is that solutions using apps or gateways must not rely on only one scan to make decisions on the absence of a beacon.
Martin covered scanning, GATT, how to maximise data rates, speed vs reliability and using different PHY for enhanced range or data rates. The second part of the talk covers Bluetooth Mesh and proxy nodes.
One thing not mentioned in the slides, to be careful of, is that connection via a proxy node is relatively slow because it’s limited by the GATT connection. Proxy nodes are good for controlling (sending small amounts of data into) a Bluetooth Mesh but poor if you want to use the connected Android device as a gateway for all outgoing data.
Beacons send most of the time periodically advertising the same data. For setup, apps usually connect to them to set settings such as the advertising period, unique id and power level. The connection is performed using standard Bluetooth GATT.
Bluetooth LE devices connect to others via GATT. Devices such as fitness trackers and our social distancing beacons are regularly connected to, to download data. It’s also common to connect to sensor beacons to extract sensor data.
GATT is usually used via compiled code and it can be time consuming to test GATT devices and/or subsequently use the GATT interface in a flexible way. Should you need to do this, take a look at Bleak GATT client software capable of connecting to Bluetooth LE devices acting as GATT servers. It provides an asynchronous, cross-platform (Windows 10, Linux, Mac) Python API to connect and communicate with Bluetooth devices.