0

I have the situation:

  • Raspberry Pi Zero 2 W setup with WIFI connection but no keyboard attached as no micro USB hub avaiable
  • I can SSH into my Raspberry PI Zero from another machine
  • I have a bluetooth keyboard, a logitec Keys to Go, that I want to pair with my Raspberry Pi Zero

I SSHed into my Raspberry Pi and tried pairing via bluetoothctl:

zero@zero:~ $ bluetoothctl scan on
Discovery started
[CHG] Controller B8:27:EB:48:2D:0F Discovering: yes
[NEW] Device F4:73:35:99:46:2D F4-73-35-99-46-2D
[CHG] Device F4:73:35:99:46:2D LegacyPairing: no
[CHG] Device F4:73:35:99:46:2D Name: Keys-To-Go
[CHG] Device F4:73:35:99:46:2D Alias: Keys-To-Go
[CHG] Device F4:73:35:99:46:2D LegacyPairing: yes
[CHG] Device F4:73:35:99:46:2D RSSI: -76
[CHG] Device F4:73:35:99:46:2D RSSI: -65
^Czero@zero:~ $ bluetoothctl pair F4:73:35:99:46:2D
Attempting to pair with F4:73:35:99:46:2D
[CHG] Device F4:73:35:99:46:2D Connected: yes

Yet it fails with the error:

Failed to pair: org.bluez.Error.AuthenticationFailed

I know that my keyboard required the input of passkey, a number, that would normally be displayed on the device that one tries to pair it with, yet no such number is shown.

1

1 Answer 1

0

I followed solution shown by this answer from unix stackexchange.

zero@zero:~ $ sudo bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:48:2D:0F Discovering: yes
[NEW] Device F4:73:35:99:46:2D Keys-To-Go
[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.InProgress
[bluetooth]# scan off
[CHG] Device F4:73:35:99:46:2D RSSI is nil
[CHG] Controller B8:27:EB:48:2D:0F Discovering: no
Discovery stopped
[bluetooth]# trust  F4:73:35:99:46:2D
[CHG] Device F4:73:35:99:46:2D Trusted: yes
Changing F4:73:35:99:46:2D trust succeeded
[bluetooth]# pair  F4:73:35:99:46:2D
Attempting to pair with F4:73:35:99:46:2D
[CHG] Device F4:73:35:99:46:2D Connected: yes
[agent] Passkey: 338244
[CHG] Device F4:73:35:99:46:2D Bonded: yes
[CHG] Device F4:73:35:99:46:2D Modalias: usb:v046DpB338d3603
[CHG] Device F4:73:35:99:46:2D UUIDs: 00001000-0000-1000-8000-00805f9b34fb
[CHG] Device F4:73:35:99:46:2D UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device F4:73:35:99:46:2D UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device F4:73:35:99:46:2D ServicesResolved: yes
[CHG] Device F4:73:35:99:46:2D Paired: yes
Pairing successful
[CHG] Device F4:73:35:99:46:2D WakeAllowed: yes
[CHG] Device F4:73:35:99:46:2D ServicesResolved: no
[CHG] Device F4:73:35:99:46:2D Connected: no
[CHG] Device F4:73:35:99:46:2D Class: 0x00000540
[CHG] Device F4:73:35:99:46:2D Icon: input-keyboard
[CHG] Device F4:73:35:99:46:2D Connected: yes

Now I can use the Bluetooth keyboard on my raspberry pi.

Not the answer you're looking for? Browse other questions tagged or ask your own question.