A library for working with Bluetooth Low Energy (BLE) devices on Universal Windows Platform (UWP) applications.
- Easy to use interface for connecting to and interacting with BLE devices
- Supports reading and writing characteristics and descriptors
- Supports subscribing to notifications and indications
- Supports automatic connection and reconnection to devices
- Windows 10
- Visual Studio 2017 or later
- Clone or download the repository
- Open the solution file
BLELib_UWP.sln
in Visual Studio - Build the solution
To use the library in your own UWP application, add a reference to the BLELib_UWP
project and use the BleDevice
class to connect to and communicate with BLE devices.
// Create a new BleDevice instance
var bleDevice = new BleDevice();
// Connect to the device with the given Bluetooth address
await bleDevice.ConnectAsync("00:11:22:33:44:55");
// Read the value of the "Temperature" characteristic
var temperature = await bleDevice.ReadCharacteristicAsync("Temperature");
// Write a new value to the "Light" characteristic
await bleDevice.WriteCharacteristicAsync("Light", new byte[] { 1 });