BLE Indoor Positioning with ESP32: RSSI, Anchors and Honest Accuracy
Indoor positioning sounds like a geometry problem, but the hardest part is often the radio environment. Walls, people, shelving, antenna orientation and multipath change received signal strength (RSSI). An ESP32 scanner can collect useful proximity evidence, but an RSSI-to-distance formula does not turn a beacon into a precise indoor GPS. Start with the product question: room, zone, approach or coordinates?
Published September 28, 202613 min readBLE proximity and location
Build a calibrated anchor pipeline
Make measurements, location estimates and business events separate stages
1 / AdvertiseTag sends rotating identifier and battery state.
2 / ScanESP32 anchors report ID, RSSI and scan time.
3 / EstimateFilter observations and infer a zone with confidence.
4 / ActPublish a presence event only when policy allows.
Calibrate anchors in the actual space at representative heights and orientations. BLE advertisements may be observed at different intervals due to scan windows, interference and device behavior. Preserve anchor identity, timestamp, RSSI, channel if available, tag identifier and scanner firmware. A missing observation is not proof the tag left the building.
RSSI is a noisy proxy, not a tape measure
Path-loss models use a reference transmit power and assumptions about the environment. Indoors, multipath and obstruction violate those assumptions; one RSSI sample can jump substantially while the device barely moves. Smooth over a bounded time window, reject stale readings and compare anchors, but keep the raw observations for debugging. Fingerprinting can work for a known floor plan, yet it needs a survey and maintenance when furniture or layout changes.
For many products, room or zone classification is more robust than trilaterated coordinates. Define boundaries and ambiguity explicitly: “near zone A, confidence 0.68” is more honest than a coordinate with false decimal precision. Add hysteresis so a tag does not oscillate between adjacent rooms on every scan.
Choose the positioning method to match the requirement
RSSI beaconing can support presence and coarse proximity when the tolerance is measured and acceptable. Bluetooth Direction Finding uses antenna arrays and angle-of-arrival or angle-of-departure techniques; it requires compatible hardware and infrastructure, not just an ESP32 scanner. Bluetooth Core 6.0 also introduces Channel Sounding as a distance-measurement feature, but it likewise requires compatible peers and a designed system. These are different deployment choices, not software switches that make RSSI exact.
Method
Best-fit question
Operational cost
RSSI proximity
Is a tag likely near this anchor or zone?
Survey, filtering and environment drift
Fingerprinting
Which known area resembles this radio profile?
Dense calibration and map upkeep
AoA/AoD
What direction is the signal arriving from?
Antenna arrays and specialized locators
Channel Sounding
What is the peer distance using supported ranging?
Compatible devices and current ecosystem support
Design identity and privacy into the system
Use rotating or pseudonymous identifiers where possible, minimize retention, restrict who can query movement history and separate operational telemetry from personal identity. A location event can reveal a person's routine even when the payload contains no name. Document purpose, consent or legal basis, retention and access review before placing anchors in workplaces or public spaces.
Measure system-level quality
Evaluate zone accuracy, missed detections, false presence, transition delay and stale-location rate across different times and layouts. Keep a test set separate from calibration and compare results by anchor and device orientation. Dashboards should show uncertainty and age of the last observation, not just a blinking dot. If a zone confidence is low, return “unknown” rather than inventing continuity.
In summary
ESP32 BLE scanners can form a practical indoor-proximity system when anchors are surveyed and uncertainty is visible. Treat RSSI as an observation, not a distance truth; choose room-level outcomes when they satisfy the use case, and budget specialized infrastructure for higher accuracy. Location is a product contract involving radio, calibration, privacy and operations.