2010-07-06 21:33:08 +08:00
|
|
|
BlueZ D-Bus Attribute API description
|
|
|
|
*************************************
|
|
|
|
|
|
|
|
Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
|
Service details
|
|
|
|
---------------
|
|
|
|
|
2012-07-23 23:55:15 +08:00
|
|
|
All characteristics are presented as object paths in a single, flat list. Each
|
|
|
|
object has a "ServiceUUID" property which contains the 128-bit UUID of the
|
|
|
|
service that contains it, so clients can identify the correct characteristic if
|
|
|
|
multiple services contain the same characteristic.
|
2010-07-06 21:33:08 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
This API is used for both local (added to the BlueZ GATT server) and remote
|
|
|
|
(found by GATT discovery) services.
|
2010-09-14 03:16:51 +08:00
|
|
|
|
|
|
|
Device Characteristic hierarchy
|
|
|
|
===============================
|
|
|
|
|
|
|
|
Service org.bluez
|
|
|
|
Interface org.bluez.Characteristic
|
2012-07-23 23:55:17 +08:00
|
|
|
Object path freely definable
|
|
|
|
|
|
|
|
For local characteristics, it is recommended (for readability and debugging
|
|
|
|
purposes) to have the object path prefix as "[freely definable]/[busid]" where
|
|
|
|
"[busid]" is the application's D-Bus address. For remote characteristics, the
|
|
|
|
device address is added to the prefix. E.g.:
|
|
|
|
|
|
|
|
[freely definable]/[busid]/characteristic_1803_2A06 (local)
|
|
|
|
[freely definable]/dev_XX_XX_XX_XX_XX_XX/characteristic_1803_2A06 (remote)
|
|
|
|
|
|
|
|
Methods void SetValue(array{byte} value)
|
|
|
|
|
|
|
|
Update characteristic value.
|
|
|
|
|
|
|
|
For a remote characteristic, this method triggers a
|
|
|
|
GATT characteristic value write procedure setting a new
|
|
|
|
value for this characteristic. The GATT sub-procedure
|
|
|
|
is automatically selected based on the characteristic
|
|
|
|
properties and value length.
|
|
|
|
|
|
|
|
dict GetValue()
|
|
|
|
|
|
|
|
Read characteristic value and descriptors. The returned
|
|
|
|
dictionary has the following format:
|
2010-09-14 03:16:51 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
{
|
|
|
|
"value": array{byte},
|
|
|
|
"formatted value": string,
|
|
|
|
// Optional descriptors
|
|
|
|
"client configuration": uint16,
|
|
|
|
"server configuration": uint16,
|
|
|
|
"extended properties": uint16,
|
|
|
|
"user description": string,
|
|
|
|
// For unknown descriptors, use 128-bit UUID
|
|
|
|
// as key
|
|
|
|
"uuid": array{byte},
|
|
|
|
}
|
2010-09-14 03:16:51 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
Properties string UUID [readonly]
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
128-bit UUID of this characteristic.
|
2010-09-25 04:57:06 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
string ServiceUUID [readonly]
|
2010-09-25 04:57:06 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
128-bit UUID of the service which includes this
|
|
|
|
characteristic.
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
boolean Read [readonly]
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
Characteristic value can be read.
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
boolean WriteWithoutResponse [readonly]
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
Characteristic value can be written using GATT Write
|
|
|
|
Without Response sub-procedure.
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
boolean Write [readonly]
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
Characteristic value can be written using GATT Write
|
|
|
|
Characteristic Value sub-procedures.
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
boolean Notify [readonly]
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
Characteristic value can be notified.
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
boolean Indicate [readonly]
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
Characteristic value can be indicated.
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
boolean AuthenticatedSignedWrites [readonly]
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
Characteristic value can be written using GATT Signed
|
|
|
|
Write Without Response sub-procedure.
|
2010-09-14 04:41:03 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
boolean ExtendedProperties [readonly]
|
2010-09-15 22:20:26 +08:00
|
|
|
|
2012-07-23 23:55:17 +08:00
|
|
|
Characteristic contains additional properties defined
|
|
|
|
on the Extended Properties descriptor.
|
2010-09-15 22:20:26 +08:00
|
|
|
|
|
|
|
Characteristic Watcher hierarchy
|
|
|
|
===============================
|
|
|
|
|
|
|
|
Service unique name
|
|
|
|
Interface org.bluez.Watcher
|
|
|
|
Object path freely definable
|
|
|
|
|
2012-07-23 23:55:18 +08:00
|
|
|
Methods void ValueChanged(object characteristic, dict value)
|
2010-09-15 22:20:26 +08:00
|
|
|
|
2012-07-23 23:55:18 +08:00
|
|
|
The value dictionary contains the new value for the
|
|
|
|
Characteristic. The format is the same returned by
|
|
|
|
Characteristic.GetValue().
|
|
|
|
|
|
|
|
This method is only called when the "raw" setting is
|
|
|
|
disabled on Adapter.RegisterCharacteristicsWatcher().
|
|
|
|
|
|
|
|
void RawValueChanged(object characteristic, array{byte} value)
|
|
|
|
|
|
|
|
New raw Characteristic value.
|
|
|
|
|
|
|
|
This method is only called when the "raw" setting is
|
|
|
|
enabled on Adapter.RegisterCharacteristicsWatcher().
|