Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bluetooth autoconnect ability #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ysard
Copy link

@ysard ysard commented Nov 13, 2021

Hi,
in this patch I propose an "auto-connection" option for bluetooth devices.

Theoretically the auto-connection of Paired and Trusted devices is done without any intervention by the user.

Some resources on this subject as a reminder:
https://wiki.archlinux.org/title/Bluetooth#Auto_power-on_after_boot
https://wiki.archlinux.org/title/Bluetooth_headset#Setting_up_auto_connection
https://wiki.archlinux.org/title/bluetooth#Audio
https://askubuntu.com/questions/589885/automatically-switch-sound-output-device-to-bluetooth-headset-force-to-a2dp-pr

However on some hardware (computer or devices), the connection is not done, or succeeded with a high failure rate.

Personally on an AsusK75 and speakers "Creative T12 Wireless", the success rate is about 2/10 when I press the association button on the speakers.
Also, if the speakers are turned on before the computer, the computer has no chance to connect to them.

Many people have these problems and rely on solutions like this one:
https://github.com/jrouleau/bluetooth-autoconnect/blob/master/bluetooth-autoconnect
=> basically a script that lists trusted devices at regular intervals and initiates a blind connection.

It is important to mention that the implementation under Windows is radically different from the one under GNU/Linux because the devices are instantly hooked in all situations. This behavior is similar to what the above mentioned script offers.

So I have added the autoconnect option for any device that has been added manually.
It works similarly to the "standby" option already present.

The search interval is currently 30 seconds (this is probably too long and open to discussion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant