You are not logged in.

#1 2019-12-10 14:57:09

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

[solved] Bluetooth Keyboard Not Reconnecting After Reboot.

I have two logitech keyboards and have the same problem with both. I can pair the keyboard and add it as trusted in Blueman Manager. It then works perfectly. However, if I reboot I can't get the keyboard to automatically reconnect. If I try to reconnect using Blueman it will only reconnect if I put the keyboard back into pairing mode. The connection fails if the keyboard isn't in pairing mode.

I have created /etc/btkbd.conf and the service /etc/systemd/system/btkbd.service . The service starts without any errors. If I try restarting the service after logging in the keyboard still won't connect until I put it back into pairing mode. I have even tried creating a crontab entry:

@reboot sleep 20 && /bin/echo -e 'connect 34:88:5D:D0:D9:B4 \n' | bluetoothctl

Last edited by geekinthesticks (2019-12-27 17:12:30)

Offline

#2 2019-12-27 10:38:19

ua4000
Member
Registered: 2015-10-14
Posts: 551

Re: [solved] Bluetooth Keyboard Not Reconnecting After Reboot.

a) instead of Blueman Manager  try do everything with bluetoothctl, also reset all saved pairings.

b) remove/disable  /etc/btkbd.conf and /etc/systemd/system/btkbd.service

c)
sudoedit /etc/bluetooth/main.conf
[Policy]
AutoEnable=true

d) Re-connecting after a reboot needs some time for me, 1st keypress wake the keyboard, then after a few seconds the device is conected.

Offline

#3 2019-12-27 17:12:02

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

Re: [solved] Bluetooth Keyboard Not Reconnecting After Reboot.

Thanks, that didn't quite work. However, after finding https://raspberrypi.stackexchange.com/q … th-speaker, I placed the following in /etc/lxdm/PreLogin

#!/bin/sh
#
# Note: this is a sample and will not be run as is.
hciconfig hci0 up
hcitool cc 34:88:5D:D0:D9:B4

which works.

Offline

#4 2019-12-27 18:38:00

Tétrapyle
Member
Registered: 2014-01-03
Posts: 61

Re: [solved] Bluetooth Keyboard Not Reconnecting After Reboot.

This way, you're using a deprecated tool. It seems that many advocated the use of these deprecated tools quite rightfully, because they were deprecated before any replacement were available for some basic functionality, which is insane. But now, you shouldn't need them.

Offline

Board footer

Powered by FluxBB