2011-10-31 23:11:22

by Claudio Takahasi

[permalink] [raw]
Subject: Multiple instances of same characteristics (was: Re: GATT Dbus API on BlueZ - attirbute-api.txt modifications)

Hi Mike,

> [MT]How can this handle the multiple instances of same characteristics within a single service? The characteristic UUID will not be unique in that case. Also, how is the profile specific characteristic descriptor handled?
>
> Cheers,
>
> Mike

I am moving your question to another thread. The original thread is
almost impossible to follow.
Do you mean support for client characteristic configuration and other
characteristics per device?

In the Generic Attribute API(client), the represented characteristics
are always per device. The abstraction for per device characteristic
value needs to implemented in the server.
The current attribute server supports CCC only, before implementing
per device characteristics we need to cleanup the code.

BR,
Claudio.


2011-11-01 20:21:47

by Tsai, Mike

[permalink] [raw]
Subject: RE: Multiple instances of same characteristics (was: Re: GATT Dbus API on BlueZ - attirbute-api.txt modifications)

Hi Anderson,


-----Original Message-----
From: Anderson Lizardo [mailto:[email protected]]
Sent: Tuesday, November 01, 2011 3:57 AM
To: Claudio Takahasi
Cc: Tsai, Mike; [email protected]; Vijaykumar Dadmode; Ganir, Chen
Subject: Re: Multiple instances of same characteristics (was: Re: GATT Dbus API on BlueZ - attirbute-api.txt modifications)

Hi Mike,

>> [MT]How can this handle the multiple instances of same characteristics within a single service? The characteristic UUID will not be unique in that case.

In BlueZ GATT services are represented by a D-Bus object path, in the format:

<device-path>/service<handle1>/characteristic<handle2>

Where <device-path> is a path specific to a device connected to a adapter (there can be multiple adapters on the same host), and <handle1>/<handle2> are attribute handles for the service and characteristic declarations, respectively.

Example:

/org/bluez/2161/hci0/dev_00_02_5B_00_D5_D0/service0001/characteristic000a

So, even if you have multiple characteristics with same UUID, they will have different declaration handles, and thus different object paths in D-Bus.

[MT]Thanks, that answers my question. Profile actually gets both characteristic UUID and Attribute handle during discovery, not just the UUID. Profile may either set property or read/write specific characteristic based on the combination of UUID+Attribute handle, not just the UUID. We should make sure that is also true to the new API and probably update the text inside attribute_api.text.

>> Also, how is the profile specific characteristic descriptor handled?

I think Chen's proposal does not address this. But there was another proposal sent by Vijaykumar Dadmode on Oct 4th (subject "Proposal for GATT Client Dbus API") to this list where it was handling profile-specific descriptors. We made some comments on it, and we are waiting for an updated proposal.

We need to consolidate at least these two proposals: Chen's and Vijaykumar's.

[MT]Yes, this is required for upcoming profile/service like HID and Automation,

Regards,

Mike

Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

2011-11-01 20:15:24

by Tsai, Mike

[permalink] [raw]
Subject: RE: Multiple instances of same characteristics (was: Re: GATT Dbus API on BlueZ - attirbute-api.txt modifications)

SGkgQ2xhdWRpbywNCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IENsYXVkaW8g
VGFrYWhhc2kgW21haWx0bzpjbGF1ZGlvLnRha2FoYXNpQG9wZW5ib3NzYS5vcmddIA0KU2VudDog
TW9uZGF5LCBPY3RvYmVyIDMxLCAyMDExIDQ6MTEgUE0NClRvOiBUc2FpLCBNaWtlDQpDYzogbGlu
dXgtYmx1ZXRvb3RoQHZnZXIua2VybmVsLm9yZw0KU3ViamVjdDogTXVsdGlwbGUgaW5zdGFuY2Vz
IG9mIHNhbWUgY2hhcmFjdGVyaXN0aWNzICh3YXM6IFJlOiBHQVRUIERidXMgQVBJIG9uIEJsdWVa
IC0gYXR0aXJidXRlLWFwaS50eHQgbW9kaWZpY2F0aW9ucykNCg0KSGkgTWlrZSwNCg0KPiBbTVRd
SG93IGNhbiB0aGlzIGhhbmRsZSB0aGUgbXVsdGlwbGUgaW5zdGFuY2VzIG9mIHNhbWUgY2hhcmFj
dGVyaXN0aWNzIHdpdGhpbiBhIHNpbmdsZSBzZXJ2aWNlPyBUaGUgY2hhcmFjdGVyaXN0aWMgVVVJ
RCB3aWxsIG5vdCBiZSB1bmlxdWUgaW4gdGhhdCBjYXNlLiBBbHNvLCBob3cgaXMgdGhlIHByb2Zp
bGUgc3BlY2lmaWMgY2hhcmFjdGVyaXN0aWMgZGVzY3JpcHRvciBoYW5kbGVkPw0KPg0KPiBD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sgdGhlIHByb2JsZW0gaXMgYWxzbyByZXNv
bHZlZC4NCg0KVGhlIHByb2ZpbGUgc3BlY2lmaWMgZGVzY3JpcHRvcnMgKGluIGF1dG9tYXRpb24g
YW5kIGluIEhJRCBzZXJ2aWNlcykgd2lsbCBuZWVkIHRvIGJlIGFkZHJlc3NlZCBsYXRlciwNCg0K
QlIsDQoNCk1pa2UNCg0KQlIsDQpDbGF1ZGlvLg0K

2011-11-01 10:56:35

by Anderson Lizardo

[permalink] [raw]
Subject: Re: Multiple instances of same characteristics (was: Re: GATT Dbus API on BlueZ - attirbute-api.txt modifications)

Hi Mike,

>> [MT]How can this handle the multiple instances of same characteristics within a single service? The characteristic UUID will not be unique in that case.

In BlueZ GATT services are represented by a D-Bus object path, in the format:

<device-path>/service<handle1>/characteristic<handle2>

Where <device-path> is a path specific to a device connected to a
adapter (there can be multiple adapters on the same host), and
<handle1>/<handle2> are attribute handles for the service and
characteristic declarations, respectively.

Example:

/org/bluez/2161/hci0/dev_00_02_5B_00_D5_D0/service0001/characteristic000a

So, even if you have multiple characteristics with same UUID, they
will have different declaration handles, and thus different object
paths in D-Bus.

>> Also, how is the profile specific characteristic descriptor handled?

I think Chen's proposal does not address this. But there was another
proposal sent by Vijaykumar Dadmode on Oct 4th (subject "Proposal for
GATT Client Dbus API") to this list where it was handling
profile-specific descriptors. We made some comments on it, and we are
waiting for an updated proposal.

We need to consolidate at least these two proposals: Chen's and Vijaykumar's.

Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil