Elsevier

Computer Networks

Volume 163, 9 November 2019, 106876
Computer Networks

Accurate occupancy estimation with WiFi and bluetooth/BLE packet capture

https://doi.org/10.1016/j.comnet.2019.106876Get rights and content

Abstract

The capillary spread of personal devices equipped with wireless communication capabilities has enabled a series of high level services which build on capturing and processing the data packets emitted by such devices. In this paper we tackle the problem of exploiting such a methodology to perform occupancy estimation, i.e., understanding how many people are present in a specific place, an information which is valuable in many scenarios (HVAC and lighting system control, building energy optimisation, allocation and reservation of spaces, etc.). Traditional systems for occupancy estimation rely either on environmental sensors (CO2, temperature, humidity) or video cameras, which both have drawbacks: the former have generally low accuracy, while the latter require high setup and maintenance costs. In this paper we depart from such traditional approaches and propose a cheap and accurate occupancy estimation system based on the capture of both Wi-Fi and Bluetooth or Bluetooth Low Energy management frames transmitted from users’ devices. The system, implemented on low-cost hardware, leverages a supervised learning model to adapt to different spaces and transmits estimated occupancy information to a web-based dashboard. Experimental results in both indoor and outdoor uncontrolled scenarios demonstrate the validity of the proposed solution.

Introduction

Recent CISCO reports estimate that by 2021 there will be around 11.6 billions active mobile-connected devices, exceeding the forecasted global population of 7.8 billion, that is around 1.5 mobile devices per capita. Most of these devices will be smartphones or equivalent handheld personal ready devices; however, it is expected that a fraction as large as 30% will be constituted by IoT, wearable or M2M devices (smart watches, health and fitness trackers, etc.) that will communicate to the network either directly through embedded cellular connectivity or most likely through a smartphone with other wireless communication technologies such as Wi-Fi and Bluetooth or Bluetooth Low Energy (BLE).

In parallel to such a capillary spread of mobile devices, a new set of application services is emerging by properly capturing and processing the peculiar signals emitted by such devices. Indeed, both WiFi and Bluetooth/BLE are wireless communication protocols whose management frames can be easily captured with minimal hardware equipments and processed to perform user localisation and tracking, behaviour estimation, device classification and de-anonymisation, market analysis and many others [1].

In this scenario, we focus on the very specific problem of counting how many people are present in a certain area through the capture and processing of wireless frames. The problem has several implications in many fields related to building management and optimisation: as an example, in the control of indoor lighting or Heat, Ventilation and Air Conditioning (HVAC) systems, an accurate information of the number of occupants may allow energy savings ranging from 30% up to 80%, according to several studies [2], [3], [4]. Beside energy efficiency, occupancy information can be exploited to monitor the quality of indoor living and to maintain a comfortable environment for its occupants. In some scenarios, occupancy information can be also exploited to provide services to the building administrators and occupants. As an example, keeping track of the real time occupancy of spaces is a fundamental building block for automatic monitoring systems to prevent overcrowding or to trigger alerts in case of anomalies. Also, in large company settings, knowing in real-time which offices or rooms are free may be very valuable to quickly find places where to have a meeting. Similarly, knowing how many people are present in the room devoted to lunch may be useful to plan the lunch break and avoid the infamous queues at the microwave. In universities, knowing which classrooms are not occupied can be very useful for students in search of a quiet place to study or work on a project alone or in group.

Traditional systems for occupancy estimation rely on environmental sensors (CO2, temperature, humidity) or video cameras. However, both approaches have associated pros and cons: on the one hand environmental sensors are a cheap solution although generally not very accurate. On the other hand, camera-based systems are much more precise, but they are generally costly to deploy and maintain as well as being problematic for what concerns privacy issues.

In this paper we show that the task of occupancy estimation can be performed accurately using low-cost wireless sniffers, which capture management frames transmitted by Wi-Fi and Bluetooth personal devices even without a proper connection to a network nor user data to deliver. Wi-Fi enabled devices periodically transmit Probe Requests to collect information on the network served by access points in range. As for Bluetooth devices, Inquiry Scan frames are used to discover available devices and their information. Both types of frames are transmitted without encryption and can be easily captured with cheap off-the-shelves sniffers. Moreover they contain unique device identifiers (MAC addresses), therefore making possible to estimate the number of distinct devices present around the sniffer and ultimately providing a measure of the occupancy status of a space.

In this paper, we extend the research presented in [5], in which we developed a system able to perform occupancy estimation using only Wi-Fi frames, collected by low-cost sniffers. The system presented in this paper collects Wi-Fi Probe Requests as well as Bluetooth Inquiry Scans and Bluetooth Low Energy frames and extracts a set of features capturing diverse device behaviors and signal strength levels. The input features are fed into a supervised regression model which adapts to the specific environment under consideration and outputs the occupancy estimation. Finally, such information is delivered to a central server which provides real-time monitoring of the spaces of a building.

The paper is structured as it follows: Section 2 presents an overview of the state of the art concerning occupancy detection, with reference to different methods of estimation. Section 3 presents the implementation of the system, including the hardware design of the sniffer, the learning and estimation model as well as the data visualization service. Section 4 evaluate the proposed system with experiments conducted in different spaces of a university department, and finally Section 5 concludes the paper.

