BleuIO

BleuIO

  • Back to Site
  • Buy Now
  • Manual
  • AT Commands
  • Help

›JS library

Manual

  • How it works
  • How to use
  • Verbose Mode
  • Known Issues
  • Firmware Updates
  • Release History
  • Troubleshooting

AT-Commands

  • List of AT Commands

Scripts & Tutorials

  • Python: iBeacon
  • Python: Eddystone Beacon
  • Python: Scan
  • Python: Scan and Store
  • Python: SPS Script
  • Python: File transfer Script
  • Python: Repeater Script
  • Javascript: Google chrome.serial Beacon
  • C# Console App Example
  • C# WFA Example

Script using libraries

    Python library

    • Eddystone example using Python library
    • IBeacon example using Python library
    • Scan example using Python library
    • Scan and store example using Python library
    • SPS example using Python library
    • Security Example using Python library

    JS library

    • Eddystone example using Javascript library
    • IBeacon example using Javascript library
    • Scan example using Javascript library
    • Security Example using Javascript library
    • Get Device Distance

STM32 Example

  • STM32 Example
  • Smart Bulb Example

Arduino Example

  • Arduino Example

Beaglebone Example

  • Beaglebone Example

Build Your Own Firmware

  • Build Your Own Firmware
  • Advertising Example

More

  • Links

Get Device Distance

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

  • 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

Full source also available on Github https://github.com/smart-sensor-devices-ab/ble_distance_measure

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 enter image description here

enter image description here

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/

← Security Example using Javascript librarySTM32 Example →
Docs
ManualAT CommandsHelp
Community
YouTubeLinkedInFacebook
More
BleuIOSmart Sensor DevicesGitHub
Copyright © 2022 BleuIO. A product of Smart Sensor Devices