You are not logged in.

#1 2017-03-10 16:33:43

re-mind
Member
From: Denmark
Registered: 2017-03-06
Posts: 43
Website

[solved] bluetooth kb/mouse bluetooth pair/connect at boot

Hi smile

I have sucessfully paired and connected both my Apple keyboard and Magic Trackpad but I also need to auto-pair at boot - especially the keyboard so I can login. I have an old Mac Mini 4.1 (mid2010). And I have enabled bluetooth at boot with changing false to true in /etc/bluetooth/main.conf. However, this only turns the bluetooth on but it does not pair with my devices.  It would seem that all guides are focused on using hciconfig/hcitool which is no longer maintained and I have read that it is not wise to use it in scripts. Please correct me if I'm wrong.

Now I'm at loss with what to do. I have tried to uncommented the following in /etc/bluetooth/main.conf. However nothing has helped.

AutoConnectTimeout = 60

ReconnectUUIDs= "1 UUID","2 UUID","3 UUID"

ReconnectAttempts=7

ReconnectIntervals=1,2,4,8,16,32,64

AutoEnable=true


Sigh.. Help please smile

Last edited by re-mind (2017-09-12 14:44:49)


Mein.conf

Offline

#2 2017-03-26 09:43:29

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

Re: [solved] bluetooth kb/mouse bluetooth pair/connect at boot

Hi,

Edit: read post below.

I followed these instructions for automatically enabling a bluetooth keyboard by creating a config file et a service file for systemd.

You should use a different name for /etc/btkbd.conf since you'll add your trackpad MAC address as well (and maybe your mouse and so on).

Now I suppose we should remove the

ExecStart=/usr/bin/hciconfig ${HCIDEVICE} up

in the service file since hciconfig is deprecated.
In this file, add as many lines as you have devices you'd like to use and whose MAC addresses you wrote in the config file:

ExecStart=-/usr/bin/hcitool cc ${TRACKPADMACADDR}
ExecStart=-/usr/bin/hcitool cc ${COFFEEMAKERMACADDR}

I've been using it for years but you always need a backup usb or ps2 keyboard big_smile

Last edited by Tétrapyle (2017-03-26 10:04:59)

Offline

#3 2017-03-26 10:04:22

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

Re: [solved] bluetooth kb/mouse bluetooth pair/connect at boot

OK, I may have written something stupid, since hcitool is as well deprecated and no longer on my machine. Please forget about the last post. However, my bluetooth Apple mouse and keyboard do connect automatically: I use them to log in after boot.

Did you pair, trust and connect them manually with bluetoothctl ?

Maybe have a look at journalctl?

Offline

#4 2017-03-26 11:38:12

re-mind
Member
From: Denmark
Registered: 2017-03-06
Posts: 43
Website

Re: [solved] bluetooth kb/mouse bluetooth pair/connect at boot

Tétrapyle wrote:

OK, I may have written something stupid, since hcitool is as well deprecated and no longer on my machine. Please forget about the last post. However, my bluetooth Apple mouse and keyboard do connect automatically: I use them to log in after boot.

Did you pair, trust and connect them manually with bluetoothctl ?

Maybe have a look at journalctl?


Hi! thank you so much for looking and commenting on my post. I started out with Arch and accepting that I knew nothing and it would be a rather steep learning curve. Sadly the bluetooth "problems" became a dealbreaker (together with nvidia 320m-problems) and after spending a few days on it, I reverted back to OSX, since I also have to work. So sadly I can't supply any further info. I'm on the lookout for a macbook air and then i'll have another go at Arch <3

I have found a myrade of guides and stuff around on the internet concerning bluetooth but they all seem to include hcitool in some way. I tried installing it but it did not fix my problem. Now I know that Arch is customizable and I love it. But.. It seems that bluetooth is just a mess to set up.

If I ever figure it out I'll report back here smile I must be missing something obvious.


Mein.conf

Offline

#5 2017-09-08 04:39:20

dmthornton
Member
Registered: 2017-09-08
Posts: 1

