BluetoothLEDevice BluetoothLEDevice BluetoothLEDevice BluetoothLEDevice Class

Definition

Represents a Bluetooth LE device.

public : sealed class BluetoothLEDevice : IBluetoothLEDevice, IBluetoothLEDevice2, IBluetoothLEDevice3, IBluetoothLEDevice4, IClosable
public sealed class BluetoothLEDevice : IBluetoothLEDevice, IBluetoothLEDevice2, IBluetoothLEDevice3, IBluetoothLEDevice4, IDisposable
Public NotInheritable Class BluetoothLEDevice Implements IBluetoothLEDevice, IBluetoothLEDevice2, IBluetoothLEDevice3, IBluetoothLEDevice4, IDisposable
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Properties

Appearance Appearance Appearance Appearance

Gets the BluetoothLEAppearance object for the Bluetooth LE device.

public : BluetoothLEAppearance Appearance { get; }
public BluetoothLEAppearance Appearance { get; }
Public ReadOnly Property Appearance As BluetoothLEAppearance
var bluetoothleAppearance = bluetoothleDevice.appearance;
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth

BluetoothAddress BluetoothAddress BluetoothAddress BluetoothAddress

Gets the device address.

public : ulong BluetoothAddress { get; }
public ulong BluetoothAddress { get; }
Public ReadOnly Property BluetoothAddress As ulong
var ulong = bluetoothleDevice.bluetoothAddress;
Value
ulong ulong ulong ulong

The address of the device.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

BluetoothAddressType BluetoothAddressType BluetoothAddressType BluetoothAddressType

Gets the address type for the Bluetooth LE device.

public : BluetoothAddressType BluetoothAddressType { get; }
public BluetoothAddressType BluetoothAddressType { get; }
Public ReadOnly Property BluetoothAddressType As BluetoothAddressType
var bluetoothAddressType = bluetoothleDevice.bluetoothAddressType;
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth

BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId BluetoothDeviceId

Gets the bluetooth device ID.

public : BluetoothDeviceId BluetoothDeviceId { get; }
public BluetoothDeviceId BluetoothDeviceId { get; }
Public ReadOnly Property BluetoothDeviceId As BluetoothDeviceId
var bluetoothDeviceId = bluetoothleDevice.bluetoothDeviceId;
Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)
Capabilities
bluetooth

ConnectionStatus ConnectionStatus ConnectionStatus ConnectionStatus

Gets the connection status of the device.

public : BluetoothConnectionStatus ConnectionStatus { get; }
public BluetoothConnectionStatus ConnectionStatus { get; }
Public ReadOnly Property ConnectionStatus As BluetoothConnectionStatus
var bluetoothConnectionStatus = bluetoothleDevice.connectionStatus;
Value
BluetoothConnectionStatus BluetoothConnectionStatus BluetoothConnectionStatus BluetoothConnectionStatus

One of the BluetoothConnectionStatus enumeration values that specifies the connection status of the device.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

DeviceAccessInformation DeviceAccessInformation DeviceAccessInformation DeviceAccessInformation

Gets the DeviceAccessInformation.

public : DeviceAccessInformation DeviceAccessInformation { get; }
public DeviceAccessInformation DeviceAccessInformation { get; }
Public ReadOnly Property DeviceAccessInformation As DeviceAccessInformation
var deviceAccessInformation = bluetoothleDevice.deviceAccessInformation;
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

DeviceId DeviceId DeviceId DeviceId

Gets the device Id.

public : Platform::String DeviceId { get; }
public string DeviceId { get; }
Public ReadOnly Property DeviceId As string
var string = bluetoothleDevice.deviceId;
Value
Platform::String string string string

The Id of the device.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

DeviceInformation DeviceInformation DeviceInformation DeviceInformation

Gets the DeviceInformation object for the Bluetooth LE device.

public : DeviceInformation DeviceInformation { get; }
public DeviceInformation DeviceInformation { get; }
Public ReadOnly Property DeviceInformation As DeviceInformation
var deviceInformation = bluetoothleDevice.deviceInformation;
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth

GattServices GattServices GattServices GattServices

Gets the read-only list of GATT services supported by the device.

public : IVectorView<GattDeviceService> GattServices { get; }
public IReadOnlyList<GattDeviceService> GattServices { get; }
Public ReadOnly Property GattServices As IReadOnlyList<GattDeviceService>
var iReadOnlyList = bluetoothleDevice.gattServices;
Value
IVectorView<GattDeviceService> IReadOnlyList<GattDeviceService> IReadOnlyList<GattDeviceService> IReadOnlyList<GattDeviceService>

