Table of Contents

Class Utilities

Namespace
nanoFramework.Device.Bluetooth
Assembly
nanoFramework.Device.Bluetooth.dll

Bluetooth library utilities.

public static class Utilities
Inheritance
Utilities
Inherited Members

Methods

ConvertUuidToIntId(Guid)

Converts from standard 128bit UUID to the assigned 32bit UUID.

public static uint ConvertUuidToIntId(Guid uuid)

Parameters

uuid Guid

UUID to convert to 32 bit short code Uuid.

Returns

uint

32bit UUID as uint value.

ConvertUuidToShortId(Guid)

Converts from standard 128bit UUID to the assigned 16bit UUID. Makes it easy to compare services that devices expose to the standard list.

public static ushort ConvertUuidToShortId(Guid uuid)

Parameters

uuid Guid

UUID to convert to 16 bit short code Uuid

Returns

ushort

16bit UUID as ushort value.

CreateUuidFromShortCode(ushort)

Create a Uuid/Guid from a short Bluetooth SIG short UUID

public static Guid CreateUuidFromShortCode(ushort uuid16)

Parameters

uuid16 ushort

Bluetooth Short code UUID

Returns

Guid

A Guid using Bluetooth SIG UUID

IsBluetoothSigUUID(Guid)

Is the GUID a Bluetooth SIG UUID, 16bit or 32bit.

public static bool IsBluetoothSigUUID(Guid uuid)

Parameters

uuid Guid

Guid with UUID value.

Returns

bool

True if Bluetooth SIG UUID.

IsBluetoothSigUUID16(Guid)

Is passed Bluetooth SIG UUID a 16bit UUID format.

public static bool IsBluetoothSigUUID16(Guid uuid)

Parameters

uuid Guid

Guid with UUID Sig value.

Returns

bool

True if Sig UUID is 16bit UUID

TypeOfUuid(Guid)

Return the type of passed UUID.

public static Utilities.UuidType TypeOfUuid(Guid uuid)

Parameters

uuid Guid

UUID to test.

Returns

Utilities.UuidType

UUID type.