GATT Dbus API on BlueZ - attirbute-api.txt modifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

Here's my proposal for some modifications to the existing attribute-api.doc file.

These additions include :
1. Support for more properties, such as writable, readable, notify
2. Remove Value from the properties, and handle write/read with specific functions. This was done since currently the value is only read once from the server, and there is no way to refresh the value using the dbus API. In addition, the value can be written in multiple ways (we currently support write with response and write without response, but future write methods include write reliable and write signed, which may be required by profiles in the future).

Here's the diff from the current docs/attribute-api.txt file :

---->8---------------
diff --git a/doc/attribute-api.txt b/doc/attribute-api.txt
index 98d7f30..fbc6957 100644
--- a/doc/attribute-api.txt
+++ b/doc/attribute-api.txt
@@ -112,6 +112,17 @@ Methods		dict GetProperties()
 
 			Possible Errors: org.bluez.Error.InvalidArguments
 
+		array{byte} ReadValue()
+
+		    Read the value of the characteristic.
+
+		int WriteValue(array{byte} value, int method)
+
+		    Write the value of the characteristic, with specified method :
+		    0: Write without response. Always return 0.
+		    1: Write with response. Return server response code.
+		    Other write methods will be added in the future.
+
 Properties 	string UUID [readonly]
 
 			UUID128 of this characteristic.
@@ -142,15 +153,58 @@ Properties 	string UUID [readonly]
 			  uint16 | Description: Description of the characteristic defined
 			         | in a high layer profile.
 
-		array{byte} Value [readwrite]
-
-			Raw value of the Characteristic Value attribute.
-
 		string Representation (of the binary Value) [readonly]
 
 			Friendly representation of the Characteristic Value
 			based on the format attribute.
 
+		boolean Broadcast [readwrite]
+
+		    Indicates whether this characteristic is broadcasted or not.
+		    If GATT Server Characteristic Configuration descriptor
+		    is not available for this characteristic, or if the characteristic
+		    properties do not allow this, writing to this property is not
+		    allowed.
+
+		boolean Indicate [readwrite]
+
+		    Indicates whether this characteristic is notified or not.
+		    If GATT Client Characteristic Configuration descriptor
+		    is not available for this characteristic, or if the characteristic
+		    properties do not allow this, writing to this property is not
+		    allowed.
+
+		boolean Notify [readwrite]
+
+		    Indicates whether this characteristic is indicated or not.
+		    If GATT Client Characteristic Configuration descriptor
+		    is not available for this characteristic, or if the characteristic
+		    properties do not allow this, writing to this property is not
+		    allowed.
+
+		boolean Readable [readonly]
+
+		    Indicates wether this characteristic value can be read.
+
+		boolean WritableNoRsp [readonly]
+
+		    Indicates whether this characteristic value can be written without
+		    response.
+
+		boolean WritableRsp [readonly]
+
+		    Indicates whether this characteristic can be written with response.
+
+		boolean WritableSigned [readonly]
+
+		    Indicates whether this characteristic can be written with signed
+		    authentication method.
+
+		boolean WritableReliable [readonly]
+
+		    Indicates whether this characteristic can be written with the
+		    reliable write procedure.
+
 
 Characteristic Watcher hierarchy
 ===============================

--------8<-----------

I would appreciate your comments on this.

Thanks,
Chen Ganir
��.n��������+%������w��{.n�����{����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux