Using Bluetooth Metadata to Infer Social Context

Researchers from Idiap Research Institute and EPFL, Switzerland have been looking into the use of smartphone data, include Bluetooth metadata to try to infer social context, for example whether someone is alone or not.

The paper Understanding Social Context from Smartphone Sensing: Generalization Across Countries and Daily Life Moments (pdf) attempts to better understand human behaviour and mental well-being. The paper focuses on the use of passive smartphone sensors, including Bluetooth, to track the social context of individuals over time. In the past, this field of research has been limited by the fact that most studies have only been conducted in one or two countries and often focused on specific contexts such as eating or drinking.

This paper aims to overcome these limitations by using a new, extensive and multimodal smartphone sensing dataset that includes over 216,000 self-reports from more than 580 participants across five different countries – Mongolia, Italy, Denmark, the UK and Paraguay. The goal is to explore the feasibility of using sensor data to infer whether a person is alone or not and to examine how behavioural and country-level diversity influences this inference.

The sensor data comes from 34 different sensors, divided into continuous and interaction sensing modalities. Continuous sensing includes types of activity, step count, Bluetooth, WiFi, location, cellular, and proximity data, while interaction sensing involves app usage, touch events, screen on/off episodes, and notifications. In terms of Bluetooth, the study used both normal and low-energy Bluetooth capturing data on the number of connected devices and received signal strength indicators (RSSI).

The study’s key findings suggest that sensor features can be used to infer the social context. The research also found that models partially personalised to multi-country and country-specific data achieved similar accuracy levels, typically ranging from 80% to 90%. However, the models did not generalise well to unseen countries regardless of geographic similarity.

View sensor beacons

Beacons Enable Ambient Intelligence

Ambient Intelligence (AmI) is a digital environment that subtly reacts, adapts, and responds to the presence of humans. This implies a setting that can foresee users’ requirements, recognising changes in context and providing services that are anticipatory, adaptive, and personalised. It seamlessly integrates into everyday activities and objects, employing a range of advanced technologies including Artificial Intelligence (AI), the Internet of Things (IoT), ubiquitous computing and context-aware computing.

Sensor beacons play a pivotal role in achieving ambient intelligence. Equipped with technologies such as Bluetooth Low Energy (BLE), sensor beacons gather environmental data and pinpoint the location or presence of objects or people. For instance, in a smart home environment, sensor beacons might identify when a person enters or leaves a room, and cause lighting to be adjusted automatically. In a retail setting, they can supply customers with personalised advertisements or detailed product information when they approach a specific product.

Ambient intelligence mixes several key technological and conceptual components, including Industry 4.0, the Physical Web, IoT and the smart home.

Industry 4.0 marks the fourth industrial revolution, characterised by heightened digitisation and interconnectivity of products, business models, and value chains. It incorporates elements like IoT, cloud computing, and cyber-physical systems, and ambient intelligence is an integral part of this transformation, facilitating intelligent, adaptive interactions within industrial settings.

The Physical Web concept involves the integration of interconnected smart objects into the World Wide Web. Objects equipped with sensor beacons can be viewed as part of the Physical Web, generating real-world interactions specific to certain locations via the internet. Moreover, ambient intelligence aligns closely with the broader concept of the Internet of Things (IoT), a network of physical devices embedded with sensors and software to connect, communicate and exchange data over the internet. Here, devices not only communicate and connect but also adapt and anticipate user needs.

The smart home concept involves leveraging IoT, AI, and other advanced technologies to automate numerous features, from lighting and temperature to security. Ambient intelligence, in this context, doesn’t just automate homes; it makes them sensitive and responsive to the inhabitants’ requirements and contexts. This makes ambient intelligence a pivotal part of smart homes, contributing to their adaptive, intelligent functioning.

View sensor beacons

Nordic Wireless Quarter 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 use of Nordic SoCs in the following Bluetooth solutions:

  • The T1 Tomahawk smart tape measure
  • A beacon tag that enables a wireless manifest for helicopter crews
  • LocoTrack pallet tracking beacons
  • A pet tracker beacon that uses machine learning to detect animal health problems

