pibeacon does the following:
1.listens to any beacon bluetooth broadcasts, similar to mentioned method, uses python directly calls to BLE stack
2. sends connect requests to phones via bluetooth. to track if device is present, similar to mentioned method. = BLEconnect
piBeacon does NOT use wifi to track devices.
The idea is the same for the mentioned article.
Monitor uses command line HCI-tool utilities, pibeacon uses a mix of HCI-tools and direct python BLE calls
What PiBeacon does in addition:. it adds management of several RPI, to better cover area, determines X,Y,Z positions.
That's is seriously limited by walls etc. You determine see if a device is in the room (closest RPI), but the exact position is physically limited by absorption of EM waves in buildings.
One would need to to do an area scan every meter or so (put an ibeacon at every place in the house, measure go to next) , record that, create a map of signal strength -> coordinates
Then do a reverse mapping /fitting with actually received signal strengths by all RPIs.
so in summary "METHOD" looks promising. uses similar tools to get beacons and BLE device responses
Karl
the tools used by monitor and presence, rest is management of devices etc.
- Code: Select all
result=$(hcitool -i $hci_device name "$1" 2>&1 | grep -v 'not available' | grep -vE "hcitool|timeout|invalid|error" )
and
known_device_rssi=$(hcitool cc $known_addr; avg_total=""; for i in 1 2 3; do scan_result=$(hcitool rssi $known_addr 2>&1); scan_result=${scan_result//[^0-9]/}; [[ "$scan_result" == "0" ]] && scan_result=30; counter=$((counter+1)); avg_total=$((avg_total + scan_result )); sleep 0.5; done; printf "$(( avg_total / counter ))" )