org.bluez.GattManager(5)
π NAME π
org.bluez.GattManager β BlueZ D-Bus GattManager API documentation.
okay bestie, we're literally in the org.bluez.GattManager(5) manual page and it's giving βD-Bus GATT manager realness.β π
β¨ DESCRIPTION β¨
So the GATT Manager is the thing that lets external applications register GATT services and profiles. No cap. Registering a profile lets applications subscribe to remote/client services. Registering a service lets applications publish a local/server GATT service, which then becomes available to remote devices. π¦
A GATT service is represented by a D-Bus object hierarchy where the root node corresponds to a service and the child nodes represent characteristics and descriptors that belong to that service. Every node must implement one of org.bluez.GattService(5), org.bluez.GattCharacteristic(5) or org.bluez.GattDescriptor(5) interfaces, based on the attribute it represents. Each node must also implement the standard D-Bus Properties interface to expose their properties. These objects collectively represent a GATT service definition. π
To make service registration simple, bluetoothd(8) requires that all objects that belong to a GATT service be grouped under a D-Bus Object Manager that solely manages the objects of that service. Hence, the standard DBus.ObjectManager interface must be available on the root service path. Here's an example application hierarchy containing two separate GATT services, bestie:
-> /com/example
| - org.freedesktop.DBus.ObjectManager
|
-> /com/example/service0
| | - org.freedesktop.DBus.Properties
| | - org.bluez.GattService1
| |
| -> /com/example/service0/char0
| | - org.freedesktop.DBus.Properties
| | - org.bluez.GattCharacteristic1
| |
| -> /com/example/service0/char1
| | - org.freedesktop.DBus.Properties
| | - org.bluez.GattCharacteristic1
| |
| -> /com/example/service0/char1/desc0
| - org.freedesktop.DBus.Properties
| - org.bluez.GattDescriptor1
|
-> /com/example/service1
| - org.freedesktop.DBus.Properties
| - org.bluez.GattService1
|
-> /com/example/service1/char0
- org.freedesktop.DBus.Properties
- org.bluez.GattCharacteristic1
When a service is registered, bluetoothd(8) will automatically obtain information about all objects using the service's Object Manager.
Once a service has been registered, the objects of a service should not be removed. Ifbluetoothd(8)receives anInterfacesRemovedsignal from a service's Object Manager, it will immediately unregister the service. Similarly, if the application disconnects from the bus, all of its registered services will be automatically unregistered.InterfacesAddedsignals will be ignored.
π INTERFACE π
- Service β
org.bluez - Interface β
org.bluez.GattManager1 - Object path β
[variable prefix]/{hci0,hci1,...} - Used by β
bluetoothctl-gatt(1)
π οΈ METHODS π οΈ
void RegisterApplication(object application, dict options)
Registers a local GATT services hierarchy as described above (GATT Server) and/or GATT profiles (GATT Client). π
The application object path together with the D-Bus system bus connection ID define the identification of the application registering a GATT based service (org.bluez.GattService(5)) and/or profile (org.bluez.GattProfile(5)).
Possible errors, bestie:
org.bluez.Error.InvalidArgumentsorg.bluez.Error.AlreadyExists
Examples:
bluetoothctl
> gatt.register-application [UUID ...]
void UnregisterApplication(object application)
This unregisters the services and/or profiles that have been previously registered using RegisterApplication(). The object path parameter must match the same value that has been used on registration. π₯
Possible errors:
org.bluez.Error.InvalidArgumentsorg.bluez.Error.DoesNotExist
Examples:
bluetoothctl
> gatt.unregister-application
mwah π β this page is from BlueZ, dated October 2023, and it's literally org.bluez.GattManager(5). byeee, bestie π«Ά
π¦ where this page comes from
- arch rolling: bluez-utils 5.87-2 Β· GPL-2.0-only
- nixpkgs unstable: bluez 5.87
- ubuntu stonking: bluez 5.87-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms