2019-08-29 16:39:48

by Alan Martinovic

[permalink] [raw]
Subject: Locating /org/bluez/example/service from example-gatt-server

Hi,
in the example-gatt-server which is provided in the
sources there is a reference to the dbus object
`/org/bluez/example/service`.

When that example gets run successfully under what
"unique connection name" does that object end up living?

It doesn't exist under org.bluez

~$ busctl --list tree org.bluez
/
/org
/org/bluez
/org/bluez/hci0

Be Well,
Alan


2019-09-09 13:08:39

by Alan Martinovic

[permalink] [raw]
Subject: Re: Locating /org/bluez/example/service from example-gatt-server

Hey,
looks like no activity here on my question,
so in case someone is more into StackOverflow,
I have a bounty on this question
https://unix.stackexchange.com/questions/538107/locating-the-object-path-for-a-gatt-server-in-bluez

Be Well,
Alan


On Thu, Aug 29, 2019 at 6:37 PM Alan Martinovic
<[email protected]> wrote:
>
> Hi,
> in the example-gatt-server which is provided in the
> sources there is a reference to the dbus object
> `/org/bluez/example/service`.
>
> When that example gets run successfully under what
> "unique connection name" does that object end up living?
>
> It doesn't exist under org.bluez
>
> ~$ busctl --list tree org.bluez
> /
> /org
> /org/bluez
> /org/bluez/hci0
>
> Be Well,
> Alan

2019-09-10 08:10:37

by Barry Byford

[permalink] [raw]
Subject: Re: Locating /org/bluez/example/service from example-gatt-server

Hi Alan,

If a do a "busctl list" before and after starting the
"example-gatt-server" I can see that there is a new service started.
The way the example is coded it doesn't get given a nice service name
but I can see it is called (in my case) ":1.20"

I can now see the tree of services created.

$ busctl tree ":1.20"
└─/org
└─/org/bluez
└─/org/bluez/example
├─/org/bluez/example/service0
│ ├─/org/bluez/example/service0/char0
│ ├─/org/bluez/example/service0/char1
│ └─/org/bluez/example/service0/char2
├─/org/bluez/example/service1
│ └─/org/bluez/example/service1/char0
└─/org/bluez/example/service2
├─/org/bluez/example/service2/char0
│ ├─/org/bluez/example/service2/char0/desc0
│ └─/org/bluez/example/service2/char0/desc1
├─/org/bluez/example/service2/char1
│ ├─/org/bluez/example/service2/char1/desc2
│ └─/org/bluez/example/service2/char1/desc3
└─/org/bluez/example/service2/char2
├─/org/bluez/example/service2/char2/desc2
└─/org/bluez/example/service2/char2/desc3

While the object path is the same as "org.bluez", they are stored
under a different service. So if I do "org.bluez" I can see they are
not there:
$ busctl tree "org.bluez"
└─/org
└─/org/bluez
├─/org/bluez/hci0
│ └─/org/bluez/hci0/dev_E3_AC_D2_F8_EB_B9
└─/org/bluez/test

Hope that helps.

Regards,
Barry



On Mon, 9 Sep 2019 at 14:09, Alan Martinovic <[email protected]> wrote:
>
> Hey,
> looks like no activity here on my question,
> so in case someone is more into StackOverflow,
> I have a bounty on this question
> https://unix.stackexchange.com/questions/538107/locating-the-object-path-for-a-gatt-server-in-bluez
>
> Be Well,
> Alan
>
>
> On Thu, Aug 29, 2019 at 6:37 PM Alan Martinovic
> <[email protected]> wrote:
> >
> > Hi,
> > in the example-gatt-server which is provided in the
> > sources there is a reference to the dbus object
> > `/org/bluez/example/service`.
> >
> > When that example gets run successfully under what
> > "unique connection name" does that object end up living?
> >
> > It doesn't exist under org.bluez
> >
> > ~$ busctl --list tree org.bluez
> > /
> > /org
> > /org/bluez
> > /org/bluez/hci0
> >
> > Be Well,
> > Alan