I recently installed Linux (Debian) as my base operating system on my Lenovo Thinkpad T470 laptop, but in the process I ran into certain drawbacks, my Logitech k380 wireless keyboard did not connect correctly through Bluetooth, for this I looked and I could find some solutions .
I’m going to tell you how to solve it.
1 – Make sure your keyboard is not connected to another device on the same channel.
2 – Have your system updated. (in my case Debian )
sudo apt-get update
3 – Check that the bluetoothctl module is installed
if no message like the one above appears, we must install it
sudo apt-get install bluez bluetooth blueman
4 – Check the bluetooth status
sudo /etc/init.d/bluetooth status -l
if the service is stopped
sudo systemctl start bluetooth
sudo service bluetooth start
5 – Start bluetoothclt
6 – Scan Bluetooth devices
7 – Trust the keyboard device using the mac address format example 30:3F:3F:3F:3F:3F
8 – Pair with the new trust device using the mac address format example 30:3F:3F:3F:3F:3F and enter the pairing code that will appear in the console and at the end press enter
9 – Connect with the new paired device using the mac address format example 30:3F:3F:3F:3F:3F
The [bluetooth] identifier will change for the keyboard or device name.
That’s all, you have successfully connected your bluetooth device and you can also do it with other devices.
Some users have had problems with the function keys of the k380 keyboard, here is a link that explains how to solve it.. https://github.com/jergusg/k380-function-keys-conf