Making a Bluetooth GATT server on a Linux machine is done using BlueZ. The preferred way to use modern (5.50) BlueZ is through the dbus API.
The documentation on this topic states:
GATT local and remote services share the same high-level D-Bus API. Local refers to GATT based service exported by a BlueZ plugin or an external application. Remote refers to GATT services exported by the peer.
I am interpreting this as:
Both local services (Linux machine is the server, other devices connect to it via Bluetooth) and remote services (Linux machine is the client, it connects to other devices via Bluetooth) are represented on dbus
That sets the base assumption for the question.
The bluez source code provides an example-gatt-server. An example you can execute an it will just work and turn your Linux machine in a GATT server.
In that example an arbitrarily named dbus object is referenced. It's name is
From the documentation I would expect then that once the
./example-gatt-server is run successfully there should be a
That is not the case:
~$ busctl tree org.bluez └─/org └─/org/bluez └─/org/bluez/hci0
I am confirming with an external device that the Linux machine is acting as the GATT server, but
/org/bluez/example/service isn't listed.
/org/bluez/example/service found as an object under