Re: [solved] bluetooth kb/mouse bluetooth pair/connect at boot

To get bluetooth to automatically reconnect my paired devices I did the following:
  1. set bluetooth service to start on boot: systemctl enable bluetooth.service
  2. set bluetooth adapter to automatically power on: edit /etc/bluetooth/main.conf and set AutoEnable=true
  3. set paired devices as trusted *this is what I was missing*: from the bluetoothctl util, enter trust XX:XX:XX:XX:XX:XX for each paired device (replace XX... with mac address)

This is just for automatically starting bluetooth and not the setting of up in the first place. But hopefully this is helpful in getting folks across the finish line. regarding bluetooth in general, these two references were helpful for me overall:
https://wiki.archlinux.org/index.php/bluetooth
https://wiki.archlinux.org/index.php/Bluetooth_keyboard

Offline

#6 2017-09-08 11:33:31

re-mind
Member
From: Denmark
Registered: 2017-03-06
Posts: 43
Website

Re: [solved] bluetooth kb/mouse bluetooth pair/connect at boot

dmthornton wrote:

To get bluetooth to automatically reconnect my paired devices I did the following:
  1. set bluetooth service to start on boot: systemctl enable bluetooth.service
  2. set bluetooth adapter to automatically power on: edit /etc/bluetooth/main.conf and set AutoEnable=true
  3. set paired devices as trusted *this is what I was missing*: from the bluetoothctl util, enter trust XX:XX:XX:XX:XX:XX for each paired device (replace XX... with mac address)

This is just for automatically starting bluetooth and not the setting of up in the first place. But hopefully this is helpful in getting folks across the finish line. regarding bluetooth in general, these two references were helpful for me overall:
https://wiki.archlinux.org/index.php/bluetooth
https://wiki.archlinux.org/index.php/Bluetooth_keyboard

Wow big_smile Perfect timing. Soon after my first post in this topic I bought a Thinkpad x250 and have had a fantastic time with Arch. A few days ago I bought a Thinkcenter m73 and wanted to use it as a mediacenter which requires me to set up bluetooth which is the project for the weekend. So I have actually been reading through the links you provided and I'm looking forward to try your suggested solution! big_smile I'll report back during the weekend.

It's good to know that it -can- work.

Thanks!


Mein.conf

Offline

#7 2017-09-12 14:42:17

re-mind
Member
From: Denmark
Registered: 2017-03-06
Posts: 43
Website

Re: [solved] bluetooth kb/mouse bluetooth pair/connect at boot

Almost forgot about this smile

I had some trouble with getting my apple keyboard to connect. This was resolved with a few restarts of the bluetooth service and installing blueman. When it all worked I rebooted and the keyboard autoconnects. I can't believe that this caused this much trouble last time I tried.

Thank you soo much for the help.


Mein.conf

Offline

#8 2021-02-16 10:20:20

stevexyz
Member
Registered: 2021-02-16
Posts: 2

Re: [solved] bluetooth kb/mouse bluetooth pair/connect at boot

dmthornton wrote:

To get bluetooth to automatically reconnect my paired devices I did the following:
  1. set bluetooth service to start on boot: systemctl enable bluetooth.service
  2. set bluetooth adapter to automatically power on: edit /etc/bluetooth/main.conf and set AutoEnable=true
  3. set paired devices as trusted *this is what I was missing*: from the bluetoothctl util, enter trust XX:XX:XX:XX:XX:XX for each paired device (replace XX... with mac address)

This is just for automatically starting bluetooth and not the setting of up in the first place. But hopefully this is helpful in getting folks across the finish line. regarding bluetooth in general, these two references were helpful for me overall:
https://wiki.archlinux.org/index.php/bluetooth
https://wiki.archlinux.org/index.php/Bluetooth_keyboard

I think these nice (and working in my case! smile) info/steps should be put into the bluetooth keyboard wiki since the keyboard IS the way to login! -> I tried to add it myself at the end of the page! smile

Last edited by stevexyz (2021-02-16 10:57:26)

Offline

Board footer

Powered by FluxBB