Blob: org.bluez.GattDescriptor.rst

Blob id: 76d274464f51e73df2f935d545848a3002a54484

Size: 3.3 KB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
========================
org.bluez.GattDescriptor
========================

--------------------------------------------
BlueZ D-Bus GattDescriptor API documentation
--------------------------------------------

:Version: BlueZ
:Date: October 2023
:Manual section: 5
:Manual group: Linux System Administration

Description
===========

GATT local/server and remote/client descriptor attribute representation
share the same high-level D-Bus API.

Local/Server refers to GATT based descriptors exported by a plugin or an
external application.

Remote/Client refers to GATT descriptors exported by the peer.

Interface
=========

Client
------

:Service:	org.bluez
:Interface:	org.bluez.GattDescriptor1
:Object path:	[variable prefix]/{hci0,hci1,...}/dev_{BDADDR}/service#/char#/descriptor#

Server
------

:Service:	unique name
:Interface:	org.bluez.GattDescriptor1
:Object path:	freely definable

Methods
-------

array{byte} ReadValue(dict flags)
`````````````````````````````````

Issues a request to read the value of the descriptor and returns the value if
the operation was successful.

Possible options:

:uint16 offset:

	Read start offset in bytes.

:object device (server only):

	Device object.

:string link:

	Link type (Server only).

	Possible values:

	:"BR/EDR":
	:"LE":

Possible Errors:

:org.bluez.Error.Failed:
:org.bluez.Error.InProgress:
:org.bluez.Error.NotPermitted:
:org.bluez.Error.NotAuthorized:
:org.bluez.Error.NotSupported:

void WriteValue(array{byte} value, dict flags)
``````````````````````````````````````````````

Issues a request to write the value of the descriptor.

Possible flags:

:uint16 offset:

	Write start offset in bytes.

:uint16 mtu:

	Exchanged MTU (Server only).

:object device:

	Device path (Server only).

:string link:

	Link type (Server only).

	Possible values:

	:"BR/EDR":
	:"LE":

:boolean prepare-authorize:

	True if prepare authorization request.

Possible Errors:

:org.bluez.Error.Failed:
:org.bluez.Error.InProgress:
:org.bluez.Error.NotPermitted:
:org.bluez.Error.InvalidValueLength:
:org.bluez.Error.NotAuthorized:
:org.bluez.Error.NotSupported:
:org.bluez.Error.ImproperlyConfigured:

Properties
----------

string UUID [read-only]
```````````````````````

128-bit descriptor UUID.

object Characteristic [read-only]
`````````````````````````````````

Object path of the GATT characteristic the descriptor belongs to.

array{byte} Value [read-only, optional]
```````````````````````````````````````

The cached value of the descriptor. This property gets updated only after a
successful read request, upon which a PropertiesChanged signal will be emitted.

array{string} Flags [read-only]
```````````````````````````````

Defines how the descriptor value can be used.

Possible values:

:"read":
:"write":
:"encrypt-read":
:"encrypt-write":
:"encrypt-authenticated-read":
:"encrypt-authenticated-write":
:"secure-read" (Server Only):
:"secure-write" (Server Only):
:"authorize":

uint16 Handle [read-only] (Client Only)
```````````````````````````````````````

Descriptor handle.

uint16 Handle [read-write, optional] (Server Only)
``````````````````````````````````````````````````

Descriptor handle. When available in the server it would attempt to use to
allocate into the database which may fail, to auto allocate the value 0x0000
shall be used which will cause the allocated handle to be set once registered.