GattCharacteristic GattCharacteristic GattCharacteristic GattCharacteristic Class

Definition

Represents a Characteristic of a GATT service. The GattCharacteristic object represents a GATT Characteristic of a particular service, and is obtained from the Characteristics property of the GattDeviceService object.

public : sealed class GattCharacteristic : IGattCharacteristic, IGattCharacteristic2, IGattCharacteristic3
public sealed class GattCharacteristic : IGattCharacteristic, IGattCharacteristic2, IGattCharacteristic3
Public NotInheritable Class GattCharacteristic Implements IGattCharacteristic, IGattCharacteristic2, IGattCharacteristic3
// 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

AttributeHandle AttributeHandle AttributeHandle AttributeHandle

Gets the handle used to uniquely identify GATT-based characteristic attributes as declared on the Bluetooth LE device.

public : ushort AttributeHandle { get; }
public ushort AttributeHandle { get; }
Public ReadOnly Property AttributeHandle As ushort
var ushort = gattCharacteristic.attributeHandle;
Value
ushort ushort ushort ushort

Handle that uniquely identifies GATT-based characteristic attributes.

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

CharacteristicProperties CharacteristicProperties CharacteristicProperties CharacteristicProperties

Gets the GATT characteristic properties, as defined by the GATT profile.

If the ExtendedProperties flag is present it also represents the properties of the Extended Characteristic Properties Descriptor.

public : GattCharacteristicProperties CharacteristicProperties { get; }
public GattCharacteristicProperties CharacteristicProperties { get; }
Public ReadOnly Property CharacteristicProperties As GattCharacteristicProperties
var gattCharacteristicProperties = gattCharacteristic.characteristicProperties;
Value
GattCharacteristicProperties GattCharacteristicProperties GattCharacteristicProperties GattCharacteristicProperties

The GATT characteristic properties, as defined by the GATT profile.

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

PresentationFormats PresentationFormats PresentationFormats PresentationFormats

Gets the list of presentation format descriptors associated with this GattCharacteristic, in the order specified by the Aggregate Format Descriptor.

The list shall be empty if no PresentationFormat or Aggregate Format descriptors are found.

public : IVectorView<GattPresentationFormat> PresentationFormats { get; }
public IReadOnlyList<GattPresentationFormat> PresentationFormats { get; }
Public ReadOnly Property PresentationFormats As IReadOnlyList<GattPresentationFormat>
var iReadOnlyList = gattCharacteristic.presentationFormats;
Value
IVectorView<GattPresentationFormat> IReadOnlyList<GattPresentationFormat> IReadOnlyList<GattPresentationFormat> IReadOnlyList<GattPresentationFormat>

An array of GattPresentationFormat objects that contain the list of presentation format descriptors associated with this GattCharacteristic, in the order specified by the Aggregate Format Descriptor.

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

ProtectionLevel ProtectionLevel ProtectionLevel ProtectionLevel

Gets or sets the desired GATT security options for over the air communication with the device.

Windows will negotiate the maximum security possible with the device as part of the pairing process, and specifying a lower level of security won’t degrade the existing security level.

public : GattProtectionLevel ProtectionLevel { get; set; }
public GattProtectionLevel ProtectionLevel { get; set; }
Public ReadWrite Property ProtectionLevel As GattProtectionLevel
var gattProtectionLevel = gattCharacteristic.protectionLevel;
gattCharacteristic.protectionLevel = gattProtectionLevel;
Value
GattProtectionLevel GattProtectionLevel GattProtectionLevel GattProtectionLevel

The desired GATT security options for over the air communication with 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

Service Service Service Service

Gets the GattDeviceService of which this characteristic is a member.

public : GattDeviceService Service { get; }
public GattDeviceService Service { get; }
Public ReadOnly Property Service As GattDeviceService
var gattDeviceService = gattCharacteristic.service;
Value
GattDeviceService GattDeviceService GattDeviceService GattDeviceService

The GattDeviceService of which this characteristic is a member.

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

UserDescription UserDescription UserDescription UserDescription

Get the user friendly description for this GattCharacteristic, if the User Description Descriptor is present, otherwise this will be an empty string.

public : Platform::String UserDescription { get; }
public string UserDescription { get; }
Public ReadOnly Property UserDescription As string
var string = gattCharacteristic.userDescription;
Value
Platform::String string string string

The user friendly description for this GattCharacteristic, if the User Description Descriptor is present, otherwise this will be an empty string.

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

Uuid Uuid Uuid Uuid

Gets the GATT Characteristic UUID for this GattCharacteristic.

public : Platform::Guid Uuid { get; }
public Guid Uuid { get; }
Public ReadOnly Property Uuid As Guid
var guid = gattCharacteristic.uuid;
Value
Platform::Guid Guid Guid Guid

The GATT Characteristic UUID for this GattCharacteristic.

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

ConvertShortIdToUuid(UInt16) ConvertShortIdToUuid(UInt16) ConvertShortIdToUuid(UInt16) ConvertShortIdToUuid(UInt16)

Converts a Bluetooth SIG defined short Id to a full GATT UUID.

public : static Platform::Guid ConvertShortIdToUuid(unsigned short shortId)
public static Guid ConvertShortIdToUuid(UInt16 shortId)
Public Static Function ConvertShortIdToUuid(shortId As UInt16) As Guid
var guid = Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic.convertShortIdToUuid(shortId);
Parameters
shortId
unsigned short UInt16 UInt16 UInt16

A 16-bit Bluetooth GATT Service UUID.

Returns
Platform::Guid Guid Guid Guid

The corresponding 128-bit GATT Characteristic UUID, that uniquely identifies this characteristic.

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

GetAllDescriptors() GetAllDescriptors() GetAllDescriptors() GetAllDescriptors()

Gets the collection of all descriptors belonging to this GattCharacteristic instance.

public : IVectorView<GattDescriptor> GetAllDescriptors()
public IReadOnlyList<GattDescriptor> GetAllDescriptors()
Public Function GetAllDescriptors() As IReadOnlyList<GattDescriptor>( Of GattDescriptor )
var iVectorView = gattCharacteristic.getAllDescriptors();
Returns
IVectorView<GattDescriptor> IReadOnlyList<GattDescriptor> IReadOnlyList<GattDescriptor> IReadOnlyList<GattDescriptor>

The collection of all descriptors belonging to this GattCharacteristic instance.

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

GetDescriptors(Guid) GetDescriptors(Guid) GetDescriptors(Guid) GetDescriptors(Guid)

Returns a vector of descriptors, that are identified by the specified UUID, and belong to this GattCharacteristic instance.

public : IVectorView<GattDescriptor> GetDescriptors(Platform::Guid descriptorUuid)
public IReadOnlyList<GattDescriptor> GetDescriptors(Guid descriptorUuid)
Public Function GetDescriptors(descriptorUuid As Guid) As IReadOnlyList<GattDescriptor>( Of GattDescriptor )
var iVectorView = gattCharacteristic.getDescriptors(descriptorUuid);
Parameters
descriptorUuid
Platform::Guid Guid Guid Guid

The UUID for the descriptors to be retrieved.

Returns
IVectorView<GattDescriptor> IReadOnlyList<GattDescriptor> IReadOnlyList<GattDescriptor> IReadOnlyList<GattDescriptor>

A vector of descriptors whose UUIDs match descriptorUuid.

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

GetDescriptorsAsync() GetDescriptorsAsync() GetDescriptorsAsync() GetDescriptorsAsync()

Returns the descriptors for this GattCharacteristic instance.

public : IAsyncOperation<GattDescriptorsResult> GetDescriptorsAsync()
public IAsyncOperation<GattDescriptorsResult> GetDescriptorsAsync()
Public Function GetDescriptorsAsync() As IAsyncOperation( Of GattDescriptorsResult )
var iAsyncOperation = gattCharacteristic.getDescriptorsAsync();
Returns

An asynchronous operation that completes with the descriptors for this GattCharacteristic instance.

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

GetDescriptorsAsync(BluetoothCacheMode) GetDescriptorsAsync(BluetoothCacheMode) GetDescriptorsAsync(BluetoothCacheMode) GetDescriptorsAsync(BluetoothCacheMode)

Returns the descriptors with the specified cache mode for this GattCharacteristic instance.

