DEV Community

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

Posted on

1

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.

Requirments

Instructions

git clone https://github.com/smart-sensor-devices-ab/ble_distance_measure.git

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
https://smart-sensor-devices-ab.github.io/ble_distance_measure/dist/

**Make sure your BleuIO dongle is connected
Connect Ble

show ble device distance

Read more about how to calculate the distance
https://iotandelectronics.wordpress.com/2016/10/07/how-to-calculate-distance-from-the-rssi-value-of-the-ble-beacon/

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay