Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
From: Barry Byford <31baz66@gmail.com>
To: Alan Martinovic <alan.martinovic@senic.com>
Cc: Bluez mailing list <linux-bluetooth@vger.kernel.org>
Subject: Re: Locating /org/bluez/example/service from example-gatt-server
Date: Mon, 9 Sep 2019 15:07:41 +0100
Message-ID: <CAAu3APYu5rV109AnwNzLXOPLtNQkY8W9wMv_Yrev8g4b8o__5g@mail.gmail.com> (raw)
In-Reply-To: <CAOT_U5aHJxPDZe5Pb6B-YuKV7nrKCWTh8+JZs9hJuDQrsaw=yQ@mail.gmail.com>

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 <alan.martinovic@senic.com> 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
> <alan.martinovic@senic.com> 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

      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOT_U5bDZwYLYsny9OpWs3HjQFLqYK2j3o3g2koKX_CwGUtMbw@mail.gmail.com>
     [not found] ` <CAOT_U5a-qBMnS0uaGx=O7Av_a0uVDWUaPxZb5HFbLijd+OQ6pA@mail.gmail.com>
     [not found]   ` <CAOT_U5azR21Fu5a9OQ5grRW=ztmT273iba4+nHO03hoZyq-rew@mail.gmail.com>
2019-08-29 16:37     ` Alan Martinovic
2019-09-08 16:44       ` Alan Martinovic
2019-09-09 14:07         ` Barry Byford [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAu3APYu5rV109AnwNzLXOPLtNQkY8W9wMv_Yrev8g4b8o__5g@mail.gmail.com \
    --to=31baz66@gmail.com \
    --cc=alan.martinovic@senic.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox