How to find out Bluez version from command line?

19,015

Solution 1

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:

bluetoothd --version

Since BlueZ 5.0, there is a new command-line tool bluetoothctl:

bluetoothctl --version

Solution 2

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 3.17.0

readelf(1) can also provide some information as well.

Solution 3

On my distribution (Fedora 21), you can find it in /usr/share/doc/bluez/ChangeLog. You might try reading it with less or simliar.

Solution 4

You could run the bluetoothd -v command in the command line. It gives the bluez version installed in your target.

Solution 5

If you are using systemd, you can get the BlueZ version running, using systemctl:

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[1]: Starting Bluetooth service...
Jul 25 13:00:52 raspberrypi bluetoothd[471]: Bluetooth daemon 5.50
Jul 25 13:00:52 raspberrypi systemd[1]: Started Bluetooth service.
Jul 25 13:00:52 raspberrypi bluetoothd[471]: Starting SDP server
Jul 25 13:00:52 raspberrypi bluetoothd[471]: Bluetooth management interface 1.14 initialized

This way you can be 100% sure that you are running the right version.

Share:
19,015

Related videos on Youtube

user768421
Author by

user768421

Updated on September 18, 2022

Comments

  • user768421
    user768421 over 1 year

    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?

  • Marcus
    Marcus about 7 years
    I doubt this. Going back the history on Arch or bluez.org, a Bluez version 3.17 would be more than 10 years old.