linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathaniel McCallum <npmccallum@redhat.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: GATT service DBus interface violates DBus spec
Date: Fri, 31 Jul 2015 13:18:58 -0400 (EDT)	[thread overview]
Message-ID: <1539455180.3160545.1438363138455.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1436456267.26457.24.camel@redhat.com>

So it appears that our initial analysis was incorrect. In fact, all the dbus libraries behave the same. However, the Bluez GATT interface (and perhaps others) expects ObjectManager to behave incorrectly. Similarly, the Bluez test code contains a bug in its ObjectManager implementation. The offending line is here: http://git.kernel.org/cgit/bluetooth/bluez.git/tree/test/example-gatt-server#n91

ObjectManager. GetManagedObjects() MUST NOT return itself in the set of returned children. The GATT interface needs to be updated to match this expectation.

----- Original Message -----
> The GATT service DBus interface currently requires that services
> implement the following interfaces:
> - org.freedesktop.DBus.ObjectManager
> - org.freedesktop.DBus.Properties
> - org.bluez.GattService1
> 
> An unwritten expectation is that the ObjectManager's GetManagedObjects
> method should include the object itself in its return value. However,
> the spec for GetManagedObjects states otherwise.
> 
> This currently works only because gdbus violates the spec.[1] Until
> today, systemd's sd-bus library was compliant with the spec and thus
> behaved differently from gdbus, making it impossible to use sd-bus with
> bluez.[2]
> 
> I agree with Lennart's proposal that the best course of action is to
> fix the spec, not the implementations. This would mean that no change
> is needed for bluez (other than perhaps some documentation). However, I
> wanted to raise awareness of this problem in case:
> 1. there is strong opposition to this proposal
> 2. others run into the same problem I did
> 
> [1] https://bugs.freedesktop.org/show_bug.cgi?id=91283
> [2] https://github.com/systemd/systemd/commit/92d16a53e385781a55d9231d9
> f8f89c1747ab0e4
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2015-07-31 17:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-09 15:37 GATT service DBus interface violates DBus spec Nathaniel McCallum
2015-07-31 17:18 ` Nathaniel McCallum [this message]
2015-07-31 17:30   ` Adam Moore
2015-07-31 17:47     ` Othman, Ossama
2015-07-31 18:00       ` Adam Moore
2015-07-31 19:45         ` Othman, Ossama
2015-07-31 19:50           ` Adam Moore
2015-08-02  8:57             ` Luiz Augusto von Dentz
2015-08-10 22:55               ` Adam Moore

Reply instructions:

You may reply publicly 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=1539455180.3160545.1438363138455.JavaMail.zimbra@redhat.com \
    --to=npmccallum@redhat.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).