I connected to my new K380 without the pairing process using bluetooth manager. After that, using for some time, I notice that the keyboard was not answering anymore, and I've always to reconnect it to have it working.

I'd like to know if there is a commandline way to get it paired, because the bluetooth manager says that there is a "Pairing problem with the device".

I'm using Ubuntu 20.04 with a Dell Latitude e5450 and Intel Wireless 7265 (rev 59)

  • 1
    This worked for me on Ubuntu Mate + Logitech K380 keyboard. The GUI bluetooth tools on Ubuntu Mate didn't show me the pairing code from the keyboard despite repeated pairing attempts. Doing it "manually" via bluetoothctl finally worked. Now the keyboard re-connects automatically. Thanks for your hard work.
    – dgo.a
    Jun 25, 2021 at 17:35

1 Answer 1


The author of the question provided the following solution.

Install bluetoothctl if it is not already installed. In Ubuntu 20.04 it comes with the default install.

In terminal, run the command bluetoothctl:

$ bluetoothctl
Agent registered
[MX Vertical]# agent on
Agent is already registered

Start the scan:

[MX Vertical]# scan on
Discovery started
[CHG] Controller DC:53:60:0E:0A:C8 Discovering: yes
[CHG] Device 34:88:5D:EF:19:51 RSSI: -49
[CHG] Device 34:88:5D:EF:19:51 Class: 0x00002540
[CHG] Device 34:88:5D:EF:19:51 Icon: input-keyboard
[CHG] Device 88:0F:10:87:00:F1 RSSI: -87

In this output, the MAC address of the keyboard is this one: 34:88:5D:EF:19:51. Copy it! Then stop the scan:

[MX Vertical]# scan off
[CHG] Device 88:0F:10:87:00:F1 RSSI is nil
[CHG] Device 34:88:5D:EF:19:51 RSSI is nil
[CHG] Controller DC:53:60:0E:0A:C8 Discovering: no
Discovery stopped

Trust the device with:

[MX Vertical]# trust 34:88:5D:EF:19:51
[CHG] Device 34:88:5D:EF:19:51 Trusted: yes
Changing 34:88:5D:EF:19:51 trust succeeded

And pair it. Now the passkey shown in terminal (300892 in this case) must be typed in keyboard, and after that an Enter should be pressed. It'll looks like this:

[MX Vertical]# pair 34:88:5D:EF:19:51
Attempting to pair with 34:88:5D:EF:19:51
[CHG] Device 34:88:5D:EF:19:51 Connected: yes
[agent] Passkey: 300892
[agent] Passkey:  00892
[agent] Passkey:   0892
[agent] Passkey:    892
[agent] Passkey:     92
[agent] Passkey:      2
[agent] Passkey:         

Hit Enter now.

[CHG] Device 34:88:5D:EF:19:51 Modalias: usb:v046DpB342d4201
[CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001000-0000-1000-8000-00805f9b34fb
[CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 34:88:5D:EF:19:51 ServicesResolved: yes
[CHG] Device 34:88:5D:EF:19:51 Paired: yes
Pairing successful
[CHG] Device 34:88:5D:EF:19:51 ServicesResolved: no
[CHG] Device 34:88:5D:EF:19:51 Connected: no
[MX Vertical]# connect 34:88:5D:EF:19:51
Attempting to connect to 34:88:5D:EF:19:51
[CHG] Device 34:88:5D:EF:19:51 Connected: yes
Connection successful
[CHG] Device 34:88:5D:EF:19:51 ServicesResolved: yes

And finally it's working!

  • 2
    This method works. Some comments though. My laptop wasn't properly discovering the K380 keyboard until I made my laptop's bluetooth discoverable. I did this via the Bluetooth applet under "Adapters". In the "Attempting to pair" step, I had to hold the F1 (Blueooth 1) key for three seconds until it starts rapidly blinking. After that I could execute the "pair" command and type the security code on the keyboard. Aug 7, 2021 at 7:39
  • For me, "scan on" is taking a lot of time, is that normal? Also, the list doesn't show the keyboard
    – Ashwani
    Nov 9, 2023 at 7:13
  • I was about to give up. It's a bit funky and took a couple of tries but it ended up working with the answer's instructions!
    – quimnuss
    Dec 23, 2023 at 14:01
  • sudo apt install bluetoothctl gives me Unable to locate package bluetoothctl
    – ema
    Jan 18 at 19:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .