The latest development version of this page may be more current than this released 1.14.0 version.

Universal Unique Identifiers (UUIDs)

API Reference

group bt_uuid

UUIDs.

Defines

BT_UUID_INIT_16(value)
BT_UUID_INIT_32(value)
BT_UUID_INIT_128(value...)
BT_UUID_DECLARE_16(value)
BT_UUID_DECLARE_32(value)
BT_UUID_DECLARE_128(value...)
BT_UUID_16(__u)
BT_UUID_32(__u)
BT_UUID_128(__u)
BT_UUID_GAP

Generic Access.

BT_UUID_GATT

Generic Attribute.

BT_UUID_CTS

Current Time Service.

BT_UUID_DIS

Device Information Service.

BT_UUID_HRS

Heart Rate Service.

BT_UUID_BAS

Battery Service.

BT_UUID_HIDS

HID Service.

BT_UUID_CSC

Cycling Speed and Cadence Service.

BT_UUID_ESS

Environmental Sensing Service.

BT_UUID_IPSS

IP Support Service.

BT_UUID_MESH_PROV

Mesh Provisioning Service.

BT_UUID_MESH_PROXY

Mesh Proxy Service.

BT_UUID_GATT_PRIMARY

GATT Primary Service.

BT_UUID_GATT_SECONDARY

GATT Secondary Service.

BT_UUID_GATT_INCLUDE

GATT Include Service.

BT_UUID_GATT_CHRC

GATT Characteristic.

BT_UUID_GATT_CEP

GATT Characteristic Extended Properties.

BT_UUID_GATT_CUD

GATT Characteristic User Description.

BT_UUID_GATT_CCC

GATT Client Characteristic Configuration.

BT_UUID_GATT_SCC

GATT Server Characteristic Configuration.

BT_UUID_GATT_CPF

GATT Characteristic Presentation Format.

BT_UUID_VALID_RANGE

Valid Range Descriptor.

BT_UUID_HIDS_EXT_REPORT

HID External Report Descriptor.

BT_UUID_HIDS_REPORT_REF

HID Report Reference Descriptor.

BT_UUID_ES_CONFIGURATION

Environmental Sensing Configuration Descriptor.

BT_UUID_ES_MEASUREMENT

Environmental Sensing Measurement Descriptor.

BT_UUID_ES_TRIGGER_SETTING

Environmental Sensing Trigger Setting Descriptor.

BT_UUID_GAP_DEVICE_NAME

GAP Characteristic Device Name.

BT_UUID_GAP_APPEARANCE

GAP Characteristic Appearance.

BT_UUID_GAP_PPCP

GAP Characteristic Peripheral Preferred Connection Parameters.

BT_UUID_GATT_SC

GATT Characteristic Service Changed.

BT_UUID_BAS_BATTERY_LEVEL

BAS Characteristic Battery Level.

BT_UUID_HIDS_BOOT_KB_IN_REPORT

HID Characteristic Boot Keyboard Input Report.

BT_UUID_DIS_SYSTEM_ID

DIS Characteristic System ID.

BT_UUID_DIS_MODEL_NUMBER

DIS Characteristic Model Number String.

BT_UUID_DIS_SERIAL_NUMBER

DIS Characteristic Serial Number String.

BT_UUID_DIS_FIRMWARE_REVISION

DIS Characteristic Firmware Revision String.

BT_UUID_DIS_HARDWARE_REVISION

DIS Characteristic Hardware Revision String.

BT_UUID_DIS_SOFTWARE_REVISION

DIS Characteristic Software Revision String.

BT_UUID_DIS_MANUFACTURER_NAME

DIS Characteristic Manufacturer Name String.

BT_UUID_DIS_PNP_ID

DIS Characteristic PnP ID.

BT_UUID_CTS_CURRENT_TIME

CTS Characteristic Current Time.

BT_UUID_MAGN_DECLINATION

Magnetic Declination Characteristic.

BT_UUID_HIDS_BOOT_KB_OUT_REPORT

HID Boot Keyboard Output Report Characteristic.

BT_UUID_HIDS_BOOT_MOUSE_IN_REPORT

HID Boot Mouse Input Report Characteristic.

BT_UUID_HRS_MEASUREMENT

HRS Characteristic Measurement Interval.

BT_UUID_HRS_BODY_SENSOR

HRS Characteristic Body Sensor Location.

BT_UUID_HRS_CONTROL_POINT

HRS Characteristic Control Point.

BT_UUID_HIDS_INFO

HID Information Characteristic.

BT_UUID_HIDS_REPORT_MAP

