Package Details: bluetooth-autoconnect 1.3-1

Git Clone URL: https://aur.archlinux.org/bluetooth-autoconnect.git (read-only, click to copy)
Package Base: bluetooth-autoconnect
Description: A service to automatically connect to all paired and trusted bluetooth devices
Upstream URL: https://github.com/jrouleau/bluetooth-autoconnect
Keywords: autoconnect bluetooth bluez
Licenses: MIT
Submitter: jrouleau
Maintainer: jrouleau
Last Packager: jrouleau
Votes: 21
Popularity: 0.127199
First Submitted: 2019-03-24 04:10 (UTC)
Last Updated: 2021-04-01 13:07 (UTC)

Dependencies (6)

Required by (0)

Sources (1)

Pinned Comments

jrouleau commented on 2019-07-31 14:21 (UTC) (edited on 2019-07-31 14:31 (UTC) by jrouleau)

For all bluetooth devices (keyboards, printers, etc.), it is recommended to enable the main service with systemctl enable bluetooth-autoconnect run as root.

For bluetooth audio devices (headsets, speakers) when using pulseaudio, it is recommended to ALSO enable the helper service with systemctl --user enable pulseaudio-bluetooth-autoconnect run as your user, NOT root.

=====

Devices must be paired and trusted to attempt autoconnecting. See https://wiki.archlinux.org/index.php/Bluetooth#Pairing for more information on pairing

Latest Comments

jrouleau commented on 2020-09-02 21:47 (UTC)

@mark

This is likely because of a source filename conflict with another package. I have updated the PKGBUILD to use a unique filename (e.g. bluetooth-autoconnect-1.2.tar.gz instead of just v1.2.tar.gz) to prevent this from happening again.

Thanks for pointing this out!

mark commented on 2020-09-02 18:51 (UTC)

==> Validating source files with sha256sums...
    v1.2.tar.gz ... FAILED
==> ERROR: One or more files did not pass the validity check!

Which is weird since I tried downloading the tar.gz and calculating the SHA-256 and it matches.

jrouleau commented on 2019-07-31 14:21 (UTC) (edited on 2019-07-31 14:31 (UTC) by jrouleau)

For all bluetooth devices (keyboards, printers, etc.), it is recommended to enable the main service with systemctl enable bluetooth-autoconnect run as root.

For bluetooth audio devices (headsets, speakers) when using pulseaudio, it is recommended to ALSO enable the helper service with systemctl --user enable pulseaudio-bluetooth-autoconnect run as your user, NOT root.

=====

Devices must be paired and trusted to attempt autoconnecting. See https://wiki.archlinux.org/index.php/Bluetooth#Pairing for more information on pairing

jrouleau commented on 2019-07-31 14:18 (UTC) (edited on 2019-07-31 14:21 (UTC) by jrouleau)

@GrievousMa

With pulseaudio, you also need to enable another service with systemctl --user enable pulseaudio-bluetooth-autoconnect run as your user, NOT root.

Pulseaudio runs as your user (by default) and therefore doesn't start until after you login (whereas bluez is started when the system boots). You can't connect to bluetooth audio devices until after pulseaudio is running, so the initial attempt with the bluetooth-autoconnect (before logging in) doesn't work.

It is safer to trigger a connection attempt with the pulseaudio-bluetooth-autoconnect service because it is guaranteed to be run after pulseaudio starts. The xfce autostart option MAY trigger before pulseaudio finishes loading which would cause it to fail.

GrievousMa commented on 2019-07-31 13:58 (UTC)

@jrouleau thank you for your help.

I enabled the daemon systemctl enable bluetooth-autoconnect and it is listed in systemctl services as running, however the speaker did not connect automatically on restart or login. Don't know why: perhaps it's something about my Manjaro or maybe I did something wrong.

I then used xfce4-session-settings -> Application autostart -> Add -> bluetooth-autoconnect, and now the Bluetooth speaker connects on every login, which I am very glad of.

jrouleau commented on 2019-07-31 13:25 (UTC)

@GrievousMa

A systemd service is installed with this package. Simply run systemctl enable bluetooth-autoconnect as root to automatically start in daemon mode where it will attempt to connect to any trusted devices once an adapter is powered on (such as after booting, resuming from suspend, etc.)

GrievousMa commented on 2019-07-31 13:15 (UTC)

It works well. Thanks!

Now I need to find how to automatically run bluetooth-autoconnect on every boot.

mareex commented on 2019-07-07 16:39 (UTC)

Thank you for this package. Works like a charm.