Linux: how to fix the Logitech k380 keyboard Bluetooth connection problem.

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

bluetoothctl -v

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
or
sudo service bluetooth start

5 –  Start bluetoothclt

sudo bluetoothctl

6 – Scan Bluetooth devices

scan on

7 – Trust the keyboard device using the mac address format example 30:3F:3F:3F:3F:3F

trust address

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

pair address

9 – Connect with the new paired device using the mac address format example 30:3F:3F:3F:3F:3F

connect address

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.

./Another tip!

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

./Related Posts

https://programmersought.com/article/53604553743/

https://www.reddit.com/r/linuxhardware/comments/fxdhhi/bluetooth_keyboard_logitech_k380_pairs_connects/

https://unix.stackexchange.com/questions/590221/pairing-logitech-k380-in-ubuntu-20-04