Finally we print the result into a table. Once we get the device list, we try to sort it out by RSSI value and convert RSSI value to distance. The script.js file uses bleuio javascript library to connect and scan for BLE devices. Once the scanning is completed we will be able to see a list of devices and their distance from my computer. upon connecting we will be able to scan for nearby devices and. Index.html is just has a connect and scan for device button. The script will an index.html and script.js file. To run the script, you need a web application bundler.You need to have a BLE USB dongle BleuIO. How to Calculate Distance from the RSSI value of the BLE Beacon Read more about how to calculate the distance This script scans for nearby Bluetooth devices and gets an approximation of the distance by using the well-known RSSI to distance formula. This article will share a simple script written in JavaScript to determine nearby Bluetooth devices and their distance in meters. As the name suggests, both devices need to be within Bluetooth range to estimate the distance. The ranging method is simple to implement, and it has the formula to calculate the distance between two Bluetooth devices. Despite the challenges, there are methods to determine the distance between two Bluetooth devices with an accuracy of at least 60-80%. It’s hard to determine the exact distance between two Bluetooth devices because many factors affect the calculations. However, most calculations of the distance between two Bluetooth devices are estimates. This might fill the gap that GPS tracking has when tracking devices in indoor spaces. On the other hand, Bluetooth is excellent in short ranges because the waves can go through walls. GPS tracking isn’t excellent at giving accurate measurements of the close distance, especially in the indoor environment. such as Secure Locks for Buildings and Automotive, Asset localization & tracking, Indoor navigation etc This feature can be used in several fields. Beacon technology usually estimates the distance between devices using the received signal strength (RSSI).īluetooth can be an excellent way to narrow down a search area at close distances when tracking something. There are many localization systems that exist based on beacons. Bluetooth ranging technology is very popular.
0 Comments
Leave a Reply. |