summaryrefslogtreecommitdiff
path: root/doc/mesh-api.txt
diff options
context:
space:
mode:
authorMichaƂ Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>2019-12-17 15:54:42 +0100
committerBrian Gix <brian.gix@intel.com>2019-12-18 07:46:16 -0800
commitb9a4d9410b0ea2b7c571820baa90743cbe92b78d (patch)
tree776e1d5390908d3aef8583deed18921738f49abe /doc/mesh-api.txt
parent4a1bea28b15b4ab9b9c962597162cb4070587763 (diff)
downloadbluez-b9a4d9410b0ea2b7c571820baa90743cbe92b78d.tar.gz
mesh: Fix getting managed objects from ObjectManager
D-Bus spec mandates that GetManagedObjects method of org.freedesktop.DBus.ObjectManager interface returns *children* only: https://dbus.freedesktop.org/doc/dbus-specification.html > All returned object paths are children of the object path implementing > this interface, i.e. their object paths start with the ObjectManager's > object path plus '/' Both test scripts and ELL abuse this by returning application interfaces via ObjectManager attached to the same path, but other D-Bus implementations do not, making Attach() fail because mandatory interfaces cannot be found. This patch fixes the issue by scanning hierarchy returned by GetManagedObjects for object implementing org.bluez.mesh.Application1 interface and keeping that as node's app_path.
Diffstat (limited to 'doc/mesh-api.txt')
-rw-r--r--doc/mesh-api.txt52
1 files changed, 28 insertions, 24 deletions
diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt
index 30b7452e2..ebff8492a 100644
--- a/doc/mesh-api.txt
+++ b/doc/mesh-api.txt
@@ -8,13 +8,13 @@ Interface org.bluez.mesh.Network1
Object path /org/bluez/mesh
Methods:
- void Join(object app_defined_root, array{byte}[16] uuid)
+ void Join(object app_root, array{byte}[16] uuid)
This is the first method that an application has to call to
become a provisioned node on a mesh network. The call will
initiate broadcasting of Unprovisioned Device Beacon.
- The app_defined_root parameter is a D-Bus object root path of
+ The app_root parameter is a D-Bus object root path of
the application that implements org.bluez.mesh.Application1
interface. The application represents a node where child mesh
elements have their own objects that implement
@@ -22,7 +22,7 @@ Methods:
also contains a provision agent object that implements
org.bluez.mesh.ProvisionAgent1 interface. The standard
DBus.ObjectManager interface must be available on the
- app_defined_root path.
+ app_root path.
The uuid parameter is a 16-byte array that contains Device UUID.
This UUID must be unique (at least from the daemon perspective),
@@ -39,18 +39,18 @@ Methods:
method.
object node, array{byte, array{(uint16, dict)}} configuration
- Attach(object app_defined_root, uint64 token)
+ Attach(object app_root, uint64 token)
This is the first method that an application must call to get
access to mesh node functionalities.
- The app_defined_root parameter is a D-Bus object root path of
+ The app_root parameter is a D-Bus object root path of
the application that implements org.bluez.mesh.Application1
interface. The application represents a node where child mesh
elements have their own objects that implement
org.bluez.mesh.Element1 interface. The standard
DBus.ObjectManager interface must be available on the
- app_defined_root path.
+ app_root path.
The token parameter is a 64-bit number that has been assigned to
the application when it first got provisioned/joined mesh
@@ -701,30 +701,34 @@ Mesh Application Hierarchy
==========================
Service unique name
Interface org.bluez.mesh.Application1
-Object path <app_defined_root>
+Object path <app_root>
An application is a collection of elements that host SIG defined and vendor
specific models. It is expected that an application implements
-org.freedesktop.DBus.ObjectManager interface.
+org.freedesktop.DBus.ObjectManager interface at app_root path.
An example mesh application hierarchy may look like this:
- -> /com/example
- | - org.freedesktop.DBus.ObjectManager
- | - org.bluez.mesh.Application1
- | - org.bluez.mesh.Attention1 (optional)
- | - org.bluez.mesh.Provisioner1 (optional,Provisioner)
- |
- -> /com/example/agent
- | | - org.bluez.mesh.ProvisionAgent1
- |
- -> /com/example/ele00
- | | - org.bluez.mesh.Element1
- -> /com/example/ele01
- | | - org.bluez.mesh.Element1
- ...
- -> /com/example/elexx
- | | - org.bluez.mesh.Element1
+-> /com/example
+ | - org.freedesktop.DBus.ObjectManager
+ |
+ -> /com/example/application
+ | - org.bluez.mesh.Application1
+ | - org.bluez.mesh.Attention1 (optional)
+ | - org.bluez.mesh.Provisioner1 (optional,Provisioner)
+ |
+ -> /com/example/agent
+ | - org.bluez.mesh.ProvisionAgent1
+ |
+ -> /com/example/ele00
+ | - org.bluez.mesh.Element1
+ |
+ -> /com/example/ele01
+ | - org.bluez.mesh.Element1
+ |
+ ...
+ -> /com/example/elexx
+ - org.bluez.mesh.Element1
Methods:
void JoinComplete(uint64 token)