> For the complete documentation index, see [llms.txt](https://cavedu.gitbook.io/linkit-7697/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cavedu.gitbook.io/linkit-7697/linkit-7697-development-guide-for-arduino-ide/developer-guide/using-bluetooth/lble-library-api-guide/lbleuuid.md).

# LBLEUuid

Represents a 128-bit or 16-bit BT UUID.

This class represents BT UUIDs that are used to identifie characteristics and other BLE GATT attributes.

Many GATT Service and characteristic APIs relies on this class to identify different attributes.

This class supports the Printable interface and therefore can be passed to `Serial.print.`

### Constructors <a href="#lbleuuid-constructors" id="lbleuuid-constructors"></a>

&#x20;LBLEUuid()

{% tabs %}
{% tab title="LBLEUuid()" %}
There are 2 versions - a String version that creates 128-bit UUID, and an unsigned short version that creates 16-bit Assigned Number UUID.

**Syntax**

**Parameters**

String: Creates UUID from 128-bit string representation

uint16\_t: Creates 16-bit Bluetooth assigned UUID. Creates an assigned 16-bit BT UUID from an unsigned short. In the example below, we create an UUID for "Device Information" service. See <https://www.bluetooth.com/specifications/gatt/services> for a list of assigned numbers for services.

**Returns**

LBLEUuid object
{% endtab %}
{% endtabs %}

### Methods <a href="#lbleuuid-methods" id="lbleuuid-methods"></a>

&#x20;isEmpty()

&#x20;is16Bit()

&#x20;getUuid16()

{% tabs %}
{% tab title="isEmpty()" %}
Check if the UUID is empty (just created).

**Syntax**

**Parameters**

none

**Returns**

true if the UUID is empty; false if the UUID is not empty.
{% endtab %}

{% tab title=" is16Bit()" %}
Check if this UUID is a 16-bit UUID.

Check if the UUID is an 16-bit UUID, which is assigned by BT SIG, or a generic, developer-generated 128-bit UUID.

**Syntax**

**Parameters**

none

**Returns**

true if the UUID is 16-bit assigned number. Note that this method does not check if the 16-bit is actually a BT SIG assigned number; it simply check if it is 16-bit long.false if the UUID is 128-bit UUID.
{% endtab %}

{% tab title=" getUuid16()" %}
Get the unsigned short representation of a 16-bit assigned UUID.

**Syntax**

**Parameters**

none

**Returns**

unsigned short value of the 16-bit assigned UUID.

0 if the [LBLEUuid](file:///D:/doxy_output/html/class_l_b_l_e_uuid.html) is not a 16-bit UUID.
{% endtab %}
{% endtabs %}
