Exposing the bluetoothd version over D-Bus
Hi Luiz,
Quick question before I write any code: would you take a patch that exposes the version of the running bluetoothd over D-Bus?
In SimpleBLE we use introspection to check which interfaces and properties are available, and that works well for new APIs. Where it falls short is behaviour changes behind the same API. For example, since 5.88 Discovering no longer gets stuck after a failed StopDiscovery, but a client can't tell whether the daemon it's talking to has that fix. Knowing the version would let us apply workarounds only where they're needed, and it would help with bug reports too. BlueR asked for the same thing in
https://github.com/bluez/bluez/issues/619.
Running bluetoothd --version isn't reliable from a client, since the binary on disk might not be the one running, or might not be reachable from a container. The version in Adapter1.Modalias also changes or goes away when DeviceID is set in main.conf.
I know it would only help from the release it lands in, but I think it's still worth having going forward.
If you're open to it, where would you like it? Adapter1.Version is already the controller version, and an adapter property wouldn't be there when no adapter is present, so I was thinking of a read-only property on a small new interface at /org/bluez. Happy to put it wherever you prefer, with docs and a functional test.
Thanks,
Kevin