DEV Community

Cover image for Get Bluetooth Device Distance Using Javascript
Bleuio tech
Bleuio tech

Posted on

Get Bluetooth Device Distance Using Javascript

Distance between Bluetooth devices can be measured using RSSI value. Using the script presented in this article will help us to get device distance using BleuIO.

This script scans for nearby Bluetooth devices and get an approximation of the distance by using well known RSSI to distance formula.



git clone

Go inside the folder type in terminal

parcel index.html

The script will scan for five seconds for nearby devices. You can update the value based on your requirements.

You can also run this script from online at

**Make sure your BleuIO dongle is connected
Connect Ble

show ble device distance

Read more about how to calculate the distance

Discussion (0)