public : IAsyncOperation<GattDescriptorsResult> GetDescriptorsAsync(BluetoothCacheMode cacheMode)
public IAsyncOperation<GattDescriptorsResult> GetDescriptorsAsync(BluetoothCacheMode cacheMode)
Public Function GetDescriptorsAsync(cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattDescriptorsResult )
var iAsyncOperation = gattCharacteristic.getDescriptorsAsync(cacheMode);
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

GetDescriptorsForUuidAsync(Guid) GetDescriptorsForUuidAsync(Guid) GetDescriptorsForUuidAsync(Guid) GetDescriptorsForUuidAsync(Guid)

Returns the descriptors whose UUIDs match descriptorUuid.

public : IAsyncOperation<GattDescriptorsResult> GetDescriptorsForUuidAsync(Platform::Guid descriptorUuid)
public IAsyncOperation<GattDescriptorsResult> GetDescriptorsForUuidAsync(Guid descriptorUuid)
Public Function GetDescriptorsForUuidAsync(descriptorUuid As Guid) As IAsyncOperation( Of GattDescriptorsResult )
var iAsyncOperation = gattCharacteristic.getDescriptorsForUuidAsync(descriptorUuid);
Parameters
descriptorUuid
Platform::Guid Guid Guid Guid

The UUID for the descriptors to be retrieved.

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

GetDescriptorsForUuidAsync(Guid, BluetoothCacheMode) GetDescriptorsForUuidAsync(Guid, BluetoothCacheMode) GetDescriptorsForUuidAsync(Guid, BluetoothCacheMode) GetDescriptorsForUuidAsync(Guid, BluetoothCacheMode)

Returns the descriptors whose UUIDs match descriptorUuid with the specified cacheMode.

public : IAsyncOperation<GattDescriptorsResult> GetDescriptorsForUuidAsync(Platform::Guid descriptorUuid, BluetoothCacheMode cacheMode)
public IAsyncOperation<GattDescriptorsResult> GetDescriptorsForUuidAsync(Guid descriptorUuid, BluetoothCacheMode cacheMode)
Public Function GetDescriptorsForUuidAsync(descriptorUuid As Guid, cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattDescriptorsResult )
var iAsyncOperation = gattCharacteristic.getDescriptorsForUuidAsync(descriptorUuid, cacheMode);
Parameters
descriptorUuid
Platform::Guid Guid Guid Guid

The UUID for the descriptors to be retrieved.

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

ReadClientCharacteristicConfigurationDescriptorAsync() ReadClientCharacteristicConfigurationDescriptorAsync() ReadClientCharacteristicConfigurationDescriptorAsync() ReadClientCharacteristicConfigurationDescriptorAsync()

Reads the current value of the ClientCharacteristicConfigurationDescriptor.

public : IAsyncOperation<GattReadClientCharacteristicConfigurationDescriptorResult> ReadClientCharacteristicConfigurationDescriptorAsync()
public IAsyncOperation<GattReadClientCharacteristicConfigurationDescriptorResult> ReadClientCharacteristicConfigurationDescriptorAsync()
Public Function ReadClientCharacteristicConfigurationDescriptorAsync() As IAsyncOperation( Of GattReadClientCharacteristicConfigurationDescriptorResult )
var iAsyncOperation = gattCharacteristic.readClientCharacteristicConfigurationDescriptorAsync();
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

ReadValueAsync() ReadValueAsync() ReadValueAsync() ReadValueAsync()

Performs a Characteristic Value read from the value cache maintained by Windows.

public : IAsyncOperation<GattReadResult> ReadValueAsync()
public IAsyncOperation<GattReadResult> ReadValueAsync()
Public Function ReadValueAsync() As IAsyncOperation( Of GattReadResult )
var iAsyncOperation = gattCharacteristic.readValueAsync();
Returns

The object required to manage the asynchronous operation, which, upon completion, returns a GattReadResult object, which in turn contains the completion status of the asynchronous operation and, if successful, the data read from 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
See Also

ReadValueAsync(BluetoothCacheMode) ReadValueAsync(BluetoothCacheMode) ReadValueAsync(BluetoothCacheMode) ReadValueAsync(BluetoothCacheMode)

Performs a Characteristic Value read either from the value cache maintained by Windows, or directly from the device.

