Bluetooth Support

Average Rating:  
X Rating Failed

Allows developers/designers to access Android's Bluetooth SDK from Blueprint/C++.

  • Supported Platforms
  • Supported Engine Versions
    4.18

Description


Prelude

The context of this plugin was that I needed to scan for some nearby Bluetooth Low Energy devices and get their signal strength in order to estimate the distance between my device, and the closest peripheral; hence, calculating my location. Obviously typed "Bluetooth" in Unreal Marketplace and did not find results, so decided to make this plugin.


Some Features/Use case

From your C++ classes or Blueprint, you can prepare your device by getting an instance of the Bluetooth adapter. This instance will enables to access a variety of options, you can start by checking the adapter's status, and your device's support of Low-Energy Mode. Next, you might want to get a list of nearby Low-Energy devices via normal Scan or Filtered Scan by service characteristic (in case you have a specific group of devices you are interested in).


You can access or loop through the list of discovered devices and read their information such as their physical addresses, Transmission power, time of discovery, and their signal strength


Technical Details

"Bluetooth Support" plugin for UE makes it easier than ever to make use of Android's rich Bluetooth SDK in your projects. This plugin provides a bridge between your Blueprint/C++ classes and Android's native SDK calls (Java). I made sure to manage the objects, variables, and callbacks within the plugin so you don't have to worry about that in your app.

Technical Details


Get Started

Manual install

  1. Clone/download Zip the plugin's repository on Github HERE
  2. Move the plugin's downloaded folder/archive file inside <Your Project folder>/Plugins/
  3. Restart Unreal Engine (if it is running)
  4. Find the plugin under the "Mobile" category and enable it.

An excerpt from a blueprint showing an example of how to use the plugin.


Features:

  • Toggle device's Bluetooth adapter.
  • Check device's Bluetooth Low Energy (4.0) support
  • Scan for Bluetooth Low Energy-enabled devices.
  • Scan for broadcasting devices running a specific service (Filtered scan)
  • List all BLE-enabled devices within broadcasting range.
  • Get nearby devices information
  • Get device's transmission power
  • Get device's signal strength dBm (RSSI)
  • Get device's physical Address
  • Get device's connection state (connectable/non connectable)

Code Modules:

  • BluetoothSupport (Runtime)
  • LoadingPhase (PostConfigInit)

Number of C++ Classes: 6

Network Replicated: No

Blueprint

  • BluetoothAdapter
  • BluetoothDevice

Supported Development Platforms:

  • Windows
  • MacOS

Supported Target Build Platforms:

  • Android



Important/Additional Notes:

  • Since Bluetooth LE can be used in indoor localization, Android COARSE/FINE runtime location permissions are needed for discovery.

Comments

!

Previous Next
  • Edit
  • Preview
  • Help
Enter
Login to comment
X Report this Comment
Report
X Attention


close
X Edit this Comment
  • Edit
  • Preview
  • Help
Update
X Remove this Comment

Are you sure you want to remove this comment?

Remove
X Attention