The read-only list of GATT services supported by this Bluetooth LE device.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Name Name Name Name

Gets the name of the Bluetooth LE device.

public : Platform::String Name { get; }
public string Name { get; }
Public ReadOnly Property Name As string
var string = bluetoothleDevice.name;
Value
Platform::String string string string

The name of the Bluetooth LE device.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Methods

Close() Close() Close() Close()

Closes this Bluetooth LE device. This may close the connection to the device if this is the only app with a connection.

public : void Close()
This member is not implemented in C#
This member is not implemented in VB.Net
bluetoothleDevice.close();
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This member is not implemented in C++
void Dispose()
Sub Dispose
void Dispose()

FromBluetoothAddressAsync(UInt64) FromBluetoothAddressAsync(UInt64) FromBluetoothAddressAsync(UInt64) FromBluetoothAddressAsync(UInt64)

Returns a BluetoothLEDevice object for the given BluetoothAddress and initiates a connection.

public : static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(unsigned __int64 bluetoothAddress)
public static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(UInt64 bluetoothAddress)
Public Static Function FromBluetoothAddressAsync(bluetoothAddress As UInt64) As IAsyncOperation( Of BluetoothLEDevice )
Windows.Devices.Bluetooth.BluetoothLEDevice.fromBluetoothAddressAsync(bluetoothAddress).done( /* Your success and error handlers */ );
Parameters
bluetoothAddress
unsigned __int64 UInt64 UInt64 UInt64

The address of the Bluetooth LE device.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth
See Also

FromBluetoothAddressAsync(UInt64, BluetoothAddressType) FromBluetoothAddressAsync(UInt64, BluetoothAddressType) FromBluetoothAddressAsync(UInt64, BluetoothAddressType) FromBluetoothAddressAsync(UInt64, BluetoothAddressType)

Returns a BluetoothLEDevice object for the given BluetoothAddress value and BluetoothAddressType value and initiates a connection.

public : static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(unsigned __int64 bluetoothAddress, BluetoothAddressType bluetoothAddressType)
public static IAsyncOperation<BluetoothLEDevice> FromBluetoothAddressAsync(UInt64 bluetoothAddress, BluetoothAddressType bluetoothAddressType)
Public Static Function FromBluetoothAddressAsync(bluetoothAddress As UInt64, bluetoothAddressType As BluetoothAddressType) As IAsyncOperation( Of BluetoothLEDevice )
Windows.Devices.Bluetooth.BluetoothLEDevice.fromBluetoothAddressAsync(bluetoothAddress, bluetoothAddressType).done( /* Your success and error handlers */ );
Parameters
bluetoothAddress
unsigned __int64 UInt64 UInt64 UInt64

The 64-bit address of the Bluetooth LE device.

bluetoothAddressType
BluetoothAddressType BluetoothAddressType BluetoothAddressType BluetoothAddressType

The address type of the Bluetooth LE device.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth
See Also

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

Returns a BluetoothLEDevice object for the given Id and initiate a connection.

public : static IAsyncOperation<BluetoothLEDevice> FromIdAsync(Platform::String deviceId)
public static IAsyncOperation<BluetoothLEDevice> FromIdAsync(String deviceId)
Public Static Function FromIdAsync(deviceId As String) As IAsyncOperation( Of BluetoothLEDevice )
Windows.Devices.Bluetooth.BluetoothLEDevice.fromIdAsync(deviceId).done( /* Your success and error handlers */ );
Parameters
deviceId
Platform::String String String String

The Id of the Bluetooth LE device.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Gets an Advanced Query Syntax (AQS) string for identifying all Bluetooth Low Energy (LE) devices. This string is passed to the FindAllAsync or CreateWatcher method in order to get a list of Bluetooth LE devices.

public : static Platform::String GetDeviceSelector()
public static string GetDeviceSelector()
Public Static Function GetDeviceSelector() As string
var string = Windows.Devices.Bluetooth.BluetoothLEDevice.getDeviceSelector();
Returns
Platform::String string string string

The device selector for this device.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

GetDeviceSelectorFromAppearance(BluetoothLEAppearance) GetDeviceSelectorFromAppearance(BluetoothLEAppearance) GetDeviceSelectorFromAppearance(BluetoothLEAppearance) GetDeviceSelectorFromAppearance(BluetoothLEAppearance)

Creates an Advanced Query Syntax (AQS) filter string from a BluetoothLEAppearance object. The AQS string is passed into the CreateWatcher method to return a collection of DeviceInformation objects with the specified appearance.

