This thesis addresses the measurement of indoor space occupancy through
passive detection of BLE advertising packets. The starting point is the
observation that almost every mobile device continuously
broadcasts BLE advertising packets regardless of whether it is actively being
used, which allows the presence of people to be inferred indirectly -- without
cameras and without any interaction with the observed devices.
A complete system was designed and built: sensor nodes based on the ESP32-C3
microcontroller that passively scan for BLE packets, an MQTT messaging layer,
a FastAPI backend with an InfluxDB time-series database, and a web dashboard
providing node management and over-the-air firmware updates. Data collection is
deliberately minimal: the occupancy estimate is derived entirely from the
aggregate device count, and MAC addresses are needed only within a short
in-memory sliding window.
Random MAC address rotation is a privacy mechanism that causes a single
physical device to appear as several distinct devices over time. Related
systems often mention this effect only in passing, whereas this work treats
it as the central challenge of the method. Rather than resolving rotated
addresses algorithmically, the problem is addressed through empirical
calibration of an inflation factor for a given space.
The system was evaluated in a real office environment through several
weeks of continuous data collection. The measurements show a stable
baseline device count, a pronounced difference between weekdays and
weekends, and a repeatable daily pattern with a morning peak. Concurrent
manual headcounts confirm a proportional relationship between the number
of detected devices and the number of people present, although that ratio
varies noticeably between individual counts. The results confirm that
passive BLE sensing is a reliable basis for a categorical occupancy
estimate, while exact counting of individual people is not attainable
with it.
|