If you have the error br-connection-profile-unavailable in your computer each time you try to connect with a bluetooth device that you had already paired.
The solution I have found is to put my device in pairing mode each time I poweron the computer, and connect it manually or by command line with bluetoothctl
For it I have created this script.
- Download the script in
~/.local/bin
git clone "https://github.com/alberto-765/Connect-Bluetooth-Device.git"
cd Connect-Bluetooth-Device
- Replace the MAC with you devices MAC
nano connect_keyboard.sh
- Move script to local bin folder to be able to execute it from the terminal
mv connect_keyboard.sh ~/.local/bin
- Add the script to autostart or create a one with you DE tool, as me with KDE and autostart
mv connect_keyboard.sh.desktop ~/.config/autostart/
- Create log file folder
mkdir $HOME/.local/state/connect_keyboard
You have to put your device in pairing mode each time you are going to power on you computer. At this way the script are goint to:
- Check if bluetooth is activated, if not it will exit.
- Check if the device as been paired correctly before:
- If yes: it will try to connect with the device
- If not: it will remove the device for make a correct pair again, will scan bluetooth netwrok for 5 seconds, and will try to pair, connect and trus the device. The next times it will only make the pass 1.
The script won't active the bluetooth automatically, in my system I have configured to restore the bluetooth previous data. So if it was, it will be activated, when the system powered on again. I am using KDE.
You can add this to the beginning of the script
#!/bin/bash
bluetoothctl power on
- How see my devices MAC?
- By the GUI of your distribution
- Command line, you need to scan all devices before:
bluetoothctl
scan on
devices # You will see your devices MAC and name
info <MAC> # More information about the name and aliases