public : static Platform::String GetDeviceSelectorFromAppearance(BluetoothLEAppearance appearance)
public static string GetDeviceSelectorFromAppearance(BluetoothLEAppearance appearance)
Public Static Function GetDeviceSelectorFromAppearance(appearance As BluetoothLEAppearance) As string
var string = Windows.Devices.Bluetooth.BluetoothLEDevice.getDeviceSelectorFromAppearance(appearance);
Parameters
appearance
BluetoothLEAppearance BluetoothLEAppearance BluetoothLEAppearance BluetoothLEAppearance

The Bluetooth LE appearance used for constructing the AQS string.

Returns
Platform::String string string string

An AQS string that can be passed as a parameter to the CreateWatcher method.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth

GetDeviceSelectorFromBluetoothAddress(UInt64) GetDeviceSelectorFromBluetoothAddress(UInt64) GetDeviceSelectorFromBluetoothAddress(UInt64) GetDeviceSelectorFromBluetoothAddress(UInt64)

Creates an Advanced Query Syntax (AQS) filter string from a 64-bit address that represents a Bluetooth LE device. The AQS string is passed into the CreateWatcher method to return a collection of DeviceInformation objects.

public : static Platform::String GetDeviceSelectorFromBluetoothAddress(unsigned __int64 bluetoothAddress)
public static string GetDeviceSelectorFromBluetoothAddress(UInt64 bluetoothAddress)
Public Static Function GetDeviceSelectorFromBluetoothAddress(bluetoothAddress As UInt64) As string
var string = Windows.Devices.Bluetooth.BluetoothLEDevice.getDeviceSelectorFromBluetoothAddress(bluetoothAddress);
Parameters
bluetoothAddress
unsigned __int64 UInt64 UInt64 UInt64

A 64-bit Bluetooth LE device address used for constructing the AQS string.

Returns
Platform::String string string string

An AQS string that can be passed as a parameter to the CreateWatcher method.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth
See Also

GetDeviceSelectorFromBluetoothAddress(UInt64, BluetoothAddressType) GetDeviceSelectorFromBluetoothAddress(UInt64, BluetoothAddressType) GetDeviceSelectorFromBluetoothAddress(UInt64, BluetoothAddressType) GetDeviceSelectorFromBluetoothAddress(UInt64, BluetoothAddressType)

Creates an Advanced Query Syntax (AQS) filter string from a 64-bit address and address type that represents a Bluetooth LE device. The AQS string is passed into the CreateWatcher method.

public : static Platform::String GetDeviceSelectorFromBluetoothAddress(unsigned __int64 bluetoothAddress, BluetoothAddressType bluetoothAddressType)
public static string GetDeviceSelectorFromBluetoothAddress(UInt64 bluetoothAddress, BluetoothAddressType bluetoothAddressType)
Public Static Function GetDeviceSelectorFromBluetoothAddress(bluetoothAddress As UInt64, bluetoothAddressType As BluetoothAddressType) As string
var string = Windows.Devices.Bluetooth.BluetoothLEDevice.getDeviceSelectorFromBluetoothAddress(bluetoothAddress, bluetoothAddressType);
Parameters
bluetoothAddress
unsigned __int64 UInt64 UInt64 UInt64

A 64-bit Bluetooth LE device address used for constructing the AQS string.

bluetoothAddressType
BluetoothAddressType BluetoothAddressType BluetoothAddressType BluetoothAddressType

The Bluetooth LE device address type.

Returns
Platform::String string string string

An AQS string that can be passed as a parameter to the CreateWatcher method.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth
See Also

GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus) GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus) GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus) GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus)

Creates an Advanced Query Syntax (AQS) filter string that contains a query for Bluetooth LE devices with the indicated BluetoothConnectionStatus. The AQS string is passed into the CreateWatcher method to return a collection of DeviceInformation objects with the indicated Bluetooth connection status.

public : static Platform::String GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus connectionStatus)
public static string GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus connectionStatus)
Public Static Function GetDeviceSelectorFromConnectionStatus(connectionStatus As BluetoothConnectionStatus) As string
var string = Windows.Devices.Bluetooth.BluetoothLEDevice.getDeviceSelectorFromConnectionStatus(connectionStatus);
Parameters
connectionStatus
BluetoothConnectionStatus BluetoothConnectionStatus BluetoothConnectionStatus BluetoothConnectionStatus

The connection status used for constructing the AQS string.

Returns
Platform::String string string string

An AQS string that can be passed as a parameter to the CreateWatcher method.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth

GetDeviceSelectorFromDeviceName(String) GetDeviceSelectorFromDeviceName(String) GetDeviceSelectorFromDeviceName(String) GetDeviceSelectorFromDeviceName(String)

