* Registering a GATT service via DBus
@ 2015-08-12 6:12 Urbani, Edmund
0 siblings, 0 replies; 6+ messages in thread
From: Urbani, Edmund @ 2015-08-12 6:12 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org
Hello,
my attempts to register a GATT service via DBus from Java have so far
been unsuccessful. The GattManager1.RegisterService method does not
return any reply, instead I simply get this timeout exception:
Exception in thread "main" org.freedesktop.DBus$Error$
NoReply: No reply within specified time
Also, all I see in the logs is the registration attempt, but no error:
Aug 11 14:42:02 raspberrypi bluetoothd[5466]:
src/gatt-database.c:manager_register_service() Registering service -
path: /com/lilandit/iventcloud/skg/service
Introspection of the service (with mdbus2 tool) shows this info (which
matches the specs as far as a DBus noob like I can tell):
[METHOD] org.bluez.GattService1.GetPrimary() -> (b:arg_0)
[METHOD] org.bluez.GattService1.GetDevice() -> (o:arg_0)
[METHOD] org.bluez.GattService1.GetUUID() -> (s:arg_0)
[METHOD] org.bluez.GattService1.GetCharacteristics() -> (ao:arg_0)
[METHOD] org.bluez.GattService1.GetIncludes() -> (ao:arg_0)
[METHOD] org.freedesktop.DBus.Introspectable.Introspect() -> (s:arg_0)
[METHOD] org.freedesktop.DBus.Peer.Ping() -> ()
The implementation of the service is incomplete (same applies to the
ObjectManager registered at "/"), however I was expecting to at least
get some feedback on registration and possibly see some of the service
methods being called at this point. Instead I get nothing.
Any ideas what may be wrong or where I should be looking for the cause?
Kind regards,
Edmund
PS: I'm using BlueZ 5.32
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Registering a GATT service via DBus
@ 2015-08-12 8:02 Anupam Roy
2015-08-12 8:18 ` Luiz Augusto von Dentz
2015-08-12 9:16 ` Urbani, Edmund
0 siblings, 2 replies; 6+ messages in thread
From: Anupam Roy @ 2015-08-12 8:02 UTC (permalink / raw)
To: linux-bluetooth; +Cc: sachin.dev
Hi Edmund,
>Hello,
>
>my attempts to register a GATT service via DBus from Java have so far
>been unsuccessful. The GattManager1.RegisterService method does not
>return any reply, instead I simply get this timeout exception:
>Exception in thread "main" org.freedesktop.DBus$Error$
>NoReply: No reply within specified time
>
As I understand, RegisterService DBUS method in gatt-database replies back to
client only when client is fully ready. It happens when service is successfully created
by gatt-database and all managed objects are successfully retrieved from client
service and parsed by gdbus/client.c.
>Also, all I see in the logs is the registration attempt, but no error:
>Aug 11 14:42:02 raspberrypi bluetoothd[5466]:
>src/gatt-database.c:manager_register_service() Registering service -
>path: /com/lilandit/iventcloud/skg/service
>
This print only only suggests that external service is created by gatt-database
>Introspection of the service (with mdbus2 tool) shows this info (which
>matches the specs as far as a DBus noob like I can tell):
>[METHOD] org.bluez.GattService1.GetPrimary() -> (b:arg_0)
>[METHOD] org.bluez.GattService1.GetDevice() -> (o:arg_0)
>[METHOD] org.bluez.GattService1.GetUUID() -> (s:arg_0)
>[METHOD] org.bluez.GattService1.GetCharacteristics() -> (ao:arg_0)
>[METHOD] org.bluez.GattService1.GetIncludes() -> (ao:arg_0)
>[METHOD] org.freedesktop.DBus.Introspectable.Introspect() -> (s:arg_0)
>[METHOD] org.freedesktop.DBus.Peer.Ping() -> ()
>
>The implementation of the service is incomplete (same applies to the
>ObjectManager registered at "/"), however I was expecting to at least
>get some feedback on registration and possibly see some of the service
>methods being called at this point. Instead I get nothing.
>
>Any ideas what may be wrong or where I should be looking for the cause?
>
According to GATT API doc, client service should export ObjectManager interface
on its client root path. If this is not done, then I think
GetManagedObjects call from gdbus/client will fail and client ready
will not be invoked and possibly DBUS timeout occurs.
Is your service exporting ObjectManager interface on service root path?
>Kind regards,
> Edmund
>
>PS: I'm using BlueZ 5.32
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Registering a GATT service via DBus
2015-08-12 8:02 Registering a GATT service via DBus Anupam Roy
@ 2015-08-12 8:18 ` Luiz Augusto von Dentz
2015-08-12 9:16 ` Urbani, Edmund
1 sibling, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2015-08-12 8:18 UTC (permalink / raw)
To: Anupam Roy, Edmund; +Cc: linux-bluetooth@vger.kernel.org, sachin.dev
Hi Edmund, Anupam,
On Wed, Aug 12, 2015 at 11:02 AM, Anupam Roy <anupam.r@samsung.com> wrote:
> Hi Edmund,
>
>>Hello,
>>
>>my attempts to register a GATT service via DBus from Java have so far
>>been unsuccessful. The GattManager1.RegisterService method does not
>>return any reply, instead I simply get this timeout exception:
>>Exception in thread "main" org.freedesktop.DBus$Error$
>>NoReply: No reply within specified time
>>
> As I understand, RegisterService DBUS method in gatt-database replies back to
> client only when client is fully ready. It happens when service is successfully created
> by gatt-database and all managed objects are successfully retrieved from client
> service and parsed by gdbus/client.c.
>
>>Also, all I see in the logs is the registration attempt, but no error:
>>Aug 11 14:42:02 raspberrypi bluetoothd[5466]:
>>src/gatt-database.c:manager_register_service() Registering service -
>>path: /com/lilandit/iventcloud/skg/service
>>
> This print only only suggests that external service is created by gatt-database
>
>>Introspection of the service (with mdbus2 tool) shows this info (which
>>matches the specs as far as a DBus noob like I can tell):
>>[METHOD] org.bluez.GattService1.GetPrimary() -> (b:arg_0)
>>[METHOD] org.bluez.GattService1.GetDevice() -> (o:arg_0)
>>[METHOD] org.bluez.GattService1.GetUUID() -> (s:arg_0)
>>[METHOD] org.bluez.GattService1.GetCharacteristics() -> (ao:arg_0)
>>[METHOD] org.bluez.GattService1.GetIncludes() -> (ao:arg_0)
>>[METHOD] org.freedesktop.DBus.Introspectable.Introspect() -> (s:arg_0)
>>[METHOD] org.freedesktop.DBus.Peer.Ping() -> ()
>>
>>The implementation of the service is incomplete (same applies to the
>>ObjectManager registered at "/"), however I was expecting to at least
>>get some feedback on registration and possibly see some of the service
>>methods being called at this point. Instead I get nothing.
>>
>>Any ideas what may be wrong or where I should be looking for the cause?
>>
> According to GATT API doc, client service should export ObjectManager interface
> on its client root path. If this is not done, then I think
> GetManagedObjects call from gdbus/client will fail and client ready
> will not be invoked and possibly DBUS timeout occurs.
>
> Is your service exporting ObjectManager interface on service root path?
We are currently discussing if the service interface shall be exposed
in the root path give, ObjectManager documentation has been documented
saying that only child path interfaces shall be returned. That said
the problem here is that GetManagedObjects probably never returns,
thus the request times out.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Registering a GATT service via DBus
2015-08-12 8:02 Registering a GATT service via DBus Anupam Roy
2015-08-12 8:18 ` Luiz Augusto von Dentz
@ 2015-08-12 9:16 ` Urbani, Edmund
2015-08-12 11:24 ` Luiz Augusto von Dentz
1 sibling, 1 reply; 6+ messages in thread
From: Urbani, Edmund @ 2015-08-12 9:16 UTC (permalink / raw)
To: linux-bluetooth
On 08/12/2015 10:02 AM, Anupam Roy wrote:
> Hi Edmund,
>
>> Hello,
>>
>> my attempts to register a GATT service via DBus from Java have so far
>> been unsuccessful. The GattManager1.RegisterService method does not
>> return any reply, instead I simply get this timeout exception:
>> Exception in thread "main" org.freedesktop.DBus$Error$
>> NoReply: No reply within specified time
>>
> As I understand, RegisterService DBUS method in gatt-database replies back to
> client only when client is fully ready. It happens when service is successfully created
> by gatt-database and all managed objects are successfully retrieved from client
> service and parsed by gdbus/client.c.
>
>> Also, all I see in the logs is the registration attempt, but no error:
>> Aug 11 14:42:02 raspberrypi bluetoothd[5466]:
>> src/gatt-database.c:manager_register_service() Registering service -
>> path: /com/lilandit/iventcloud/skg/service
>>
> This print only only suggests that external service is created by gatt-database
>
>> Introspection of the service (with mdbus2 tool) shows this info (which
>> matches the specs as far as a DBus noob like I can tell):
>> [METHOD] org.bluez.GattService1.GetPrimary() -> (b:arg_0)
>> [METHOD] org.bluez.GattService1.GetDevice() -> (o:arg_0)
>> [METHOD] org.bluez.GattService1.GetUUID() -> (s:arg_0)
>> [METHOD] org.bluez.GattService1.GetCharacteristics() -> (ao:arg_0)
>> [METHOD] org.bluez.GattService1.GetIncludes() -> (ao:arg_0)
>> [METHOD] org.freedesktop.DBus.Introspectable.Introspect() -> (s:arg_0)
>> [METHOD] org.freedesktop.DBus.Peer.Ping() -> ()
>>
>> The implementation of the service is incomplete (same applies to the
>> ObjectManager registered at "/"), however I was expecting to at least
>> get some feedback on registration and possibly see some of the service
>> methods being called at this point. Instead I get nothing.
>>
>> Any ideas what may be wrong or where I should be looking for the cause?
>>
> According to GATT API doc, client service should export ObjectManager interface
> on its client root path. If this is not done, then I think
> GetManagedObjects call from gdbus/client will fail and client ready
> will not be invoked and possibly DBUS timeout occurs.
>
> Is your service exporting ObjectManager interface on service root path?
>
>> Kind regards,
>> Edmund
>>
>> PS: I'm using BlueZ 5.32
>
I think I need to clarify that I have exported two objects. The ObjectManager
(path "/" with interface org.freedesktop.DBus.ObjectManager), and the
GattService (path "/com/lilandit/iventcloud/skg/service" with interface
org.bluez.GattService1). Is this OK, or should I have one object that implements
both interfaces?
Note that GetManagedObjects is never called (nor are any other methods I
implemented, each of which has a log statement right there in the first line).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Registering a GATT service via DBus
2015-08-12 9:16 ` Urbani, Edmund
@ 2015-08-12 11:24 ` Luiz Augusto von Dentz
2015-08-12 11:32 ` Urbani, Edmund
0 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2015-08-12 11:24 UTC (permalink / raw)
To: Urbani, Edmund; +Cc: linux-bluetooth@vger.kernel.org
Hi Edmund,
On Wed, Aug 12, 2015 at 12:16 PM, Urbani, Edmund
<edmund.urbani@lilandit.com> wrote:
> On 08/12/2015 10:02 AM, Anupam Roy wrote:
>>
>> Hi Edmund,
>>
>>>
>>> Hello,
>>>
>>> my attempts to register a GATT service via DBus from Java have so far
>>> been unsuccessful. The GattManager1.RegisterService method does not
>>> return any reply, instead I simply get this timeout exception:
>>> Exception in thread "main" org.freedesktop.DBus$Error$
>>> NoReply: No reply within specified time
>>>
>> As I understand, RegisterService DBUS method in gatt-database replies back
>> to
>> client only when client is fully ready. It happens when service is
>> successfully created
>> by gatt-database and all managed objects are successfully retrieved from
>> client
>> service and parsed by gdbus/client.c.
>>
>>> Also, all I see in the logs is the registration attempt, but no error:
>>> Aug 11 14:42:02 raspberrypi bluetoothd[5466]:
>>> src/gatt-database.c:manager_register_service() Registering service -
>>> path: /com/lilandit/iventcloud/skg/service
>>>
>> This print only only suggests that external service is created by
>> gatt-database
>>
>>> Introspection of the service (with mdbus2 tool) shows this info (which
>>> matches the specs as far as a DBus noob like I can tell):
>>> [METHOD] org.bluez.GattService1.GetPrimary() -> (b:arg_0)
>>> [METHOD] org.bluez.GattService1.GetDevice() -> (o:arg_0)
>>> [METHOD] org.bluez.GattService1.GetUUID() -> (s:arg_0)
>>> [METHOD] org.bluez.GattService1.GetCharacteristics() -> (ao:arg_0)
>>> [METHOD] org.bluez.GattService1.GetIncludes() -> (ao:arg_0)
>>> [METHOD] org.freedesktop.DBus.Introspectable.Introspect() -> (s:arg_0)
>>> [METHOD] org.freedesktop.DBus.Peer.Ping() -> ()
>>>
>>> The implementation of the service is incomplete (same applies to the
>>> ObjectManager registered at "/"), however I was expecting to at least
>>> get some feedback on registration and possibly see some of the service
>>> methods being called at this point. Instead I get nothing.
>>>
>>> Any ideas what may be wrong or where I should be looking for the cause?
>>>
>> According to GATT API doc, client service should export ObjectManager
>> interface
>> on its client root path. If this is not done, then I think
>> GetManagedObjects call from gdbus/client will fail and client ready
>> will not be invoked and possibly DBUS timeout occurs.
>>
>> Is your service exporting ObjectManager interface on service root path?
>>
>>> Kind regards,
>>> Edmund
>>>
>>> PS: I'm using BlueZ 5.32
>>
>>
> I think I need to clarify that I have exported two objects. The
> ObjectManager (path "/" with interface org.freedesktop.DBus.ObjectManager),
> and the GattService (path "/com/lilandit/iventcloud/skg/service" with
> interface org.bluez.GattService1). Is this OK, or should I have one object
> that implements both interfaces?
We expect ObjectManager to be in the path where the GattService is in in '/'.
> Note that GetManagedObjects is never called (nor are any other methods I
> implemented, each of which has a log statement right there in the first
> line).
Because ObjectManager interface is in a different path which
bluetoothd has no idea of.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Registering a GATT service via DBus
2015-08-12 11:24 ` Luiz Augusto von Dentz
@ 2015-08-12 11:32 ` Urbani, Edmund
0 siblings, 0 replies; 6+ messages in thread
From: Urbani, Edmund @ 2015-08-12 11:32 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth@vger.kernel.org
On 08/12/2015 01:24 PM, Luiz Augusto von Dentz wrote:
> Hi Edmund,
>
> On Wed, Aug 12, 2015 at 12:16 PM, Urbani, Edmund
> <edmund.urbani@lilandit.com> wrote:
>> On 08/12/2015 10:02 AM, Anupam Roy wrote:
>>> Hi Edmund,
>>>
>>>> Hello,
>>>>
>>>> my attempts to register a GATT service via DBus from Java have so far
>>>> been unsuccessful. The GattManager1.RegisterService method does not
>>>> return any reply, instead I simply get this timeout exception:
>>>> Exception in thread "main" org.freedesktop.DBus$Error$
>>>> NoReply: No reply within specified time
>>>>
>>> As I understand, RegisterService DBUS method in gatt-database replies back
>>> to
>>> client only when client is fully ready. It happens when service is
>>> successfully created
>>> by gatt-database and all managed objects are successfully retrieved from
>>> client
>>> service and parsed by gdbus/client.c.
>>>
>>>> Also, all I see in the logs is the registration attempt, but no error:
>>>> Aug 11 14:42:02 raspberrypi bluetoothd[5466]:
>>>> src/gatt-database.c:manager_register_service() Registering service -
>>>> path: /com/lilandit/iventcloud/skg/service
>>>>
>>> This print only only suggests that external service is created by
>>> gatt-database
>>>
>>>> Introspection of the service (with mdbus2 tool) shows this info (which
>>>> matches the specs as far as a DBus noob like I can tell):
>>>> [METHOD] org.bluez.GattService1.GetPrimary() -> (b:arg_0)
>>>> [METHOD] org.bluez.GattService1.GetDevice() -> (o:arg_0)
>>>> [METHOD] org.bluez.GattService1.GetUUID() -> (s:arg_0)
>>>> [METHOD] org.bluez.GattService1.GetCharacteristics() -> (ao:arg_0)
>>>> [METHOD] org.bluez.GattService1.GetIncludes() -> (ao:arg_0)
>>>> [METHOD] org.freedesktop.DBus.Introspectable.Introspect() -> (s:arg_0)
>>>> [METHOD] org.freedesktop.DBus.Peer.Ping() -> ()
>>>>
>>>> The implementation of the service is incomplete (same applies to the
>>>> ObjectManager registered at "/"), however I was expecting to at least
>>>> get some feedback on registration and possibly see some of the service
>>>> methods being called at this point. Instead I get nothing.
>>>>
>>>> Any ideas what may be wrong or where I should be looking for the cause?
>>>>
>>> According to GATT API doc, client service should export ObjectManager
>>> interface
>>> on its client root path. If this is not done, then I think
>>> GetManagedObjects call from gdbus/client will fail and client ready
>>> will not be invoked and possibly DBUS timeout occurs.
>>>
>>> Is your service exporting ObjectManager interface on service root path?
>>>
>>>> Kind regards,
>>>> Edmund
>>>>
>>>> PS: I'm using BlueZ 5.32
>>>
>> I think I need to clarify that I have exported two objects. The
>> ObjectManager (path "/" with interface org.freedesktop.DBus.ObjectManager),
>> and the GattService (path "/com/lilandit/iventcloud/skg/service" with
>> interface org.bluez.GattService1). Is this OK, or should I have one object
>> that implements both interfaces?
> We expect ObjectManager to be in the path where the GattService is in in '/'.
>
>> Note that GetManagedObjects is never called (nor are any other methods I
>> implemented, each of which has a log statement right there in the first
>> line).
> Because ObjectManager interface is in a different path which
> bluetoothd has no idea of.
>
>
I am now making some progress with one class implementing both interfaces. At
last, I am receiving method calls.
Thanks!
Kind regards,
Edmund
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-12 11:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-12 8:02 Registering a GATT service via DBus Anupam Roy
2015-08-12 8:18 ` Luiz Augusto von Dentz
2015-08-12 9:16 ` Urbani, Edmund
2015-08-12 11:24 ` Luiz Augusto von Dentz
2015-08-12 11:32 ` Urbani, Edmund
-- strict thread matches above, loose matches on Subject: below --
2015-08-12 6:12 Urbani, Edmund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).