Cannot pair Logitech K380 bluetooth keyboard on Pi4 with 20.04

I cannot pair a Logitech K380 keyboard to a Raspberry Pi 4B with 4GB RAM in Ubuntu MATE 20.04.

I can "connect" but I cannot "pair". I have paired successfully with this hardware combination using Raspberry Pi OS. I would like for the pairing to persist through a restart so that I do not have to manually reconnect/re-pair after a reboot or when waking the machine from sleep.

The problem Is that bluetooth does not display a dialog that specifies a PIN code for pairing.

Does anyone have ideas on how to resolve this issue?

Hi :slight_smile:

Did you try to click setup new device and move ahead the configuration ?

image

Hi,
I got the same problem (Pi4 20.04 K380) as you.
Try to install lubuntu-desktop and pairing your K380 under LXDE!

I was strugling with the same issue.. and found out someone who know how to be able to "see" the PIN code.... using command line....
It'S now working for me .. i have Ubuuntu Mate on a Raspberry Pi4 - 8 GB

1 - Open Terminal
2 - install bluetoothctl if not there (but in my Ubuuntu mate 20.04... it was there)
3 - bluetoothctl
then # start to appear
agent on
scan on *** note the MAC adress of the keyboard. You will need to activate the bluetooth pairing on the keyboard *** let's assume the MAC of the keyboard is : ab:cd:ef:12:34:56 .. Stop the bluetooth pairing on the keyboard otherwise, the following option wont work
scan off
trust ab:cd:ef:12:34:56
pair ab:cd:ef:12:34:56
** start bluetooth pairing **
when pin appear, type it on the numeric keypad of the keyboard and hit "enter".

enjoy !

1 Like

Hi, same but with laptop. I was usually able to set the keyboard back, but now it just fails to do so. This:
[bluetooth]# agent on
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 38:59:F9:58:FE:E0 Discovering: yes
[CHG] Device 40:2F:86:42:81:FC RSSI: -87
[bluetooth]# scan off
[CHG] Device 40:2F:86:42:81:FC RSSI is nil
[CHG] Controller 38:59:F9:58:FE:E0 Discovering: no
Discovery stopped
[bluetooth]# trust 38:59:F9:58:FE:E0
Device 38:59:F9:58:FE:E0 not available
[bluetooth]# connect 38:59:F9:58:FE:E0
Device 38:59:F9:58:FE:E0 not available

Any ideas?

Your initial solution set me down this path and I found the cmd agent NoInputNoOutput

I tested the following and it displayed the pin on command line.
after that just keyed in the pin on the keyboard hit enter and it paired.
Hope this helps!

[bluetooth]# agent on
Agent registered

[bluetooth]# agent NoInputNoOutput
Agent is already registered

[bluetooth]# scan on
Discovery started
[CHG] Controller 38:59:F9:58:FE:E0 Discovering: yes

[bluetooth]# pair 38:59:F9:58:FE:E0
Attempting to pair with 38:59:F9:58:FE:E0
[CHG] Device 38:59:F9:58:FE:E0 Connected: yes
[agent] Passkey: 098932