Gets or sets the parent service of this characteristic
Name
string
Gets or sets the name of this characteristic
UUID
string
Gets or sets the UUID of this characteristic
Value
string
Gets the value of this characteristic
DisplayType
DisplayTypes
Gets or sets how this characteristic's value should be displayed
Methods
Methods
Return Type
Description
ReadValueAsync()
Task<string>
Reads the value of the Characteristic
SetIndicateAsync()
Task<bool>
Set's the indicate descriptor
StopIndicateAsync()
Task<bool>
Unset the indicate descriptor
SetNotifyAsync()
Task<bool>
Sets the notify characteristic
StopNotifyAsync()
Task<bool>
Unsets the notify descriptor
Example
// Get a local copy of the context for easier reading
BluetoothLEHelper bluetoothLEHelper = BluetoothLEHelper.Context;
// check if BluetoothLE APIs are available
if (BluetoothLEHelper.IsBluetoothLESupported)
{
// Start the Enumeration
bluetoothLEHelper.StartEnumeration();
// At this point the user needs to select a device they want to connect to. This can be done by
// creating a ListView and binding the bluetoothLEHelper collection to it. Once a device is found,
// the Connect() method can be called to connect to the device and start interacting with its services
// Connect to a device if your choice
ObservableBluetoothLEDevice device = bluetoothLEHelper.BluetoothLeDevices[<Device you choose>];
await device.ConnectAsync();
// At this point the device is connected and the Services property is populated.
// See all the services
var services = device.Services;
}
' Get a local copy of the context for easier reading
Dim bluetoothLEHelper As BluetoothLEHelper = BluetoothLEHelper.Context
' check if BluetoothLE APIs are available
If BluetoothLEHelper.IsBluetoothLESupported Then
' Start the Enumeration
bluetoothLEHelper.StartEnumeration()
' At this point the user needs to select a device they want to connect to. This can be done by
' creating a ListView and binding the bluetoothLEHelper collection to it. Once a device is found,
' the Connect() method can be called to connect to the device and start interacting with its services
' Connect to a device if your choice
Dim device As ObservableBluetoothLEDevice = bluetoothLEHelper.BluetoothLeDevices(<Device you choose>)
Await device.ConnectAsync()
' At this point the device is connected and the Services property is populated.
' See all the services
Dim services = device.Services
End If