How to find out the Bluetooth version for the adapter and peripherals in Linux

Bluetooth management in Linux

Linux uses utilities to control Bluetooth from a package called bluez in Debian and derivatives, and bluez-utils in Arch Linux and derivatives. But some time ago, a number of Bluetooth management tools were declared deprecated, although no alternative was proposed to them. Different distributions solve this problem in different ways. On Debian and derivatives, the bluez package is compiled with a flag to enable deprecated tools. And on Arch Linux and derivatives the bluez-utils-compat package is mantained by the community in the AUR, which is also compiled with a flag to enable legacy tools.

For the purposes of this article, you will need the hciconfig and hcitool tools, which are “deprecated”.

On Debian and derivatives, to install all tools, including those deprecated, for managing Bluetooth, run the command:

sudo apt install bluez

On Arch Linux and derivatives, start by installing pikaur as shown in the “Automatic installation and update of AUR packages” article and then run the following commands:

sudo pacman -R bluez-hciconfig # if you run BlackArch
pikaur -S bluez-utils-compat

You will see the following warning:

looking for conflicting AUR packages...
:: bluez-utils-compat and bluez-utils are in conflict. Remove bluez-utils? [y/N] y

you need to agree to replace the bluez-utils package with bluez-utils-compat, that is, enter “y”.

Further steps are identical in all distributions.

How to find out the Bluetooth version of my computer

Run the command

hciconfig -a

Notice the line containing the “HCI Version”:

This line contains the Bluetooth version number, in the screenshot it is 5.1.

The current version is Bluetooth 4.* and later. At the time of writing, the most recent Bluetooth version is 5.2. The 5.3 standard has already been developed, but devices with its support are not yet released.

If on your distribution you encounter an error that the hciconfig command was not found, then use the following command:

btmgmt info | awk 'BEGIN{split("1.0b 1.1 1.2 2.0 2.1 3.0 4.0 4.1 4.2 5.0 5.1 5.2 5.3",i," ")}$1=="addr"{print $2"\tBluetooth: V"i[$4+1]}'

The previous command displays the MAC address of your Bluetooth adapter and its version. If you only need the protocol version that your computer's Bluetooth supports, then use the command:

btmgmt info | awk 'BEGIN{split("1.0b 1.1 1.2 2.0 2.1 3.0 4.0 4.1 4.2 5.0 5.1 5.2 5.3",i," ")}$1=="addr"{print "Bluetooth: V"i[$4+1]}'

How to find out the Bluetooth version of the connected devices

Start by listing the available Bluetooth connections and MAC addresses of the devices:

bluetoothctl devices

Then run a command like:

sudo hcitool info MAC_ADDRESS

Suppose I want to know the Bluetooth version that “Alexey's S21 Ultra” has with MAC address AC:6C:90:6E:53:EE, then the command is as follows:

sudo hcitool info AC:6C:90:6E:53:EE

Pay attention to the line “LMP Version:”, it contains the Bluetooth version number, in this case it is 5.2.

If the hcitool command didn't work and you get an error

Requesting information ...
Can't create connection: Input/output error

then before executing this command, first pair the Bluetooth device whose version you want to check.

Leave Your Observation

Your email address will not be published.