LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Simple Bluetooth Keyboard How-To (Logitech K810 or others) (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/simple-bluetooth-keyboard-how-to-logitech-k810-or-others-4175613049/)

IsaacKuo 09-01-2017 09:41 AM

Simple Bluetooth Keyboard How-To (Logitech K810 or others)
 
Here's a very simply how-to to get a bluetooth keyboard persistently paired up on Debian 9 Stretch (should work for others):

https://www.linuxquestions.org/quest...-how-to-37550/

Here's how I pair a Logitech K810 persistently, on Debian 9 Stretch (should work on most Linux distributions).

The important thing is to do the "trust" step AFTER the "connect" step. If you get the order wrong, your connection will not persist after a reboot!

I do the following as root:
Code:

bluetoothctl -a
remove 00:1F:20:91:C7:8C
scan on
pair 00:1F:20:91:C7:8C
<type passkey on bluetooth keyboard>
connect 00:1F:20:91:C7:8C
trust 00:1F:20:91:C7:8C
quit

Things will look like this:

Code:

root@rapunzel:~# bluetoothctl -a
[NEW] Controller 74:F0:6D:EA:D2:14 rapunzel [default]
[NEW] Device 00:1F:20:91:C7:8C Logitech K810
Agent registered
[Logitech K810]# remove 00:1F:20:91:C7:8C
[CHG] Device 00:1F:20:91:C7:8C ServicesResolved: no
Device has been removed
[CHG] Device 00:1F:20:91:C7:8C Connected: no
[DEL] Device 00:1F:20:91:C7:8C Logitech K810
[bluetooth]# scan on
Discovery started
[CHG] Controller 74:F0:6D:EA:D2:14 Discovering: yes
[NEW] Device 00:1F:20:91:C7:8C Logitech K810
[bluetooth]# pair 00:1F:20:91:C7:8C
Attempting to pair with 00:1F:20:91:C7:8C
[CHG] Device 00:1F:20:91:C7:8C Connected: yes
[agent] Passkey: 391752
[agent] Passkey: 391752
[agent] Passkey: 391752
[agent] Passkey: 391752
[agent] Passkey: 391752
[agent] Passkey: 391752
[agent] Passkey: 391752
[CHG] Device 00:1F:20:91:C7:8C Modalias: usb:v046DpB319d1202
[CHG] Device 00:1F:20:91:C7:8C UUIDs: 00001000-0000-1000-8000-00805f9b34fb
[CHG] Device 00:1F:20:91:C7:8C UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 00:1F:20:91:C7:8C UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 00:1F:20:91:C7:8C ServicesResolved: yes
[CHG] Device 00:1F:20:91:C7:8C Paired: yes
Pairing successful
[CHG] Device 00:1F:20:91:C7:8C ServicesResolved: no
[CHG] Device 00:1F:20:91:C7:8C Connected: no
[bluetooth]# connect 00:1F:20:91:C7:8C
Attempting to connect to 00:1F:20:91:C7:8C
[CHG] Device 00:1F:20:91:C7:8C Connected: yes
Connection successful
[CHG] Device 00:1F:20:91:C7:8C ServicesResolved: yes
[Logitech K810]# trust 00:1F:20:91:C7:8C
[CHG] Device 00:1F:20:91:C7:8C Trusted: yes
Changing 00:1F:20:91:C7:8C trust succeeded
[Logitech K810]# quit
Agent unregistered
[DEL] Controller 74:F0:6D:EA:D2:14 ariel [default]
root@rapunzel:~# _

This simple example includes removing the device, which is what you do if you need to clean up a botched try. If, on the other hand, you are a perfect being and get it right the first try, you do not need the "remove" step.


All times are GMT -5. The time now is 02:50 AM.