public : IAsyncOperation<GattReadResult> ReadValueAsync(BluetoothCacheMode cacheMode)
public IAsyncOperation<GattReadResult> ReadValueAsync(BluetoothCacheMode cacheMode)
Public Function ReadValueAsync(cacheMode As BluetoothCacheMode) As IAsyncOperation( Of GattReadResult )
var iAsyncOperation = gattCharacteristic.readValueAsync(cacheMode);
Parameters
cacheMode
BluetoothCacheMode BluetoothCacheMode BluetoothCacheMode BluetoothCacheMode

Specifies whether to read the value directly from the device or from a value cache maintained by Windows.

Returns

The object required to manage the asynchronous operation, which, upon completion, returns a GattReadResult object, which in turn contains the completion status of the asynchronous operation and, if successful, the data read from 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
See Also

WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue) WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue) WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue) WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue)

Writes the ClientCharacteristicConfigurationDescriptor to the Bluetooth LE device, and if the value to be written represents an indication or a notification and a ValueChanged event handler is registered, enables receiving ValueChanged events from the device.

public : IAsyncOperation<GattCommunicationStatus> WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue)
public IAsyncOperation<GattCommunicationStatus> WriteClientCharacteristicConfigurationDescriptorAsync(GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue)
Public Function WriteClientCharacteristicConfigurationDescriptorAsync(clientCharacteristicConfigurationDescriptorValue As GattClientCharacteristicConfigurationDescriptorValue) As IAsyncOperation( Of GattCommunicationStatus )
var iAsyncOperation = gattCharacteristic.writeClientCharacteristicConfigurationDescriptorAsync(clientCharacteristicConfigurationDescriptorValue);
Parameters
clientCharacteristicConfigurationDescriptorValue
GattClientCharacteristicConfigurationDescriptorValue GattClientCharacteristicConfigurationDescriptorValue GattClientCharacteristicConfigurationDescriptorValue GattClientCharacteristicConfigurationDescriptorValue

Specifies a new value for the ClientCharacteristicConfigurationDescriptor of this Characteristic object.

Returns

The object that manages the asynchronous operation, which, upon completion, returns the status with which the operation completed.

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

WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue) WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue) WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue) WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue)

Writes the ClientCharacteristicConfigurationDescriptor to the Bluetooth LE device, and if the value to be written represents an indication or a notification and a ValueChanged event handler is registered, enables receiving ValueChanged events from the device.

public : IAsyncOperation<GattWriteResult> WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue)
public IAsyncOperation<GattWriteResult> WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue clientCharacteristicConfigurationDescriptorValue)
Public Function WriteClientCharacteristicConfigurationDescriptorWithResultAsync(clientCharacteristicConfigurationDescriptorValue As GattClientCharacteristicConfigurationDescriptorValue) As IAsyncOperation( Of GattWriteResult )
var iAsyncOperation = gattCharacteristic.writeClientCharacteristicConfigurationDescriptorWithResultAsync(clientCharacteristicConfigurationDescriptorValue);
Parameters
clientCharacteristicConfigurationDescriptorValue
GattClientCharacteristicConfigurationDescriptorValue GattClientCharacteristicConfigurationDescriptorValue GattClientCharacteristicConfigurationDescriptorValue GattClientCharacteristicConfigurationDescriptorValue

Specifies a new value for the ClientCharacteristicConfigurationDescriptor of this Characteristic object.

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

WriteValueAsync(IBuffer) WriteValueAsync(IBuffer) WriteValueAsync(IBuffer) WriteValueAsync(IBuffer)

Performs a Characteristic Value write to a Bluetooth LE device.

public : IAsyncOperation<GattCommunicationStatus> WriteValueAsync(IBuffer value)
public IAsyncOperation<GattCommunicationStatus> WriteValueAsync(IBuffer value)
Public Function WriteValueAsync(value As IBuffer) As IAsyncOperation( Of GattCommunicationStatus )
var iAsyncOperation = gattCharacteristic.writeValueAsync(value);
Parameters
value
IBuffer IBuffer IBuffer IBuffer

A Windows.Storage.Streams.IBuffer object which contains the data to be written to the Bluetooth LE device.

Returns

The object that manages the asynchronous operation, which, upon completion, returns the status with which the operation completed.

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

WriteValueAsync(IBuffer, GattWriteOption) WriteValueAsync(IBuffer, GattWriteOption) WriteValueAsync(IBuffer, GattWriteOption) WriteValueAsync(IBuffer, GattWriteOption)

Performs a Characteristic Value write to a Bluetooth LE device.

public : IAsyncOperation<GattCommunicationStatus> WriteValueAsync(IBuffer value, GattWriteOption writeOption)
public IAsyncOperation<GattCommunicationStatus> WriteValueAsync(IBuffer value, GattWriteOption writeOption)
Public Function WriteValueAsync(value As IBuffer, writeOption As GattWriteOption) As IAsyncOperation( Of GattCommunicationStatus )
var iAsyncOperation = gattCharacteristic.writeValueAsync(value, writeOption);
Parameters
value
IBuffer IBuffer IBuffer IBuffer

A Windows.Storage.Streams.IBuffer object which contains the data to be written to the Bluetooth LE device.

writeOption
GattWriteOption GattWriteOption GattWriteOption GattWriteOption

Specifies what type of GATT write should be performed.

Returns

The object that manages the asynchronous operation, which, upon completion, returns the status with which the operation completed.

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

WriteValueWithResultAsync(IBuffer) WriteValueWithResultAsync(IBuffer) WriteValueWithResultAsync(IBuffer) WriteValueWithResultAsync(IBuffer)

Performs a Characteristic Value write to a Bluetooth LE device.

public : IAsyncOperation<GattWriteResult> WriteValueWithResultAsync(IBuffer value)
public IAsyncOperation<GattWriteResult> WriteValueWithResultAsync(IBuffer value)
Public Function WriteValueWithResultAsync(value As IBuffer) As IAsyncOperation( Of GattWriteResult )
var iAsyncOperation = gattCharacteristic.writeValueWithResultAsync(value);
Parameters
value
IBuffer IBuffer IBuffer IBuffer

A Windows.Storage.Streams.IBuffer object which contains the data to be written to the Bluetooth LE device.

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

WriteValueWithResultAsync(IBuffer, GattWriteOption) WriteValueWithResultAsync(IBuffer, GattWriteOption) WriteValueWithResultAsync(IBuffer, GattWriteOption) WriteValueWithResultAsync(IBuffer, GattWriteOption)

Performs a Characteristic Value write to a Bluetooth LE device.

public : IAsyncOperation<GattWriteResult> WriteValueWithResultAsync(IBuffer value, GattWriteOption writeOption)
public IAsyncOperation<GattWriteResult> WriteValueWithResultAsync(IBuffer value, GattWriteOption writeOption)
Public Function WriteValueWithResultAsync(value As IBuffer, writeOption As GattWriteOption) As IAsyncOperation( Of GattWriteResult )
var iAsyncOperation = gattCharacteristic.writeValueWithResultAsync(value, writeOption);
Parameters
value
IBuffer IBuffer IBuffer IBuffer

A Windows.Storage.Streams.IBuffer object which contains the data to be written to the Bluetooth LE device.

writeOption
GattWriteOption GattWriteOption GattWriteOption GattWriteOption

Specifies what type of GATT write should be performed.

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

ValueChanged ValueChanged ValueChanged ValueChanged

An App can register an event handler in order to receive events when notification or indications are received from a device, after setting the Client Characteristic Configuration Descriptor.

public : event TypedEventHandler ValueChanged<GattCharacteristic,  GattValueChangedEventArgs>
public event TypedEventHandler ValueChanged<GattCharacteristic,  GattValueChangedEventArgs>
Public Event TypedEventHandler ValueChanged( Of ( Of GattCharacteristic ), ( Of  GattValueChangedEventArgs ))
function onValueChanged(eventArgs){/* Your code */}


gattCharacteristic.addEventListener("valueChanged", onValueChanged);
gattCharacteristic.removeEventListener("valueChanged", onValueChanged);
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

The GattValueChangedEventArgs object represents the arguments received by a ValueChanged event handler used to process characteristic value change notification and indication events sent by a Bluetooth LE device.