Generic Attribute Profile Server (gatt_server)#
These commands and events are used by the local GATT server to manage the local GATT database.
gatt_server commands#
gatt_server_find_attribute#
This command can be used to find attributes of certain type from a local GATT database. Type is usually given as 16-bit or 128-bit UUID.
Command#
Byte | Type | Name | Description |
|---|---|---|---|
0 | 0x20 | hilen | Message type: Command |
1 | 0x03 | lolen | Minimum payload length |
2 | 0x0a | class | Message class:Generic Attribute Profile Server |
3 | 0x06 | method | Message ID |
4-5 | uint16 | start | Search start handle |
6 | uint8array | type | Variable length byte array. The first byte defines the length of the data that follows, 0 - 255 bytes. |
Response#
Byte | Type | Name | Description |
|---|---|---|---|
0 | 0x20 | hilen | Message type: Response |
1 | 0x04 | lolen | Minimum payload length |
2 | 0x0a | class | Message class:Generic Attribute Profile Server |
3 | 0x06 | method | Message ID |
4-5 | uint16 | result | Result code
|
6-7 | uint16 | attribute | Attribute handle |