Section snippets

Related work

Several works in the last few years have tackled the problem of estimating the occupancy in indoor and outdoor spaces. The existing works can be categorised based on the type of sensing technology used in three main classes: (i) environmental-based, (ii) video-based and (iii) radio-based.

Proposed system

We perform occupancy estimation leveraging a single piece of hardware capable of sniffing Wi-Fi and Bluetooth frames. For the latter radio technology we consider both the classic version and the low-energy extension (BLE). The market already offers several low-cost options for the task at hand: as an example, the $35 Raspberry PI3 model B is equipped with Broadcom’s BCM43438 chipset, capable of both 802.11ac/b/g/n and Bluetooth Classic / BLE transmissions. Similarly, several system on chips

Experiments

In order to evaluate the performance of the proposed system, we carried out measurements in different spaces of an university campus, including both indoor and outdoor environments used for recreational, working or studying activities. The details of each experimental scenario are given in the following and summarized in Table 4:

  • Indoor Space 1 (IS1): the first experiment is conducted in an indoor university laboratory. The environment has an area of about 80 sqm and is characterized by 20 fixed

Conclusion

We proposed a system for estimating the occupancy of spaces based on the capture of Wi-Fi probe requests and Bluetooth/BLE management frames. The system is built using a single dual technology sniffer able to process received packets and create different sets of features capturing different device behaviours. Such features are later fed into two supervised learning models for performing either precise occupancy estimation or occupancy level classification. We tested our prototype in

Declaration of Competing Interest

We wish to confirm that there are no known conflicts of interest associated with this publication and there has been no significant financial support for this work that could have influenced its outcome.

Edoardo Longo received his MS in Computer Science and Engineering in 2017 from Politecnico di Milano. He is currently an assistant researcher at the Advanced Network Technologies Laboratory (ANTLab) of Politecnico di Milano. His research activities are focused on Internet of Things systems for Smart Cities, with specific focus on Real Time Localisation Systems.

References (33)

  • J. Martin et al.

    A study of mac address randomization in mobile devices and when it fails

    Proc. Priv. Enhanc. Technol.

    (2017)
  • Y. Agarwal et al.

    Occupancy-driven energy management for smart building automation

    Proceedings of the 2nd ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Building

    (2010)
  • V.L. Erickson et al.

    Energy efficient building environment control strategies using real-time occupancy measurements

    Proceedings of the First ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Buildings

    (2009)
  • Z. Yang et al.

    A multi-sensor based occupancy estimation model for supporting demand driven HVAC operations

    Proceedings of the 2012 Symposium on Simulation for Architecture and Urban Design

    (2012)
  • P. Galluzzi et al.

    Occupancy estimation using low-cost wi-fi sniffers

    BalkanCom 2018, Second International Balkan Conference on Communications and Networking

    (2018)
  • L. Zimmermann et al.

    Fusion of non-intrusive environmental sensors for occupancy detection in smart homes

    IEEE Internet Things J.

    (2017)
  • Cited by (41)

    • Edge-based passive crowd monitoring through WiFi Beacons

      2022, Computer Communications
      Citation Excerpt :

      The whole analysis provided here for WiFi could be replicated in a similar way for Bluetooth or Bluetooth Low Energy (BLE). Indeed, there are many examples in the literature of similar analysis conducted via Bluetooth interfaces [17,18], achieving promising results. At the outset of this project, we configured our sensors to analyze WiFi and BLE in parallel.

    View all citing articles on Scopus

    Edoardo Longo received his MS in Computer Science and Engineering in 2017 from Politecnico di Milano. He is currently an assistant researcher at the Advanced Network Technologies Laboratory (ANTLab) of Politecnico di Milano. His research activities are focused on Internet of Things systems for Smart Cities, with specific focus on Real Time Localisation Systems.

    Alessandro Redondi is currently Assistant Professor with the Dipartimento di Elettronica, Informazione e Bioingegneria of the Politecnico di Milano, Italy. He received the MS in Computer Engineering in July 2009 and the Ph.D. in Information Engineering in February 2014, both from Politecnico di Milano. From September 2012 to April 2013 Alessandro was a visiting student at the EEE Department of the University College of London (UCL). His research activities are focused on the design and optimization of IoT systems and on network data analytics.

    Matteo Cesana is currently an Associate Professor with the Dipartimento di Elettronica, Informazione e Bioingegneria of the Politecnico di Milano, Italy. He received his MS degree in Telecommunications Engineering and his Ph.D. degree in Information Engineering from Politecnico di Milano in July 2000 and in September 2004, respectively. From September 2002 to March 2003 he was a visiting researcher at the Computer Science Department of the University of California in Los Angeles (UCLA). His research activities are in the field of design, optimization and performance evaluation of wireless networks with a specific focus on communication technologies for the Internet of Things and Future Generation Cellular Networks. Dr. Cesana is an Associate Editor of the Ad Hoc Networks Journal (Elsevier).

    View full text