This script scans for nearby Bluetooth devices and get an approximation of the distance by using well known RSSI to distance formula.
Requirments
You need to have a BLE USB dongle BleuIO https://www.bleuio.com/
To run the script, you need a web application bundler. You can use parceljs. https://parceljs.org/getting_started.html
Instructions
git clone https://github.com/smart-sensor-devices-ab/ble_distance_measure.git
Go inside the folder type in terminal
parcel index.html
You can also run this script from online at
https://smart-sensor-devices-ab.github.io/ble_distance_measure/dist/
read more at
https://www.bleuio.com/blog/details.php?id=1218&title=Get-Bluetooth-Device-Distance-Using-BleuIO