I am using some custom Linux distribution without any UI. I would like to find out the Bluez version through the command-line. How can this be done?
If you have a rough idea (or are fine with covering the last 10 years),
bluez provides tools in
bluez-uils to request the version. Unfortunately, these tools changed between version 4 and 5, so you may have to check if one of both is installed.
For BlueZ 4.0:
Since BlueZ 5.0, there is a new command-line tool
Bluez provides a shared library called libbluetooth.so. On x86_64 distros you should find this file in
/usr/lib64/, so simply do a
ls -la to find out
$ls -la /usr/lib64/libbluetooth.so lrwxrwxrwx 1 root root 22 Jan 17 12:44 /usr/lib64/libbluetooth.so -> libbluetooth.so.3.17.0
In my case, I'm using version
readelf(1) can also provide some information as well.
On my distribution (Fedora 21), you can find it in
/usr/share/doc/bluez/ChangeLog. You might try reading it with
less or simliar.
You could run the
bluetoothd -v command in the command line. It gives the bluez version installed in your target.
If you are using systemd, you can get the BlueZ version running, using
sudo systemctl status bluetooth
It will output something like this:
bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2018-07-25 13:00:52 UTC; 14min ago Docs: man:bluetoothd(8) Main PID: 471 (bluetoothd) Status: "Running" CGroup: /system.slice/bluetooth.service └─471 /usr/libexec/bluetooth/bluetoothd Jul 25 13:00:52 raspberrypi systemd: Starting Bluetooth service... Jul 25 13:00:52 raspberrypi bluetoothd: Bluetooth daemon 5.50 Jul 25 13:00:52 raspberrypi systemd: Started Bluetooth service. Jul 25 13:00:52 raspberrypi bluetoothd: Starting SDP server Jul 25 13:00:52 raspberrypi bluetoothd: Bluetooth management interface 1.14 initialized
This way you can be 100% sure that you are running the right version.