The magazine also announces the new nRF54 Series of SoCs that have higher performance processing and much more on-board memory. We don’t expect these to end up in beacons because such performance isn’t required for beacons. Instead they will make their way into solutions such as Bluetooth gateways.

There’s an in-depth article on Retail that shows how wireless tech is improving the retail experience, maximising profits for the retailer and delivering value added convenience for customers. There’s mention of Stratosfy’s Tempgenie solution that uses temperature sensor beacons and a Bluetooth LE to Wi-Fi gateway to measure and alert on the ambient and surface temperature of front- and back-of-house
equipment.

Finally, there’s a useful article ‘Planet Bluetooth’ that charts the history of Bluetooth’s spread and evolution into areas and applications that were once unimagined.

Reverse Engineering iBeacon and Eddystone Bluetooth GATT Services

For some of our beacons such the manufacturers haven’t documented their Bluetooth Service Characteristics. This means that while they are ok for scanning/proximity type applications, you can’t write your own app to, for example, change programmatically the UUID, major and minor, transmit power, advertising period and must rely on the manufacturer’s configuration app. While this of no consequence for the majority of uses that set and forget settings, more ambitious scenarios might want directly access the Bluetooth GATT services to change settings.

Uri Shaked has a great article on Medium on how to Reverse Engineer a Bluetooth Lightbulb. His method uses the developer logging in Android 4.4 and later to allow inspection of the Bluetooth packets and hence the Bluetooth Services and Characteristics that are being used. This method can equally be used with iBeacon and Eddystone beacons to reverse engineer the Bluetooth GATT information.

Another method is to use a Bluetooth sniffer. This listens in on the Bluetooth communication between two devices. One way of doing this is with Nordic Semiconductor’s Sniffer software on a dongle. There’s a tutorial on JimmyIoT.

It’s usually ill-advised to reverse engineer interfaces to discover undocumented features because the manufacturer can change the implementation thus breaking your solution. However, it’s very rare that firmware is ever updated in beacons and when it is, it’s usually only to fix bugs rather than change the implementation.

Processing on Bluetooth Device or Smartphone?

There’s often a dilemma when creating Bluetooth systems whether to place the processing on the smartphone or on the Bluetooth device.

The efficient and accurate prediction of an individual’s heart rate using wearable devices is crucial for various personal care applications. A new study Energy-efficient Wearable-to-Mobile Offload of Machine Learning Inference for Photoplethysmogram-based Heart-Rate Estimation (pdf) from the Universita di Bologna, Italy, looks into the trade-offs between carrying out heart rate tracking on the device itself or delegating the work to a mobile device.

The research introduces CHRIS, an inference system that uses the interconnectedness between a smartwatch and a smartphone. This system assesses the balance between energy consumption and heart rate tracking error. Depending on the connection status, a user-specified error, energy constraints and an estimate of the input difficulty, CHRIS employs two heart rate prediction algorithms. These are executed on either the smartwatch or the phone.

CHRIS showed the potential to achieve up to 2.03 times energy reduction on the smartwatch by deferring processing off the smartwatch, without a reduction on the tracking accuracy.

Indoor Tracking of Individuals with Mild Cognitive Impairment

There’s new research from the USA on Indoor Localization using Bluetooth and Inertial Motion Sensors in Distributed Edge and Cloud Computing Environment (PDF). The paper describes a low-cost, scalable, edge computing system for tracking indoor movements in a large indoor facility. The system uses Bluetooth Low Energy (BLE) and Inertial Measurement Unit sensors (IMU) and is designed to facilitate therapeutic activities for individuals with Mild Cognitive Impairment.


The implementation involved instrumenting a facility with 39 edge computing systems and an on-premise fog server. Subjects carried BLE beacon and IMU sensors on-body. The researchers developed an adaptive trilateration approach that considered the temporal density of hits from the BLE beacon to surrounding edge devices to handle inconsistent coverage of edge devices in large spaces with varying signal strength. They also integrated IMU-based tracking methods using a dead-reckoning technique to improve the system’s accuracy.


The conclusions of the study showed that the proposed system could robustly localise the position of multiple people with an average error of 4 meters across the entire study space, also showing 87% accuracy for room-level localisations. The integration of IMU-based dead-reckoning with Bluetooth-based localisation further enhanced the system’s accuracy.

Using Packet Loss to Infer Location

There’s new research from the University of Illinois titled Packet Reception Probability: Packets That You Can’t Decode Can Help Keep You Safe (pdf). Many existing systems estimate distance using the Receiver Signal Strength Indicator (RSSI) which is negatively impacted by sampling bias and multipath effects. As an alternative, the study uses Packet Reception Probability (PRP) that utilises packet loss to estimate distance.

Localisation is achieved through a Bayesian-PRP approach that also includes an explicit model of multipath. To facilitate straightforward deployment, there’s no need for any modifications to hardware, firmware, or driver-level on standard devices and only minimal training is required.

A variety of devices were used including Bluvision iBeeks, BluFi, a Texas Instrument Packet Sniffer, a laptop, and Android smartphones (Nexus5x). 60 iBeacons were deployed in a library and 38 in a retail store. The Texas Instrument Packet Sniffer, connected to a Windows laptop was used for packet reception from beacons. Android phones were equipped with a purpose-built Android app.

PRP was found to provide metre-level accuracy with just six devices in known locations and 12 training locations. Combining PRP with RSSI was found to be beneficial at short distances up to 2m. Beyond distances of 2m, fusing the two is less effective than using PRP alone because RSSI becomes de-correlated with distance.

VR, Digital Twins and Bluetooth Beacons

There’s new research from School of Electronic Engineering, Dublin City University, Dublin into using Bluetooth beacons to enhance Digital Twin VR Experiences. The paper BeTwin: Enhancing VR Experiences with BLE Beacon-based Digital Twins integrates Bluetooth Low Energy (BLE) beacons with a digital twin environment to enhance and customize a virtual 3D platform.

The beacons are used to bring information from real objects into the virtual platform. The article investigates the impact of beacon distance, energy levels and the number of beacons on the system performance. The proposed mechanism employs beacons to easily add and remove objects in a real-virtual world twinned context.

The findings indicated that the most time-consuming aspect of the system was the generation of objects, which was largely dependent on the duration it takes for the VR application to receive and process messages from the Raspberry Pi. The experiments showed that the application can efficiently handle beacon messages and create corresponding virtual content provided that the beacons are positioned in close proximity to the beacon reader.

Programming Bluetooth with Python on Linux

Python is an increasingly popular programming language due to its simplicity and readability. The gatt-python library for Python that facilitates the implementation and communication with Bluetooth Low Energy devices using the Generic Attribute Profile (GATT). GATT is the specification for the transmission and reception of short data over a Bluetooth Low Energy link.

The SDK supports a range of functionalities, including device discovery, connection and disconnection, custom GATT profile implementation and access to all Bluetooth GATT services and characteristics. It also allows for reading and writing characteristic values and subscribing to notifications for changes in these values. The library is only compatible with Linux because it uses the D-Bus API of BlueZ for Bluetooth device interaction.

Predicting Use of Bluetooth Frequency Bands

There’s new research on predicting the channel access of Bluetooth Low Energy (BLE) devices conducted by a team from Silicon Austria Labs GmbH and Johannes Kepler University in Austria. The team aimed to estimate the channels used by multiple BLE connections by passively listening to the channel, with the goal of predicting future channel access to avoid collisions in other wireless networks.

The hardware setup for this research consisted of six Nordic NRF52840 BLE devices that formed three BLE connection pairs, and one sniffer based on the Ubertooth One. This setup allowed the researchers to actively monitor and analyse the BLE channel.

Channel hopping over time

The researchers demonstrated that by passively listening they could reconstruct channel access algorithms for multiple BLE connections in parallel. This approach can be used in new applications to avoid collisions in wireless networks, particularly in applications with high reliability requirements.