Creates an Advanced Query Syntax (AQS) filter string that contains a query for the Bluetooth LE device name. The AQS string is passed into the CreateWatcher method to return a collection of DeviceInformation objects containing the specified Bluetooth LE device name.

public : static Platform::String GetDeviceSelectorFromDeviceName(Platform::String deviceName)
public static string GetDeviceSelectorFromDeviceName(String deviceName)
Public Static Function GetDeviceSelectorFromDeviceName(deviceName As String) As string
var string = Windows.Devices.Bluetooth.BluetoothLEDevice.getDeviceSelectorFromDeviceName(deviceName);
Parameters
deviceName
Platform::String String String String

The Bluetooth LE device name used for constructing the AQS string.

Returns
Platform::String string string string

An AQS string that is passed as a parameter to the CreateWatcher method.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth

GetDeviceSelectorFromPairingState(Boolean) GetDeviceSelectorFromPairingState(Boolean) GetDeviceSelectorFromPairingState(Boolean) GetDeviceSelectorFromPairingState(Boolean)

Creates an Advanced Query Syntax (AQS) filter string that contains a query for Bluetooth LE devices that are either paired or unpaired. The AQS string is passed into the CreateWatcher method to return a collection of DeviceInformation objects.

public : static Platform::String GetDeviceSelectorFromPairingState(bool pairingState)
public static string GetDeviceSelectorFromPairingState(Boolean pairingState)
Public Static Function GetDeviceSelectorFromPairingState(pairingState As Boolean) As string
var string = Windows.Devices.Bluetooth.BluetoothLEDevice.getDeviceSelectorFromPairingState(pairingState);
Parameters
pairingState
bool Boolean Boolean Boolean

The current pairing state for Bluetooth LE devices used for constructing the AQS string. Bluetooth LE devices can be either paired (true) or unpaired (false). The AQS Filter string will request scanning to be performed when the pairingState is false.

Returns
Platform::String string string string

An AQS string that can be passed as a parameter to the CreateWatcher method.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)
Capabilities
bluetooth

GetGattService(Guid) GetGattService(Guid) GetGattService(Guid) GetGattService(Guid)

Returns the GATT service with the given service Id.

public : GattDeviceService GetGattService(Platform::Guid serviceUuid)
public GattDeviceService GetGattService(Guid serviceUuid)
Public Function GetGattService(serviceUuid As Guid) As GattDeviceService
var gattDeviceService = bluetoothleDevice.getGattService(serviceUuid);
Parameters
serviceUuid
Platform::Guid Guid Guid Guid

The service Id of the GATT service.

Returns

The GATT service represented by the given service Id.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

GetGattServicesAsync() GetGattServicesAsync() GetGattServicesAsync() GetGattServicesAsync()

Gets the GattDeviceServices for this Bluetooth LowEnergy device.

public : IAsyncOperation<GattDeviceServicesResult> GetGattServicesAsync()
public IAsyncOperation<GattDeviceServicesResult> GetGattServicesAsync()
Public Function GetGattServicesAsync() As IAsyncOperation( Of GattDeviceServicesResult )
Windows.Devices.Bluetooth.BluetoothLEDevice.getGattServicesAsync().done( /* Your success and error handlers */ );
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

GetGattServicesAsync(BluetoothCacheMode) GetGattServicesAsync(BluetoothCacheMode) GetGattServicesAsync(BluetoothCacheMode) GetGattServicesAsync(BluetoothCacheMode)

Returns the GattDeviceServices for this Bluetooth LowEnergy device with the specified cache mode.

public : IAsyncOperation<GattDeviceServicesResult> GetGattServicesAsync(BluetoothCacheMode cacheMode)
public IAsyncOperation<GattDeviceServicesResult> GetGattServicesAsync(BluetoothCacheMode cacheMode)
Public Function GetGattServicesAsync(cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattDeviceServicesResult )
Windows.Devices.Bluetooth.BluetoothLEDevice.getGattServicesAsync(cacheMode).done( /* Your success and error handlers */ );
Parameters
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

GetGattServicesForUuidAsync(Guid) GetGattServicesForUuidAsync(Guid) GetGattServicesForUuidAsync(Guid) GetGattServicesForUuidAsync(Guid)

Returns the GattDeviceServices for the Bluetooth LowEnergy device with the specified UUID.

