1ORG.BLUEZ.GATTMANAGER(5) Linux System Administration ORG.BLUEZ.GATTMANAGER(5)
2
3
4
6 org.bluez.GattManager - BlueZ D-Bus GattManager API documentation
7
9 GATT Manager allows external applications to register GATT services and
10 profiles.
11
12 Registering a profile allows applications to subscribe to remote/client
13 services.
14
15 Registering a service allows applications to publish a local/server
16 GATT service, which then becomes available to remote devices. A GATT
17 service is represented by a D-Bus object hierarchy where the root node
18 corresponds to a service and the child nodes represent characteristics
19 and descriptors that belong to that service. Each node must implement
20 one of org.bluez.GattService(5), org.bluez.GattCharacteristic(5) or
21 org.bluez.GattDescriptor(5) interfaces, based on the attribute it rep‐
22 resents. Each node must also implement the standard D-Bus Properties
23 interface to expose their properties. These objects collectively repre‐
24 sent a GATT service definition.
25
26 To make service registration simple, bluetoothd(8) requires that all
27 objects that belong to a GATT service be grouped under a D-Bus Object
28 Manager that solely manages the objects of that service. Hence, the
29 standard DBus.ObjectManager interface must be available on the root
30 service path. An example application hierarchy containing two separate
31 GATT services may look like this:
32
33 -> /com/example
34 | - org.freedesktop.DBus.ObjectManager
35 |
36 -> /com/example/service0
37 | | - org.freedesktop.DBus.Properties
38 | | - org.bluez.GattService1
39 | |
40 | -> /com/example/service0/char0
41 | | - org.freedesktop.DBus.Properties
42 | | - org.bluez.GattCharacteristic1
43 | |
44 | -> /com/example/service0/char1
45 | | - org.freedesktop.DBus.Properties
46 | | - org.bluez.GattCharacteristic1
47 | |
48 | -> /com/example/service0/char1/desc0
49 | - org.freedesktop.DBus.Properties
50 | - org.bluez.GattDescriptor1
51 |
52 -> /com/example/service1
53 | - org.freedesktop.DBus.Properties
54 | - org.bluez.GattService1
55 |
56 -> /com/example/service1/char0
57 - org.freedesktop.DBus.Properties
58 - org.bluez.GattCharacteristic1
59
60 When a service is registered, bluetoothd(8) will automatically obtain
61 information about all objects using the service's Object Manager. Once
62 a service has been registered, the objects of a service should not be
63 removed. If bluetoothd(8) receives an InterfacesRemoved signal from a
64 service's Object Manager, it will immediately unregister the service.
65 Similarly, if the application disconnects from the bus, all of its reg‐
66 istered services will be automatically unregistered. InterfacesAdded
67 signals will be ignored.
68
70 Service
71 org.bluez
72
73 Interface
74 org.bluez.GattManager1
75
76 Object path
77 [variable prefix]/{hci0,hci1,...}
78
79 Methods
80 void RegisterApplication(object application, dict options)
81 Registers a local GATT services hierarchy as described above (GATT
82 Server) and/or GATT profiles (GATT Client).
83
84 The application object path together with the D-Bus system bus con‐
85 nection ID define the identification of the application registering
86 a GATT based service (org.bluez.GattService(5)) and/or profile
87 (org.bluez.GattProfile(5)).
88
89 Possible errors:
90
91 org.bluez.Error.InvalidArguments
92
93 org.bluez.Error.AlreadyExists
94
95 void UnregisterApplication(object application)
96 This unregisters the services and/or profiles that has been previ‐
97 ously registered using RegisterApplication(). The object path param‐
98 eter must match the same value that has been used on registration.
99
100 Possible errors:
101
102 org.bluez.Error.InvalidArguments
103
104 org.bluez.Error.DoesNotExist
105
106
107
108
109BlueZ October 2023 ORG.BLUEZ.GATTMANAGER(5)