HID Report Map Characteristic.

BT_UUID_HIDS_CTRL_POINT

HID Control Point Characteristic.

BT_UUID_HIDS_REPORT

HID Report Characteristic.

BT_UUID_HIDS_PROTOCOL_MODE

HID Protocol Mode Characteristic.

BT_UUID_CSC_MEASUREMENT

CSC Measurement Characteristic.

BT_UUID_CSC_FEATURE

CSC Feature Characteristic.

BT_UUID_SENSOR_LOCATION

Sensor Location Characteristic.

BT_UUID_SC_CONTROL_POINT

SC Control Point Characteristic.

BT_UUID_ELEVATION

Elevation Characteristic.

BT_UUID_PRESSURE

Pressure Characteristic.

BT_UUID_TEMPERATURE

Temperature Characteristic.

BT_UUID_HUMIDITY

Humidity Characteristic.

BT_UUID_TRUE_WIND_SPEED

True Wind Speed Characteristic.

BT_UUID_TRUE_WIND_DIR

True Wind Direction Characteristic.

BT_UUID_APPARENT_WIND_SPEED

Apparent Wind Speed Characteristic.

BT_UUID_APPARENT_WIND_DIR

Apparent Wind Direction Characteristic.

BT_UUID_GUST_FACTOR

Gust Factor Characteristic.

BT_UUID_POLLEN_CONCENTRATION

Pollen Concentration Characteristic.

BT_UUID_UV_INDEX

UV Index Characteristic.

BT_UUID_IRRADIANCE

Irradiance Characteristic.

BT_UUID_RAINFALL

Rainfall Characteristic.

BT_UUID_WIND_CHILL

Wind Chill Characteristic.

BT_UUID_HEAT_INDEX

Heat Index Characteristic.

BT_UUID_DEW_POINT

Dew Point Characteristic.

BT_UUID_DESC_VALUE_CHANGED

Descriptor Value Changed Characteristic.

BT_UUID_MAGN_FLUX_DENSITY_2D

Magnetic Flux Density - 2D Characteristic.

BT_UUID_MAGN_FLUX_DENSITY_3D

Magnetic Flux Density - 3D Characteristic.

BT_UUID_BAR_PRESSURE_TREND

Barometric Pressure Trend Characteristic.

BT_UUID_CENTRAL_ADDR_RES

Central Address Resolution Characteristic.

BT_UUID_MESH_PROV_DATA_IN

Mesh Provisioning Data In.

BT_UUID_MESH_PROV_DATA_OUT

Mesh Provisioning Data Out.

BT_UUID_MESH_PROXY_DATA_IN

Mesh Proxy Data In.

BT_UUID_MESH_PROXY_DATA_OUT

Mesh Proxy Data Out.

BT_UUID_GATT_CLIENT_FEATURES

Client Supported Features.

BT_UUID_GATT_DB_HASH

Database Hash.

BT_UUID_SDP
BT_UUID_UDP
BT_UUID_RFCOMM
BT_UUID_TCP
BT_UUID_TCS_BIN
BT_UUID_TCS_AT
BT_UUID_ATT
BT_UUID_OBEX
BT_UUID_IP
BT_UUID_FTP
BT_UUID_HTTP
BT_UUID_BNEP
BT_UUID_UPNP
BT_UUID_HIDP
BT_UUID_HCRP_CTRL
BT_UUID_HCRP_DATA
BT_UUID_HCRP_NOTE
BT_UUID_AVCTP
BT_UUID_AVDTP
BT_UUID_CMTP
BT_UUID_UDI
BT_UUID_MCAP_CTRL
BT_UUID_MCAP_DATA
BT_UUID_L2CAP

Enums

enum [anonymous]

Bluetooth UUID types.

Values:

BT_UUID_TYPE_16
BT_UUID_TYPE_32
BT_UUID_TYPE_128

Functions

int bt_uuid_cmp(const struct bt_uuid *u1, const struct bt_uuid *u2)

Compare Bluetooth UUIDs.

Compares 2 Bluetooth UUIDs, if the types are different both UUIDs are first converted to 128 bits format before comparing.

Return
negative value if u1 < u2, 0 if u1 == u2, else positive
Parameters
  • u1: First Bluetooth UUID to compare
  • u2: Second Bluetooth UUID to compare

static void bt_uuid_to_str(const struct bt_uuid *uuid, char *str, size_t len)
static const char *bt_uuid_str(const struct bt_uuid *uuid)
struct bt_uuid
#include <uuid.h>

This is a ‘tentative’ type and should be used as a pointer only.