New Python Library

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.

Mobile Forms for Eddystone and iBeacons

We recently came across TracerPlus, a system that allows you to scan and collect Eddystone and iBeacon data into forms on iOS and Android.

A desktop application builder is used to design the forms:

The system can be used to efficiently take inventory and capture additional data from beacons for example, unique identifiers for items, battery life, temperature and URL information.

TracerPlus provides semi-custom mobile applications at a fraction of the cost of custom software.

Using Bluetooth Beacons for Epidemic Risk Mitigation

There’s innovative new research by Max Planck Institute for Security and Privacy on Listening to Bluetooth Beacons for Epidemic Risk Mitigation.

Solutions usually detect and store contact events between Bluetooth devices that has poor interoperability when applied to smartphones. Adoption rates are also low due to privacy concerns and resultant systems depend on subsequent manual contact tracing.

Instead, a new architecture is used that comprises standard beacons carried by users and detectors placed in strategic locations where infection clusters are most likely to originate. [This is similar to the architecture used for IoT sensing using gateways.]

The system helps control disease spread at lower adoption rates. It also provides significantly higher sensitivity and specificity than existing app-based systems.

Read about Beacons for Workplace Social Distancing and Contact Tracing

Where Can I Find a Beacon Solution that Does xyz?

We get lots of enquiries along the lines of:

“Where Can I Find a Beacon Solution that Does xyz?”

Where xyz could be one of many things. Unfortunately, we don’t have a full knowledge of what’s out there, particularly because it’s continually changing.

We maintain a BeaconZone Solutions Directory where we list solutions we have found in the categories of marketing/retail, industry/logistics, buildings/staff, visitor spaces, transportation, education and personal.

If you can’t find a solution, we also create custom solutions.

Reactive Bluetooth Programming

Connecting programatically to a Bluetooth device involves the following stages:

  1. Scanning for peripherals’ advertising
  2. Connecting to the peripheral via GATT
  3. Discovering the peripheral’s services
  4. Discovering the peripheral’s characteristics
  5. Reading and writing to a characteristic’s value and/or monitoring characteristic value change via a Notify

Each of these stages is asynchronous because each takes a relatively long time in computing terms. This means the code needs to call something but continue running to remain responsive to other events and later process the result of a stage via a callback from the Bluetooth library. The connection isn’t reliable because it’s wireless. Different kinds of failure, also notified via callbacks, require the code to go back one or more stages depending on the severity of the error.

All this gets very messy, confusing and difficult to understand in the resultant code. Reactive (Rx) programming attempts to solve such asynchronous complexity problems by using the Observable Pattern to broadcast and subscribe to values and other events from an Observable stream.

There are Reactive implementations such as RxSwift on iOS and RxJava on Android. There are also Bluetooth specific libraries such as RxBluetoothKit for iOS/OSX and RxAndroidBle that make asynchronous Bluetooth code in Swift/Java much easier to understand and maintain.

Reactive programming used to be very popular not just for asynchronous programming but also for general Android programming. It has fallen out use for general programming mainly due to Kotlin which is now the ‘latest thing’.

Naive developers have a tendency to want to use the ‘latest thing’ or ‘clever techniques’ while experienced developers choose the right tool for the job. A common error is to over-use and combine design patterns, such as observables, in simple scenarios, which hinders rather than simplifies understanding.

The nature and relative complexity of your project should determine whether it’s worth using Reactive code. It’s not necessary an ‘all or nothing’ decision. It’s possible to choose to use observable pattern techniques only in parts of code with extreme asynchronous complexity rather than in all the code.

Sensor Placement Optimisation Research

There’s interesting new research into Sensor Placement Optimization for Critical-grid Coverage Problem of Indoor Positioning (PDF).

This research looked into optimising the location of sensors as opposed to the more usual methods of filtering signals to improve accuracy. The aim was to reduce deployment costs by deploying more sensors in critical areas that were identified as needing greater positioning accuracy.

The critical-grid coverage scheme and NSGA-II algorithm were used to optimise the placement of iBeacon nodes in underground parking lots.

Read about Using Beacons, iBeacons for Real-time Locating Systems (RTLS)

Occupancy Detection Using BLE Beacons

The Covid pandemic has resulted in many organisations looking to quantify occupancy. This is especially so in education where government guidelines tend to be based on occupancy as well as social distancing.

Occupancy isn’t just relevant to pandemics. It’s also a factor in, for example, building emergency management when determining the optimal plan of action, for example, when allocating emergency personnel. Similar situations exist in police and military settings where, additionally, it’s advantageous to know the real time location of assets, people and casualties.

Past research on Occupancy Detection for Building Emergency Management Using BLE Beacons investigated use of a system made up of Bluetooth beacons installed in rooms and an app installed on occupants’ smartphones.

The research system used Raspberry Pis as iBeacons and Android phones as Bluetooth detectors. Fingerprinting was used to to produce data that fed into a multi-class SVM classification with classes being different room areas. The system was able to provide high occupancy accuracy and identify occupant movement patterns.

There are many problems with using such a system in real life. The Raspberry Pi beacons are fragile and have long term reliability problems due to the use of Micro SD storage. Systems based on fingerprinting rarely work long term because wireless signals change when there are changes in the physical environment such as more people or change in furniture. Using smartphones as detectors also isn’t always reliable because people fiddle with apps, change permissions and real time use implies a larger battery drain.

Instead, it’s necessary to turn the system around and have beacons on people and use dedicated devices, gateways, as detectors. In the simplest case, the gateways send detections to a server to be processed. More sophisticated systems such as our BeaconRTLS™ provide intelligent processing, mapping, alerts and reporting such as occupancy per zone.

Read about Using Beacons, iBeacons for Real-time Locating Systems (RTLS)

New Nordic Semiconductor Wireless Q Magazine

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
  • Smart health

There’s also an informative article exploring the usefulness of patents.

Read about Beacon Proximity and Sensing for the Internet of Things (IoT)

Sensor beacons

Gateways