BLE · Schema
BLE GATT Service
Schema representing a Bluetooth GATT service definition as assigned by the Bluetooth SIG
BLEBluetoothEmbeddedIoTProtocolsStandardsWireless
Properties
| Name | Type | Description |
|---|---|---|
| uuid | string | 16-bit or 128-bit UUID assigned by Bluetooth SIG or custom |
| name | string | Human-readable service name |
| type | string | Whether this is a SIG-assigned or custom service |
| characteristics | array | GATT characteristics included in this service |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/ble/main/json-schema/ble-gatt-service-schema.json",
"title": "BLE GATT Service",
"description": "Schema representing a Bluetooth GATT service definition as assigned by the Bluetooth SIG",
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "16-bit or 128-bit UUID assigned by Bluetooth SIG or custom",
"examples": ["0x180D", "0000180d-0000-1000-8000-00805f9b34fb"]
},
"name": {
"type": "string",
"description": "Human-readable service name",
"examples": ["Heart Rate", "Battery Service", "Device Information"]
},
"type": {
"type": "string",
"enum": ["org.bluetooth.service", "custom"],
"description": "Whether this is a SIG-assigned or custom service"
},
"characteristics": {
"type": "array",
"description": "GATT characteristics included in this service",
"items": {
"$ref": "#/$defs/GattCharacteristic"
}
}
},
"required": ["uuid", "name"],
"$defs": {
"GattCharacteristic": {
"type": "object",
"properties": {
"uuid": { "type": "string" },
"name": { "type": "string" },
"properties": {
"type": "array",
"items": {
"type": "string",
"enum": ["Read", "Write", "Write Without Response", "Notify", "Indicate", "Broadcast", "Extended Properties"]
}
},
"format": { "type": "string", "description": "Data format descriptor" },
"unit": { "type": "string", "description": "Unit of measurement (GATT unit UUID)" }
}
}
}
}