I do understand what you’re after. That is why I started with Happy Bubbles - I wanted room-based detection. The issue is very simple if the reality followed your example. Of course, if RSSI correlated accurately to distance, we could easily triangulate a room or position between two or more points in space. However, and I think you can see this if you run hcidump -a
for a while with a stationary beacon, RSSI jumps all over the place, varies with battery, varies with transmission power (which is not always reported by the beacon), and varies with the current RF environment.
A more realistic RSSI log, over maybe 5 seconds without movement, would look like this, reporting RSSI every 1 second:
Room A: 2m 5m 1m 9m 9m 12m
Room B: 9m 12m unknown 8m 7m 3m
Room C: 5m 3m 5m 6m 8m 9m
Yes, if you average these over a long period of time you can find that you’re probably “closest” to Room A. But, as I’m sure you can see, selection of the averaging window is very important. If our averaging window is only 3 seconds, Room A would show as the farthest room from the device by second 5. If our averaging window is long, then the user’s movement will not be captured unless they’re still for a long period of time.
Further, RSSI is dramatically impacted by RF environment. Your measurements will become inaccurate if more devices are present, if your neighbors have a number of 2.4GHz wifi or bluetooth devices, and if your monitor
or presence
nodes are set to scan particularly frequently.
Anecdotally, I found that averaging over a very long period was the only way to get moderately accurate results for a particular device in a low-noise environment. I averaged RSSI values for three points in space over about 60 seconds. With these measurements, I could output a general guess where the user’s device was placed. When new devices were added to the environment, or when my battery started dying… and so on.
It’s a problem. It’s not reliable.