public : IAsyncOperation<GattDeviceServicesResult> GetGattServicesForUuidAsync(Platform::Guid serviceUuid)
public IAsyncOperation<GattDeviceServicesResult> GetGattServicesForUuidAsync(Guid serviceUuid)
Public Function GetGattServicesForUuidAsync(serviceUuid As Guid) As IAsyncOperation( Of GattDeviceServicesResult )
Windows.Devices.Bluetooth.BluetoothLEDevice.getGattServicesForUuidAsync(serviceUuid).done( /* Your success and error handlers */ );
Parameters
serviceUuid
Platform::Guid Guid Guid Guid

The service UUID.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

Remarks

Returns an asynchronous operation that completes with a GattDeviceServicesResult.

GetGattServicesForUuidAsync(Guid, BluetoothCacheMode) GetGattServicesForUuidAsync(Guid, BluetoothCacheMode) GetGattServicesForUuidAsync(Guid, BluetoothCacheMode) GetGattServicesForUuidAsync(Guid, BluetoothCacheMode)

Returns the GattDeviceServices for the Bluetooth LowEnergy device with the specified UUID.

public : IAsyncOperation<GattDeviceServicesResult> GetGattServicesForUuidAsync(Platform::Guid serviceUuid, BluetoothCacheMode cacheMode)
public IAsyncOperation<GattDeviceServicesResult> GetGattServicesForUuidAsync(Guid serviceUuid, BluetoothCacheMode cacheMode)
Public Function GetGattServicesForUuidAsync(serviceUuid As Guid, cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattDeviceServicesResult )
Windows.Devices.Bluetooth.BluetoothLEDevice.getGattServicesForUuidAsync(serviceUuid, cacheMode).done( /* Your success and error handlers */ );
Parameters
serviceUuid
Platform::Guid Guid Guid Guid

The service UUID.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

RequestAccessAsync() RequestAccessAsync() RequestAccessAsync() RequestAccessAsync()

Requests access to the Bluetooth LowEnergy device.

public : IAsyncOperation<DeviceAccessStatus> RequestAccessAsync()
public IAsyncOperation<DeviceAccessStatus> RequestAccessAsync()
Public Function RequestAccessAsync() As IAsyncOperation( Of DeviceAccessStatus )
Windows.Devices.Bluetooth.BluetoothLEDevice.requestAccessAsync().done( /* Your success and error handlers */ );
Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
bluetooth

Events

ConnectionStatusChanged ConnectionStatusChanged ConnectionStatusChanged ConnectionStatusChanged

Occurs when the connection status for the device has changed.

public : event TypedEventHandler ConnectionStatusChanged<BluetoothLEDevice, object>
public event TypedEventHandler ConnectionStatusChanged<BluetoothLEDevice, object>
Public Event TypedEventHandler ConnectionStatusChanged( Of ( Of BluetoothLEDevice ), ( Of object ))
function onConnectionStatusChanged(eventArgs){/* Your code */}


bluetoothleDevice.addEventListener("connectionStatusChanged", onConnectionStatusChanged);
bluetoothleDevice.removeEventListener("connectionStatusChanged", onConnectionStatusChanged);
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

GattServicesChanged GattServicesChanged GattServicesChanged GattServicesChanged

Occurs when the list of GATT services supported by the device has changed.

public : event TypedEventHandler GattServicesChanged<BluetoothLEDevice, object>
public event TypedEventHandler GattServicesChanged<BluetoothLEDevice, object>
Public Event TypedEventHandler GattServicesChanged( Of ( Of BluetoothLEDevice ), ( Of object ))
function onGattServicesChanged(eventArgs){/* Your code */}


bluetoothleDevice.addEventListener("gattServicesChanged", onGattServicesChanged);
bluetoothleDevice.removeEventListener("gattServicesChanged", onGattServicesChanged);
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

Remarks

This event fires when the remote device changes its services, or an unpaired device is disconnecting. All services are cleared because unpaired device services can’t be cached between connections.

The object parameter in this event is null for every event that is fired.

To get the services available, your app should call GetGattServicesAsync with the Cached option from the BluetoothLEDevice that is provided in the event handler. This can be used to refresh the list of services and re-initialize the services on the device if they are gone.

NameChanged NameChanged NameChanged NameChanged

Occurs when the name of the device has changed.

public : event TypedEventHandler NameChanged<BluetoothLEDevice, object>
public event TypedEventHandler NameChanged<BluetoothLEDevice, object>
Public Event TypedEventHandler NameChanged( Of ( Of BluetoothLEDevice ), ( Of object ))
function onNameChanged(eventArgs){/* Your code */}


bluetoothleDevice.addEventListener("nameChanged", onNameChanged);
bluetoothleDevice.removeEventListener("nameChanged", onNameChanged);
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
bluetooth

See Also